From 3274b5b49b16eda0713af2913af182cd7627ce57 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Jan 28 2014 13:03:46 +0000 Subject: import vinagre-3.8.2-4.el7.src.rpm --- diff --git a/SOURCES/vinagre-3.8.2-fix-storing-passwords.patch b/SOURCES/vinagre-3.8.2-fix-storing-passwords.patch new file mode 100644 index 0000000..103a05f --- /dev/null +++ b/SOURCES/vinagre-3.8.2-fix-storing-passwords.patch @@ -0,0 +1,95 @@ +From 7b301aee94c6c6e62ef5afc0c3be88735f03ba0e Mon Sep 17 00:00:00 2001 +From: David King +Date: Tue, 23 Jul 2013 19:50:34 +0000 +Subject: Fix credential access with libsecret, bug 704744 + +When storing attributes in libsecret, string attributes are not +permitted to have NULL values. The existing workaround for this was +wrong, as it removed the ability to store passwords for username-less +connections. Fix this by terminating the attribute list with a NULL +attribute, thus ending the list, if there is no username. +--- +diff --git a/plugins/vnc/vinagre-vnc-tab.c b/plugins/vnc/vinagre-vnc-tab.c +index 7cae9f2..73a13b8 100644 +--- a/plugins/vnc/vinagre-vnc-tab.c ++++ b/plugins/vnc/vinagre-vnc-tab.c +@@ -492,11 +492,7 @@ vnc_authentication_cb (VncDisplay *vnc, GValueArray *credList, VinagreVncTab *vn + + if (need_password || need_username) + { +- /* libsecret does not support NULL attributes, bug 685041. */ +- if (vinagre_connection_get_username (conn) != NULL) +- { +- vinagre_tab_find_credentials_in_keyring (tab, &username, &password); +- } ++ vinagre_tab_find_credentials_in_keyring (tab, &username, &password); + + if ( (need_username && !username) || (need_password && !password) ) + { +diff --git a/vinagre/vinagre-tab.c b/vinagre/vinagre-tab.c +index 2f06e0d..284e469 100644 +--- a/vinagre/vinagre-tab.c ++++ b/vinagre/vinagre-tab.c +@@ -745,19 +745,21 @@ vinagre_tab_get_from_connection (VinagreConnection *conn) + gboolean + vinagre_tab_find_credentials_in_keyring (VinagreTab *tab, gchar **username, gchar **password) + { ++ const gchar *conn_user = vinagre_connection_get_username (tab->priv->conn); + *username = NULL; + ++ /* "user" goes last, to terminate the attribute list if conn_user is NULL. */ + *password = secret_password_lookup_sync (SECRET_SCHEMA_COMPAT_NETWORK, NULL, NULL, +- "user", vinagre_connection_get_username (tab->priv->conn), + "server", vinagre_connection_get_host (tab->priv->conn), + "protocol", vinagre_connection_get_protocol (tab->priv->conn), + "port", vinagre_connection_get_port (tab->priv->conn), ++ conn_user ? "user" : NULL, conn_user, + NULL); + + if (*password == NULL) + return FALSE; + +- *username = g_strdup (vinagre_connection_get_username (tab->priv->conn)); ++ *username = g_strdup (conn_user); + return TRUE; + } + +@@ -771,18 +773,20 @@ vinagre_tab_save_credentials_in_keyring (VinagreTab *tab) + { + GError *error = NULL; + gchar *label; ++ const gchar *conn_user = vinagre_connection_get_username (tab->priv->conn); + + if (!tab->priv->save_credentials) + return; + + label = g_strdup_printf (_("Remote desktop password: %s"), vinagre_connection_get_host (tab->priv->conn)); ++ /* "user" goes last, to terminate the attribute list if conn_user is NULL. */ + secret_password_store_sync (SECRET_SCHEMA_COMPAT_NETWORK, NULL, + label, vinagre_connection_get_password (tab->priv->conn), + NULL, &error, +- "user", vinagre_connection_get_username (tab->priv->conn), + "server", vinagre_connection_get_host (tab->priv->conn), + "protocol", vinagre_connection_get_protocol (tab->priv->conn), + "port", vinagre_connection_get_port (tab->priv->conn), ++ conn_user ? "user" : NULL, conn_user, + NULL); + g_free (label); + +@@ -803,11 +807,13 @@ void vinagre_tab_remove_credentials_from_keyring (VinagreTab *tab) + { + if (tab->priv->saved_credentials) + { ++ /* Put "user" last, to terminate the attributes if conn_user is NULL. */ ++ const gchar *conn_user = vinagre_connection_get_username (tab->priv->conn); + secret_password_clear_sync (SECRET_SCHEMA_COMPAT_NETWORK, NULL, NULL, +- "user", vinagre_connection_get_username (tab->priv->conn), + "server", vinagre_connection_get_host (tab->priv->conn), + "protocol", vinagre_connection_get_protocol (tab->priv->conn), + "port", vinagre_connection_get_port (tab->priv->conn), ++ conn_user ? "user" : NULL, conn_user, + NULL); + tab->priv->saved_credentials = FALSE; + } +-- +cgit v0.9.2 diff --git a/SPECS/vinagre.spec b/SPECS/vinagre.spec index a938ee8..7488ce9 100644 --- a/SPECS/vinagre.spec +++ b/SPECS/vinagre.spec @@ -4,7 +4,7 @@ Name: vinagre Version: 3.8.2 -Release: 1.2%{?dist} +Release: 4%{?dist} Summary: VNC client for GNOME Group: Applications/System @@ -15,6 +15,8 @@ Source0: http://download.gnome.org/sources/vinagre/3.8/%{name}-%{version} # https://bugzilla.redhat.com/show_bug.cgi?id=978825 Patch0: vinagre-3.8.2-switch-to-freerdp.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1055914 +Patch1: vinagre-3.8.2-fix-storing-passwords.patch %if 0%{?with_spice} BuildRequires: spice-gtk3-devel @@ -63,6 +65,7 @@ Apart from the VNC protocol, vinagre supports Spice and RDP. %prep %setup -q %patch0 -p1 -b .freerdp +%patch1 -p1 -b .passwords %build CFLAGS="%optflags -UGTK_DISABLE_DEPRECATED" %configure --enable-avahi \ @@ -134,6 +137,15 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : %changelog +* Tue Jan 28 2014 David King - 3.8.2-4 +- Fix storing passwords in libsecret (#1055914) + +* Fri Jan 24 2014 Daniel Mach - 3.8.2-3 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 3.8.2-2 +- Mass rebuild 2013-12-27 + * Wed Jul 3 2013 Marek Kasik - 3.8.2-1.2 - Enable RDP again and switch to FreeRDP - Resolves: #978825