From e616f8f9b56af82902c7df80a6e4347bbb80367d Mon Sep 17 00:00:00 2001 From: Mike Perry Date: Sun, 16 Nov 2008 07:26:46 +0000 Subject: [PATCH] Add in initgroups call to drop root's groups. svn:r17279 --- contrib/linux-tor-prio.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/linux-tor-prio.sh b/contrib/linux-tor-prio.sh index d03b470ca..ea9e0ddaa 100644 --- a/contrib/linux-tor-prio.sh +++ b/contrib/linux-tor-prio.sh @@ -23,6 +23,7 @@ # # #include # int main(int argc, char **argv) { +# if(initgroups("tor", GID) == -1) { perror("initgroups"); return 1; } # if(setresgid(GID, GID, GID) == -1) { perror("setresgid"); return 1; } # if(setresuid(UID, UID, UID) == -1) { perror("setresuid"); return 1; } # execl("/bin/tor", "/bin/tor", "-f", "/etc/tor/torrc", NULL);