summaryrefslogtreecommitdiff
path: root/debian/patches/04-dont_fail_with_invalid_seats_file.patch
blob: 369eb4f3c46b082e323618565eda3a49ec3fd43b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Don't segfault if the seats file is invalid.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561106

Index: consolekit/src/ck-manager.c
===================================================================
--- consolekit.orig/src/ck-manager.c	2009-11-10 00:11:15.667744928 +0100
+++ consolekit/src/ck-manager.c	2010-01-12 13:38:58.750284485 +0100
@@ -2434,6 +2434,10 @@
 
         seat = ck_seat_new_from_file (sid, filename);
 
+        if (seat == NULL) {
+                return;
+        }
+
         connect_seat_signals (manager, seat);
         if (!ck_seat_register (seat)) {
                 /* returns false if connection to bus fails */