diff options
author | Julian Andres Klode <jak@debian.org> | 2014-09-24 20:02:54 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2014-09-24 20:02:54 +0200 |
commit | 3b084f06b65ea073176b26fd9e472dc0f76b44b0 (patch) | |
tree | c88a5107f23b861c22bb1eb3f16e88c1b26e5056 /apt-pkg/contrib | |
parent | eed65c79322c3c79facdea44ce39033b21972e36 (diff) |
DropPrivs: Do not use an invalid return check for setgroups()
setgroups() returns 0 on success
Git-Dch: ignore
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 8e7313e8f..98544b60c 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -2196,7 +2196,7 @@ bool DropPrivs() _error->Warning("PR_SET_NO_NEW_PRIVS failed with %i", ret); #endif - if (setgroups(1, &pw->pw_gid) != 1) + if (setgroups(1, &pw->pw_gid)) return _error->Errno("setgroups", "Failed to setgroups"); if (setegid(pw->pw_gid) != 0) |