summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorSteven Hazel <sah@freehaven.net>2003-10-22 06:03:11 +0000
committerSteven Hazel <sah@freehaven.net>2003-10-22 06:03:11 +0000
commitb1eca56b77ba1316eb23587341319fbbe2bc6560 (patch)
tree1c38a5d88f170dd0aca2c221d9f2c8343258b304 /src/or/config.c
parent524d63ecc62cc6e1dcaafd0ec2ad507328415c19 (diff)
downloadtor-b1eca56b77ba1316eb23587341319fbbe2bc6560.tar.gz
tor-b1eca56b77ba1316eb23587341319fbbe2bc6560.zip
added User and Group options -- if you set them, tor will try to
setuid and setgid respectively, and die if it can't. (If the User option is set, tor will setgid to the user's gid as well.) This happens after the pidfile is created, so that in cases where tor needs to be root to work with the pidfile, it will at least be able to create it, although it won't be able to delete it. That sucks, but it's somewhat better than not being able to create the pidfile in the first place. svn:r652
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 8bc0e17ffa..c049b681fc 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -162,6 +162,8 @@ static void config_assign(or_options_t *options, struct config_line *list) {
config_compare(list, "ExitPolicy", CONFIG_TYPE_STRING, &options->ExitPolicy) ||
config_compare(list, "SocksBindAddress",CONFIG_TYPE_STRING,&options->SocksBindAddress) ||
config_compare(list, "ORBindAddress", CONFIG_TYPE_STRING, &options->ORBindAddress) ||
+ config_compare(list, "User", CONFIG_TYPE_STRING, &options->User) ||
+ config_compare(list, "Group", CONFIG_TYPE_STRING, &options->Group) ||
/* int options */
config_compare(list, "MaxConn", CONFIG_TYPE_INT, &options->MaxConn) ||