From 3b084f06b65ea073176b26fd9e472dc0f76b44b0 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Sep 2014 20:02:54 +0200 Subject: [PATCH] DropPrivs: Do not use an invalid return check for setgroups() setgroups() returns 0 on success Git-Dch: ignore --- apt-pkg/contrib/fileutl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.45.2