[gdm] Fix crasher bug
Ray Strode
rstrode at fedoraproject.org
Thu Feb 9 18:34:12 UTC 2012
commit 64eb6501345eacdfd8da6e9c33cf13eb368ef527
Author: Ray Strode <rstrode at redhat.com>
Date: Thu Feb 9 13:33:03 2012 -0500
Fix crasher bug
The systemd multi-seat patch has a crasher.
gdm.spec | 2 +-
multi-seat.patch | 33 +++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/gdm.spec b/gdm.spec
index fdd64fd..ca70e23 100644
--- a/gdm.spec
+++ b/gdm.spec
@@ -14,7 +14,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 3.2.1.1
-Release: 11%{?dist}
+Release: 12%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
diff --git a/multi-seat.patch b/multi-seat.patch
index b966da6..c92facd 100644
--- a/multi-seat.patch
+++ b/multi-seat.patch
@@ -2370,3 +2370,36 @@ index f7fac33..59bccd1 100644
--
1.7.9
+From 4c80969a0f8667d9a17ae44281cacb939e9f1a21 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode at redhat.com>
+Date: Thu, 9 Feb 2012 13:27:11 -0500
+Subject: [PATCH] slave: fix crasher in systemd integration
+
+sd_seat_get_sessions returns NULL instead of a one
+element array in the case there are no sessions
+associated with a seat.
+
+This commit guards against that problem.
+---
+ daemon/gdm-slave.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
+index 371b9bd..d864a3d 100644
+--- a/daemon/gdm-slave.c
++++ b/daemon/gdm-slave.c
+@@ -1336,6 +1336,11 @@ gdm_slave_get_primary_session_id_for_user_from_systemd (GdmSlave *slave,
+ return NULL;
+ }
+
++ if (sessions == NULL) {
++ g_debug ("GdmSlave: seat has no active sessions");
++ return NULL;
++ }
++
+ for (i = 0; sessions[i] != NULL; i++) {
+
+ if (primary_ssid == NULL) {
+--
+1.7.9
+
More information about the scm-commits
mailing list