From 8f58733ef16bdefe3cdb004bea986b6a0b893331 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 20 Aug 2004 15:47:58 +0000 Subject: [PATCH] * The gid should also match. --- src/libmain/shared.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index e0e9328dd..7917407bb 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -178,7 +178,7 @@ void switchToNixUser() #if SETUID_HACK /* Don't do anything if this is not a setuid binary. */ - if (getuid() == geteuid()) return; + if (getuid() == geteuid() && getgid() == getegid()) return; /* Here we set the uid and gid to the Nix user and group, respectively, IF the current (real) user is a member of the Nix