summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2010-01-12 13:47:31 +0100
committerMichael Biebl <biebl@debian.org>2010-01-12 13:47:31 +0100
commit402224153350646488ca5b4752159249af54dc31 (patch)
tree0e578d3165b3323333fb821786015cdc3b2bc5b7
parentdcab7108f7b22bc780c58d0f78dd20b780d97d8d (diff)
downloadconsolekit-402224153350646488ca5b4752159249af54dc31.tar.gz
Don't segfault when reading an invalid seats file
* debian/patches/04-dont_fail_with_invalid_seats_file.patch - Don't segfault when reading an invalid seats file and ck_seat_new_from_file returns NULL. (Closes: #561106)
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/04-dont_fail_with_invalid_seats_file.patch19
-rw-r--r--debian/patches/series1
3 files changed, 23 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 9cb59cd..bfe5a35 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,9 @@ consolekit (0.4.1-3) UNRELEASED; urgency=low
when being activated by a method call on the manager object, where
ConsoleKit gets started but the method call fails. (Closes: #561592)
Patch pulled from upstream Git.
+ * debian/patches/04-dont_fail_with_invalid_seats_file.patch
+ - Don't segfault when reading an invalid seats file and
+ ck_seat_new_from_file returns NULL. (Closes: #561106)
-- Michael Biebl <biebl@debian.org> Tue, 12 Jan 2010 10:46:57 +0100
diff --git a/debian/patches/04-dont_fail_with_invalid_seats_file.patch b/debian/patches/04-dont_fail_with_invalid_seats_file.patch
new file mode 100644
index 0000000..369eb4f
--- /dev/null
+++ b/debian/patches/04-dont_fail_with_invalid_seats_file.patch
@@ -0,0 +1,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 */
diff --git a/debian/patches/series b/debian/patches/series
index 85cb44d..081f7f2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@
01-dont_daemonize_when_activated.patch
02-dont_take_bus_name_until_ready.patch
03-cleanup_console_tags.patch
+04-dont_fail_with_invalid_seats_file.patch
80-gnukfreebsd_support_configure.ac.patch
82-hurd_support.patch
99-autoreconf.patch