diff --git a/0004-policy-fix-blocking-autoconnect-for-no-secrets-rh1553773.patch b/0004-policy-fix-blocking-autoconnect-for-no-secrets-rh1553773.patch new file mode 100644 index 0000000..4c3d891 --- /dev/null +++ b/0004-policy-fix-blocking-autoconnect-for-no-secrets-rh1553773.patch @@ -0,0 +1,45 @@ +From fbff058fcdf92bd84331259078f02d1d27509680 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Tue, 6 Mar 2018 13:04:00 +0000 +Subject: [PATCH 1/1] policy: fix blocking autoconnect for no-secrets + +The condition was obviosly inverted, blocking autoconnect when +it should not, and not blocking it when it should. + +[thaller@redhat.com: modified original patch and rewrite commit message] + +Fixes: e2c8ef45ac9fba8d4f5722ab10831bf42085a110 + +https://bugzilla.gnome.org/show_bug.cgi?id=794014 +(cherry picked from commit d2f019409d0906814ccd2050ce39609903f879f7) +(cherry picked from commit 0824a327039d7fe7f9723f316da30538c7b688d0) +--- + src/nm-policy.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/nm-policy.c b/src/nm-policy.c +index 4d0ef91a1..b73e04cb2 100644 +--- a/src/nm-policy.c ++++ b/src/nm-policy.c +@@ -1758,10 +1758,16 @@ device_state_changed (NMDevice *device, + * been consulted, and it may be able to provide the secrets. + * + * We detect this by using a version-id of the agent-manager, which increments +- * whenever new agents register. */ ++ * whenever new agents register. Note that the agent-manager's version-id is ++ * never zero and strictly increasing. ++ * ++ * A connection's version-id of zero means that the connection never tried to request secrets. ++ * That can happen when nm_settings_connection_get_secrets() fails early without actually ++ * consulting any agents. ++ */ + con_v = nm_settings_connection_get_last_secret_agent_version_id (connection); + if ( con_v == 0 +- || con_v != nm_agent_manager_get_agent_version_id (priv->agent_mgr)) ++ || con_v == nm_agent_manager_get_agent_version_id (priv->agent_mgr)) + block_no_secrets = TRUE; + } + +-- +2.14.3 + diff --git a/NetworkManager.spec b/NetworkManager.spec index a199aa7..13d96b8 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -9,7 +9,7 @@ %global epoch_version 1 %global rpm_version 1.10.4 %global real_version 1.10.4 -%global release_version 1 +%global release_version 2 %global snapshot %{nil} %global git_sha %{nil} @@ -94,6 +94,7 @@ Source3: 20-connectivity-fedora.conf Patch1: 0001-build-fix-configure-check-for-CC-support-of-_Generic.patch Patch2: 0002-ovs-fix-compiler-error-for-passing-NMDevice-pointer-.patch Patch3: 0003-m4-disable-Wcast-function-type.patch +Patch4: 0004-policy-fix-blocking-autoconnect-for-no-secrets-rh1553773.patch Requires(post): systemd Requires(preun): systemd @@ -365,6 +366,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build %if %{with regen_docs} @@ -716,6 +718,9 @@ fi %endif %changelog +* Fri Mar 9 2018 Thomas Haller - 1:1.10.4-2 +- policy: fix blocking autoconnect for no-secrets (rh #1553773) + * Mon Feb 5 2018 Lubomir Rintel - 1:1.10.4-1 - Update to 1.10.4 release