mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Add in initgroups call to drop root's groups.
svn:r17279
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user