Fix crash in libnm-glib getting secrets
This commit is contained in:
parent
8db2aec80d
commit
9ab3949bca
@ -0,0 +1,31 @@
|
|||||||
|
From fa557a976fd8c6528e133b56be478cd50f4a915a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dan Williams <dcbw@redhat.com>
|
||||||
|
Date: Fri, 31 Jan 2014 15:22:16 -0600
|
||||||
|
Subject: [PATCH 1/1] libnm-glib: zero 'secrets' to prevent crash getting
|
||||||
|
secrets
|
||||||
|
|
||||||
|
If the GetSecrets call returned an error (eg, no secrets) then
|
||||||
|
'secrets' isn't set by dbus_g_proxy_end_call() and is garbage,
|
||||||
|
then gets freed.
|
||||||
|
|
||||||
|
(cherry picked from commit e922c120a3cf1bb3bd8def11bd0f23f1e18a0751)
|
||||||
|
---
|
||||||
|
libnm-glib/nm-remote-connection.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c
|
||||||
|
index 35c5be8..f4640c3 100644
|
||||||
|
--- a/libnm-glib/nm-remote-connection.c
|
||||||
|
+++ b/libnm-glib/nm-remote-connection.c
|
||||||
|
@@ -313,7 +313,7 @@ get_secrets_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_dat
|
||||||
|
{
|
||||||
|
RemoteCall *call = user_data;
|
||||||
|
NMRemoteConnectionGetSecretsFunc func = (NMRemoteConnectionGetSecretsFunc) call->callback;
|
||||||
|
- GHashTable *secrets;
|
||||||
|
+ GHashTable *secrets = NULL;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
dbus_g_proxy_end_call (proxy, proxy_call, &error,
|
||||||
|
--
|
||||||
|
1.8.5.3
|
||||||
|
|
@ -20,7 +20,7 @@ Name: NetworkManager
|
|||||||
Summary: Network connection manager and user applications
|
Summary: Network connection manager and user applications
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 0.9.9.0
|
Version: 0.9.9.0
|
||||||
Release: 26%{snapshot}%{?dist}
|
Release: 27%{snapshot}%{?dist}
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.gnome.org/projects/NetworkManager/
|
URL: http://www.gnome.org/projects/NetworkManager/
|
||||||
@ -29,6 +29,7 @@ Source: %{name}-%{realversion}%{snapshot}%{git_sha}.tar.bz2
|
|||||||
Source1: NetworkManager.conf
|
Source1: NetworkManager.conf
|
||||||
Source2: 00-server.conf
|
Source2: 00-server.conf
|
||||||
Patch1: 0001-explain-dns1-dns2.patch
|
Patch1: 0001-explain-dns1-dns2.patch
|
||||||
|
Patch2: 0002-libnm-glib-zero-secrets-to-prevent-crash-getting-sec.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
@ -153,6 +154,7 @@ deployments.
|
|||||||
%setup -q -n NetworkManager-%{realversion}
|
%setup -q -n NetworkManager-%{realversion}
|
||||||
|
|
||||||
%patch1 -p1 -b .0001.explain-dns1-dns2.orig
|
%patch1 -p1 -b .0001.explain-dns1-dns2.orig
|
||||||
|
%patch2 -p1 -b .0002.libnm-glib-secrets.orig
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -351,6 +353,9 @@ fi
|
|||||||
%config %{_sysconfdir}/%{name}/conf.d/00-server.conf
|
%config %{_sysconfdir}/%{name}/conf.d/00-server.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Feb 2 2014 Thomas Haller <thaller@redhat.com> - 0.9.9.0-27.git20140131
|
||||||
|
- core: fix crash getting secrets in libnm-glib
|
||||||
|
|
||||||
* Fri Jan 31 2014 Jiří Klimeš <jklimes@redhat.com> - 0.9.9.0-26.git20140131
|
* Fri Jan 31 2014 Jiří Klimeš <jklimes@redhat.com> - 0.9.9.0-26.git20140131
|
||||||
- Update to a git snapshot (git20140131)
|
- Update to a git snapshot (git20140131)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user