[gnome-session] Fix a looping PolicyKit dialog
Kalev Lember
kalev at fedoraproject.org
Mon Apr 16 23:48:44 UTC 2012
commit 75e7919ab6089680872fb87175e034a156d80c08
Author: Matthias Clasen <mclasen at redhat.com>
Date: Thu Apr 5 22:08:03 2012 -0400
Fix a looping PolicyKit dialog
0001-Fix-some-problems-in-the-systemd-code.patch | 66 ++++++++++++++++++++++
gnome-session.spec | 8 ++-
2 files changed, 73 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fix-some-problems-in-the-systemd-code.patch b/0001-Fix-some-problems-in-the-systemd-code.patch
new file mode 100644
index 0000000..247abf3
--- /dev/null
+++ b/0001-Fix-some-problems-in-the-systemd-code.patch
@@ -0,0 +1,66 @@
+From 5dc795f32bf7eae5c12d36cd289cf9b9f6438255 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Thu, 5 Apr 2012 22:00:17 -0400
+Subject: [PATCH] Fix some problems in the systemd code
+
+The stop and restart functions forgot to pass the manager
+object down, and then tried to emit signals on a NULL
+object. Also, we were unreffing a variant that was NULL
+half the time. Don't do that.
+
+Fixes the problem where a poweroff request in the presence
+of multiple user sessions leads to a PolicyKit dialog that
+comes back every time it is canceled.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=673619
+---
+ gnome-session/gsm-systemd.c | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/gnome-session/gsm-systemd.c b/gnome-session/gsm-systemd.c
+index 5bf64b0..0907bfb 100644
+--- a/gnome-session/gsm-systemd.c
++++ b/gnome-session/gsm-systemd.c
+@@ -208,9 +208,8 @@ restart_done (GObject *source,
+ g_error_free (error);
+ } else {
+ emit_restart_complete (manager, NULL);
++ g_variant_unref (res);
+ }
+-
+- g_variant_unref (res);
+ }
+
+ static void
+@@ -225,7 +224,7 @@ gsm_systemd_attempt_restart (GsmSystem *system)
+ G_MAXINT,
+ NULL,
+ restart_done,
+- NULL);
++ manager);
+ }
+
+ static void
+@@ -246,9 +245,8 @@ stop_done (GObject *source,
+ g_error_free (error);
+ } else {
+ emit_stop_complete (manager, NULL);
++ g_variant_unref (res);
+ }
+-
+- g_variant_unref (res);
+ }
+
+ static void
+@@ -263,7 +261,7 @@ gsm_systemd_attempt_stop (GsmSystem *system)
+ G_MAXINT,
+ NULL,
+ stop_done,
+- NULL);
++ manager);
+ }
+
+ static void
+--
+1.7.9.3
+
diff --git a/gnome-session.spec b/gnome-session.spec
index c27732d..f09b3ae 100644
--- a/gnome-session.spec
+++ b/gnome-session.spec
@@ -3,7 +3,7 @@
Summary: GNOME session manager
Name: gnome-session
Version: 3.4.0
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: http://www.gnome.org
#VCS: git:git://git.gnome.org/gnome-session
Source0: http://download.gnome.org/sources/gnome-session/3.3/%{name}-%{version}.tar.xz
@@ -13,6 +13,8 @@ Source2: gnome.desktop
Patch0: gnome-session-3.3.1-llvmpipe.patch
# Blacklist NV30: https://bugzilla.redhat.com/show_bug.cgi?id=745202
Patch1: gnome-session-3.3.92-nv30.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=673619
+Patch2: 0001-Fix-some-problems-in-the-systemd-code.patch
License: GPLv2+
Group: User Interface/Desktops
@@ -82,6 +84,7 @@ Desktop file to add GNOME to display manager session menu.
%setup -q
%patch0 -p1 -b .llvmpipe
%patch1 -p1 -b .nv30
+%patch2 -p1 -b .systemd
echo "ACLOCAL_AMFLAGS = -I m4" >> Makefile.am
@@ -157,6 +160,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas || :
%{_datadir}/glib-2.0/schemas/org.gnome.SessionManager.gschema.xml
%changelog
+* Thu Apr 5 2012 Matthias Clasen <mclasen at redhat.com> - 3.4.0-2
+- Fix a looping PolicyKit dialog on shutdown
+
* Tue Mar 27 2012 Richard Hughes <hughsient at gmail.com> - 3.4.0-1
- Update to 3.4.0
More information about the scm-commits
mailing list