summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-11-29 19:46:59 +0100
committerKay Sievers <kay@vrfy.org>2013-11-29 19:46:59 +0100
commit197941a8d5d74d79ca45ae73ec114939a8e88244 (patch)
tree788c708c498bbe73a07578393534169848d16b7e
parent9bb058a1e050b786c72cbf0e96f6c5f57868cb23 (diff)
bus: do not fail if task information cannot be retrieved from /proc
-rw-r--r--src/libsystemd-bus/bus-creds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-bus/bus-creds.c b/src/libsystemd-bus/bus-creds.c
index 9518f02cd9..22f204fd93 100644
--- a/src/libsystemd-bus/bus-creds.c
+++ b/src/libsystemd-bus/bus-creds.c
@@ -643,10 +643,10 @@ int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid) {
return -ENOMEM;
r = read_one_line_file(p, &c->tid_comm);
- if (r < 0)
+ if (r < 0 && r != -ENOENT)
return r == -ENOENT ? -ESRCH : r;
-
- c->mask |= SD_BUS_CREDS_TID_COMM;
+ else if (r >= 0)
+ c->mask |= SD_BUS_CREDS_TID_COMM;
}
if (missing & (SD_BUS_CREDS_CGROUP|SD_BUS_CREDS_UNIT|SD_BUS_CREDS_USER_UNIT|SD_BUS_CREDS_SLICE|SD_BUS_CREDS_SESSION|SD_BUS_CREDS_OWNER_UID)) {