From fa6ccbf42360cdd794ae3164b76e0cc8f0bd62de Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 29 Nov 2013 21:34:14 +0100 Subject: bus: do not fail if "comm" information cannot be retrieved from /proc --- src/libsystemd-bus/bus-creds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsystemd-bus') 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) { -- cgit v1.2.3-54-g00ecf