Hello community,

here is the log from the commit of package NetworkManager for openSUSE:Factory 
checked in at 2018-02-28 20:00:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/NetworkManager (Old)
 and      /work/SRC/openSUSE:Factory/.NetworkManager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "NetworkManager"

Wed Feb 28 20:00:51 2018 rev:179 rq:580404 version:1.10.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/NetworkManager/NetworkManager.changes    
2018-02-14 09:20:35.819453030 +0100
+++ /work/SRC/openSUSE:Factory/.NetworkManager.new/NetworkManager.changes       
2018-02-28 20:00:54.843910192 +0100
@@ -1,0 +2,7 @@
+Tue Feb 27 02:30:47 UTC 2018 - sck...@suse.com
+
+- Add nm-preserve-agent-owned-secrets-on-connection-update.patch:
+  Backport upstream commit to preserve agent-owned secrets on
+  connection update (bgo#793324, bsc#1082762).
+
+-------------------------------------------------------------------

New:
----
  nm-preserve-agent-owned-secrets-on-connection-update.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ NetworkManager.spec ++++++
--- /var/tmp/diff_new_pack.7DMKua/_old  2018-02-28 20:00:56.327856498 +0100
+++ /var/tmp/diff_new_pack.7DMKua/_new  2018-02-28 20:00:56.331856354 +0100
@@ -26,7 +26,7 @@
 Version:        1.10.4
 Release:        0
 Summary:        Network Link Manager and User Applications
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          Productivity/Networking/System
 Url:            http://www.gnome.org/projects/NetworkManager/
 Source0:        
http://download.gnome.org/sources/NetworkManager/1.10/%{name}-%{version}.tar.xz
@@ -48,6 +48,8 @@
 Patch4:         nm-dont-overwrite-resolv-conf.patch
 # PATCH-FIx-UPSTREAM NetworkManager-1.10.4-buildfixes.patch bgo#793183 
dims...@opensuse.org -- Fix OVS compile errors
 Patch5:         NetworkManager-1.10.4-buildfixes.patch
+# PATCH-FIX-UPSTREAM 
nm-preserve-agent-owned-secrets-on-connection-update.patch bgo#793324 
bsc#1082762 sck...@suse.com -- settings: preserve agent-owned secrets on 
connection update
+Patch6:         nm-preserve-agent-owned-secrets-on-connection-update.patch
 
 BuildRequires:  dnsmasq
 BuildRequires:  fdupes
@@ -241,6 +243,7 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 NOCONFIGURE=1 ./autogen.sh
@@ -352,7 +355,8 @@
 %postun -n libnm0 -p /sbin/ldconfig
 
 %files
-%doc COPYING ChangeLog NEWS AUTHORS README CONTRIBUTING TODO data/server.conf
+%license COPYING
+%doc ChangeLog NEWS AUTHORS README CONTRIBUTING TODO data/server.conf
 %{_bindir}/nm-online
 %{_bindir}/nmcli
 %{_bindir}/nmtui*

++++++ nm-preserve-agent-owned-secrets-on-connection-update.patch ++++++
>From f9c50bf3d3e1e52d5803d55fa97bf56930fd3020 Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalv...@redhat.com>
Date: Wed, 14 Feb 2018 11:43:00 +0100
Subject: [PATCH] settings: preserve agent-owned secrets on connection update
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

After writing the connection to disk and rereading it, in addition to
restoring agent-owned secrets in the cache we must also restore
agent-owned secrets from the original connections since they are lost
during the write.

Reported-by: Märt Bakhoff <a...@sigil.red>

https://bugzilla.gnome.org/show_bug.cgi?id=793324
---
 src/settings/nm-settings-connection.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/settings/nm-settings-connection.c 
b/src/settings/nm-settings-connection.c
index 277e1eeb3..c499dbfe3 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -604,6 +604,7 @@ nm_settings_connection_update (NMSettingsConnection *self,
        gboolean replaced = FALSE;
        gs_free char *logmsg_change = NULL;
        GError *local = NULL;
+       gs_unref_variant GVariant *con_agent_secrets = NULL;
 
        g_return_val_if_fail (NM_IS_SETTINGS_CONNECTION (self), FALSE);
 
@@ -654,9 +655,20 @@ nm_settings_connection_update (NMSettingsConnection *self,
            && !nm_connection_compare (NM_CONNECTION (self),
                                       replace_connection,
                                       NM_SETTING_COMPARE_FLAG_EXACT)) {
+               gs_unref_object NMConnection *simple = NULL;
+
                if (log_diff_name)
                        nm_utils_log_connection_diff (replace_connection, 
NM_CONNECTION (self), LOGL_DEBUG, LOGD_CORE, log_diff_name, "++ ");
 
+               /* Make a copy of agent-owned secrets because they won't be 
present in
+                * the connection returned by plugins, as plugins return only 
what was
+                * reread from the file. */
+               simple = nm_simple_connection_new_clone (NM_CONNECTION (self));
+               nm_connection_clear_secrets_with_flags (simple,
+                                                       secrets_filter_cb,
+                                                       GUINT_TO_POINTER 
(NM_SETTING_SECRET_FLAG_AGENT_OWNED));
+               con_agent_secrets = nm_connection_to_dbus (simple, 
NM_CONNECTION_SERIALIZE_ONLY_SECRETS);
+
                nm_connection_replace_settings_from_connection (NM_CONNECTION 
(self), replace_connection);
 
                replaced = TRUE;
@@ -684,6 +696,8 @@ nm_settings_connection_update (NMSettingsConnection *self,
                                g_variant_unref (dict);
                        }
                }
+               if (con_agent_secrets)
+                       (void) nm_connection_update_secrets (NM_CONNECTION 
(self), NULL, con_agent_secrets, NULL);
        }
 
        nm_settings_connection_recheck_visibility (self);
-- 
2.14.3


Reply via email to