tWorkaround for setregid failing when run through "fakeroot" - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d98efd380deaeec9e57bc9d28797da60ee4a324d
 (DIR) parent 8c0b5b5403bdb3c0e2d8ad13b48de29717127207
 (HTM) Author: Ben Webb <ben@salilab.org>
       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(-)
       ---
 (DIR) 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);
          }