diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2008-11-16 07:26:46 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2008-11-16 07:26:46 +0000 |
commit | e616f8f9b56af82902c7df80a6e4347bbb80367d (patch) | |
tree | aa2ea1c8330ad84816bddd1bb314e725649b8c6a /contrib/linux-tor-prio.sh | |
parent | 6d7951c02231cc86006938bc01d23a5ac8b9c013 (diff) | |
download | tor-e616f8f9b56af82902c7df80a6e4347bbb80367d.tar.gz tor-e616f8f9b56af82902c7df80a6e4347bbb80367d.zip |
Add in initgroups call to drop root's groups.
svn:r17279
Diffstat (limited to 'contrib/linux-tor-prio.sh')
-rw-r--r-- | contrib/linux-tor-prio.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/linux-tor-prio.sh b/contrib/linux-tor-prio.sh index d03b470ca1..ea9e0ddaa5 100644 --- a/contrib/linux-tor-prio.sh +++ b/contrib/linux-tor-prio.sh @@ -23,6 +23,7 @@ # # #include <unistd.h> # 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); |