diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2016-10-06 23:43:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-06 23:43:08 +0300 |
commit | 36264e0de596d9b0264ae08b53832495a78c779c (patch) | |
tree | 658b2caae552a9a7be6810dab6b44e653a89fef9 /src/basic/capability-util.c | |
parent | e057995bb1314a94ce460d8e5a2a20e73c0e2ad4 (diff) | |
parent | 97f0e76f18d322d29bcfbc4ab6bb9cd67a1cdd54 (diff) |
Merge pull request #4299 from poettering/variety
ioctl socket fixes, sd-bus error updates, resolved error addition, PAM stub process priv fix
Diffstat (limited to 'src/basic/capability-util.c')
-rw-r--r-- | src/basic/capability-util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/basic/capability-util.c b/src/basic/capability-util.c index f8db6e0212..c3de20a0e8 100644 --- a/src/basic/capability-util.c +++ b/src/basic/capability-util.c @@ -296,8 +296,9 @@ int drop_privileges(uid_t uid, gid_t gid, uint64_t keep_capabilities) { if (setresgid(gid, gid, gid) < 0) return log_error_errno(errno, "Failed to change group ID: %m"); - if (maybe_setgroups(0, NULL) < 0) - return log_error_errno(errno, "Failed to drop auxiliary groups list: %m"); + r = maybe_setgroups(0, NULL); + if (r < 0) + return log_error_errno(r, "Failed to drop auxiliary groups list: %m"); /* Ensure we keep the permitted caps across the setresuid() */ if (prctl(PR_SET_KEEPCAPS, 1) < 0) |