Commit 11d77f59 authored by Martin Pitt's avatar Martin Pitt
Browse files

Make sd_login_monitor_new() work for logind without systemd

parent be2d9a21
......@@ -37,6 +37,7 @@ systemd (204-9) UNRELEASED; urgency=medium
some syntax errors (Closes: #706221)
* Set default polling interval on removable devices as well, for kernels
which have "block" built in instead of being a module. (Closes: #713877)
* Make sd_login_monitor_new() work for logind without systemd.
[ Marco d'Itri ]
* preinst: check for all the system calls required by modern releases
......
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Sat, 26 Apr 2014 17:04:56 +0200
Subject: Make sd_login_monitor_new() work for logind without systemd
Fix sd_login_monitor_new() to not fail if there is no
/sys/fs/cgroup/systemd/machine; that only exists when running with systemd as
PID 1.
This patch does not apply to and can be dropped for >= 205.
Bug-Ubuntu: https://launchpad.net/bugs/1201180
---
src/login/sd-login.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/login/sd-login.c b/src/login/sd-login.c
index d0dc42f..511c18a 100644
--- a/src/login/sd-login.c
+++ b/src/login/sd-login.c
@@ -690,10 +690,13 @@ _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) {
return r;
k = inotify_add_watch(fd, p, IN_MOVED_TO|IN_CREATE|IN_DELETE);
+ /* when running logind without systemd as pid 1, this will fail */
+ /*
if (k < 0) {
close_nointr_nofail(fd);
return -errno;
}
+ */
good = true;
}
......@@ -50,3 +50,4 @@
0050-Load-sg-module-from-80-drivers.rules.patch
0051-Updates-to-default-device-permissions.patch
0052-Set-default-polling-interval-on-removable-devices-as.patch
0053-Make-sd_login_monitor_new-work-for-logind-without-sy.patch
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment