Package: systemd / 204-14~bpo70+1

Make-sd_login_monitor_new-work-for-logind-without-sy.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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;
         }