tWorkaround for setregid failing when run through "fakeroot" - vaccinewars - be a doctor and try to vaccinate the world | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit d98efd380deaeec9e57bc9d28797da60ee4a324d | |
parent 8c0b5b5403bdb3c0e2d8ad13b48de29717127207 | |
Author: Ben Webb | |
Date: Fri, 1 Mar 2002 19:12:51 +0000 Workaround for setregid failing when run through "fakeroot" Diffstat: M src/serverside.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- | |
diff --git a/src/serverside.c b/src/serverside.c | |
t@@ -1736,7 +1736,9 @@ void CloseHighScoreFile() void DropPrivileges() { #ifndef CYGWIN - if (setregid(getgid(), getgid()) != 0) { + /* Ignore the error if we've ended up with (gid == egid) anyway */ + if (setregid(getgid(), getgid()) != 0 + && (getgid() != getegid())) { perror("setregid"); exit(1); } |