浏览代码

Add in initgroups call to drop root's groups.


svn:r17279
Mike Perry 15 年之前
父节点
当前提交
e616f8f9b5
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      contrib/linux-tor-prio.sh

+ 1 - 0
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);