summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2014-09-24 20:02:54 +0200
committerJulian Andres Klode <jak@debian.org>2014-09-24 20:02:54 +0200
commit3b084f06b65ea073176b26fd9e472dc0f76b44b0 (patch)
treec88a5107f23b861c22bb1eb3f16e88c1b26e5056
parenteed65c79322c3c79facdea44ce39033b21972e36 (diff)
DropPrivs: Do not use an invalid return check for setgroups()
setgroups() returns 0 on success Git-Dch: ignore
-rw-r--r--apt-pkg/contrib/fileutl.cc2
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)