summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:20 +0100
committerMichal Schmidt <mschmidt@redhat.com>2015-11-09 20:01:06 +0100
commite1427b138fbf7b7f13bb61187635b882be3ca2b2 (patch)
treeb3ce451e25222b085aee42f70bcd8ae46386642b /src/basic
parentb3e3bb19a06795ee1eb3679a839f4687ba99143f (diff)
downloadsystemd-e1427b138fbf7b7f13bb61187635b882be3ca2b2.tar.gz
treewide: apply errno.cocci
with small manual cleanups for style.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/capability-util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/basic/capability-util.c b/src/basic/capability-util.c
index 4479200306..0eb5c03d65 100644
--- a/src/basic/capability-util.c
+++ b/src/basic/capability-util.c
@@ -278,10 +278,8 @@ int drop_privileges(uid_t uid, gid_t gid, uint64_t keep_capabilities) {
assert(keep_capabilities & (1ULL << (i - 1)));
if (cap_set_flag(d, CAP_EFFECTIVE, j, bits, CAP_SET) < 0 ||
- cap_set_flag(d, CAP_PERMITTED, j, bits, CAP_SET) < 0) {
- log_error_errno(errno, "Failed to enable capabilities bits: %m");
- return -errno;
- }
+ cap_set_flag(d, CAP_PERMITTED, j, bits, CAP_SET) < 0)
+ return log_error_errno(errno, "Failed to enable capabilities bits: %m");
if (cap_set_proc(d) < 0)
return log_error_errno(errno, "Failed to increase capabilities: %m");