summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-creds.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-11-29 23:55:09 +0100
committerKay Sievers <kay@vrfy.org>2013-11-29 23:55:09 +0100
commit4efbd13a99ef545911df1fa43564486093948d47 (patch)
tree06b89b073a4af72bf10c741541ef062b9f4577b1 /src/libsystemd-bus/bus-creds.c
parentf252ff1742947afaf035ae133876a4e767ddeb7c (diff)
bus: revert attempts to make the integration-testing work
fa6ccbf42360cdd794ae3164b76e0cc8f0bd62de 197941a8d5d74d79ca45ae73ec114939a8e88244 547708f59edd73d98edcbe84e95b41f7b3321f3b
Diffstat (limited to 'src/libsystemd-bus/bus-creds.c')
-rw-r--r--src/libsystemd-bus/bus-creds.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsystemd-bus/bus-creds.c b/src/libsystemd-bus/bus-creds.c
index ea7b1ce1f9..eee108b0be 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 && r != -ESRCH)
+ if (r < 0)
return r;
- else if (r >= 0)
- c->mask |= SD_BUS_CREDS_COMM;
+
+ c->mask |= SD_BUS_CREDS_COMM;
}
if (missing & SD_BUS_CREDS_EXE) {
@@ -643,19 +643,19 @@ 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 && r != -ENOENT)
+ if (r < 0)
return r == -ENOENT ? -ESRCH : r;
- else if (r >= 0)
- c->mask |= SD_BUS_CREDS_TID_COMM;
+
+ 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)) {
r = cg_pid_get_path(NULL, pid, &c->cgroup);
- if (r < 0 && r != -ESRCH)
+ if (r < 0)
return r;
- else if (r >= 0)
- c->mask |= 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);
+
+ c->mask |= 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);
}
if (missing & SD_BUS_CREDS_AUDIT_SESSION_ID) {