author | jurikm |
Sun, 12 Feb 2012 14:04:10 +0000 | |
changeset 8245 | 383896da4129 |
parent 2340 | 7f12c218519a |
permissions | -rw-r--r-- |
--- ../old/maildrop-2.2.0/maildrop/main.C 2008-05-08 17:38:46.000000000 +0200 +++ maildrop-2.2.0/maildrop/main.C 2010-01-28 20:23:35.000000000 +0100 @@ -471,6 +471,10 @@ nouser(); #if RESET_GID setgroupid(my_pw->pw_gid); +#else + // Only change it if we're root + if (geteuid() == 0) + setgroupid(getegid()); #endif setuid(my_pw->pw_uid); if (getuid() != my_pw->pw_uid)