summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-11-29 21:34:14 +0100
committerKay Sievers <kay@vrfy.org>2013-11-29 21:34:14 +0100
commitfa6ccbf42360cdd794ae3164b76e0cc8f0bd62de (patch)
treef8526f90f130fc9290583928ee18c33fae4981ad /src
parentc6dfb87f1d6c87c51dd06ebccb6776443c906441 (diff)
bus: do not fail if "comm" information cannot be retrieved from /proc
Diffstat (limited to 'src')
-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 22f204fd93..ea7b1ce1f9 100644
--- a/src/libsystemd-bus/bus-creds.c
+++ b/src/libsystemd-bus/bus-creds.c
@@ -607,10 +607,10 @@ int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid) {
if (missing & SD_BUS_CREDS_COMM) {
r = get_process_comm(pid, &c->comm);
- if (r < 0)
+ if (r < 0 && r != -ESRCH)
return r;
-
- c->mask |= SD_BUS_CREDS_COMM;
+ else if (r >= 0)
+ c->mask |= SD_BUS_CREDS_COMM;
}
if (missing & SD_BUS_CREDS_EXE) {