diff options
author | Pacho Ramos <pacho@gentoo.org> | 2015-10-24 09:44:31 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2015-10-24 09:45:30 +0200 |
commit | 6c693e0a73b17ba7b4d4ab202e66f96181ffc366 (patch) | |
tree | 8e51538f01bd6722cc15ccb1aa6808e8c2c82f11 /net-misc/vino/files | |
parent | dev-libs/elfutils: Stable for HPPA PPC64 (bug #563250). (diff) | |
download | gentoo-6c693e0a73b17ba7b4d4ab202e66f96181ffc366.tar.gz gentoo-6c693e0a73b17ba7b4d4ab202e66f96181ffc366.tar.bz2 gentoo-6c693e0a73b17ba7b4d4ab202e66f96181ffc366.zip |
net-misc/vino: Apply upstream fixes, also including a fix for a crash when gnome-control-center is not present (#561786 by Mikhail Kurinnoi)
Package-Manager: portage-2.2.23
Diffstat (limited to 'net-misc/vino/files')
-rw-r--r-- | net-misc/vino/files/vino-3.16.0-fix-crash.patch | 53 | ||||
-rw-r--r-- | net-misc/vino/files/vino-3.16.0-name-resolution.patch | 47 |
2 files changed, 100 insertions, 0 deletions
diff --git a/net-misc/vino/files/vino-3.16.0-fix-crash.patch b/net-misc/vino/files/vino-3.16.0-fix-crash.patch new file mode 100644 index 000000000000..bf0d190cb653 --- /dev/null +++ b/net-misc/vino/files/vino-3.16.0-fix-crash.patch @@ -0,0 +1,53 @@ +From 22f6575b32675ae38567efd3ed8e2362bbc9240d Mon Sep 17 00:00:00 2001 +From: David King <amigadave@amigadave.com> +Date: Mon, 19 Oct 2015 14:48:44 +0100 +Subject: Avoid a crash when showing the preferences + +Show an error message when the preferences desktop file is not found, +such as if gnome-control-center is not installed. + +https://bugzilla.gnome.org/show_bug.cgi?id=756654 +--- + server/vino-status-icon.c | 5 +++++ + server/vino-status-tube-icon.c | 9 ++++++++- + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/server/vino-status-icon.c b/server/vino-status-icon.c +index 53eec02..aaab0af 100644 +--- a/server/vino-status-icon.c ++++ b/server/vino-status-icon.c +@@ -202,6 +202,11 @@ vino_status_icon_preferences (VinoStatusIcon *icon) + info = g_desktop_app_info_new ("gnome-sharing-panel.desktop"); + if (info == NULL) + info = g_desktop_app_info_new ("vino-preferences.desktop"); ++ if (info == NULL) ++ { ++ vino_util_show_error (NULL, _("Error displaying preferences"), NULL); ++ return; ++ } + context = gdk_display_get_app_launch_context (gdk_screen_get_display (screen)); + if (!g_app_info_launch (G_APP_INFO (info), NULL, G_APP_LAUNCH_CONTEXT (context), &error)) + { +diff --git a/server/vino-status-tube-icon.c b/server/vino-status-tube-icon.c +index 0a23a23..e5cbb11 100644 +--- a/server/vino-status-tube-icon.c ++++ b/server/vino-status-tube-icon.c +@@ -165,7 +165,14 @@ vino_status_tube_icon_preferences (VinoStatusTubeIcon *icon) + GError *error = NULL; + + screen = gtk_status_icon_get_screen (GTK_STATUS_ICON (icon)); +- info = g_desktop_app_info_new ("vino-preferences.desktop"); ++ info = g_desktop_app_info_new ("gnome-sharing-panel.desktop"); ++ if (info == NULL) ++ info = g_desktop_app_info_new ("vino-preferences.desktop"); ++ if (info == NULL) ++ { ++ vino_util_show_error (NULL, _("Error displaying preferences"), NULL); ++ return; ++ } + context = gdk_display_get_app_launch_context (gdk_screen_get_display (screen)); + if (!g_app_info_launch (G_APP_INFO (info), NULL, G_APP_LAUNCH_CONTEXT (context), &error)) + { +-- +cgit v0.11.2 + diff --git a/net-misc/vino/files/vino-3.16.0-name-resolution.patch b/net-misc/vino/files/vino-3.16.0-name-resolution.patch new file mode 100644 index 000000000000..2989ffabd567 --- /dev/null +++ b/net-misc/vino/files/vino-3.16.0-name-resolution.patch @@ -0,0 +1,47 @@ +From bdd14508f9ea46372fcef93e17a9c14bcb8b4c83 Mon Sep 17 00:00:00 2001 +From: Dimitri Tarassenko <dtarassenko@gmail.com> +Date: Fri, 28 Aug 2015 17:02:15 +0100 +Subject: Improve handling of name resolution failure + +Ensure that the host string for a client is always filled with a valid +string, by calling getnameinfo() a second time (ensuring a numeric host +is returned) if the first call fails. + +https://bugzilla.gnome.org/show_bug.cgi?id=754194 +--- + server/libvncserver/rfbserver.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/server/libvncserver/rfbserver.c b/server/libvncserver/rfbserver.c +index 1295219..0a60fb2 100644 +--- a/server/libvncserver/rfbserver.c ++++ b/server/libvncserver/rfbserver.c +@@ -150,7 +150,7 @@ rfbNewClient(rfbScreenInfoPtr rfbScreen, + struct sockaddr_storage addr; + socklen_t addrlen = sizeof(addr); + int i; +- char host[NI_MAXHOST]; ++ char host[NI_MAXHOST] = "(unresolved)"; + const char *prt = "unknown"; + + cl = (rfbClientPtr)calloc(sizeof(rfbClientRec),1); +@@ -166,11 +166,11 @@ rfbNewClient(rfbScreenInfoPtr rfbScreen, + + getpeername(sock, (struct sockaddr *)&addr, &addrlen); + +- getnameinfo((struct sockaddr *)&addr, +- addrlen, +- host, sizeof(host), +- NULL, 0, +- 0); ++ if (getnameinfo((struct sockaddr *)&addr, addrlen, ++ host, sizeof(host), NULL, 0, 0)) { ++ getnameinfo((struct sockaddr *)&addr, addrlen, ++ host, sizeof(host), NULL, 0, NI_NUMERICHOST); ++ } + + cl->host = strdup(host); + +-- +cgit v0.11.2 + |