diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-12 19:17:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-13 10:41:29 -0400 |
commit | 7f654a6a6fb5e956b996eece36ff95e590a6ad63 (patch) | |
tree | c9545f5af482e1380261a2fe7ba2e73b175b3b66 /src/or/control.c | |
parent | dad12188a6ca957f6fde1eb602fd98b2fa93b1a4 (diff) | |
download | tor-7f654a6a6fb5e956b996eece36ff95e590a6ad63.tar.gz tor-7f654a6a6fb5e956b996eece36ff95e590a6ad63.zip |
Add a ControlPortFileGroupWritable option
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c index 634674233c..384e579f93 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -542,6 +542,14 @@ control_ports_write_to_file(void) log_warn(LD_CONTROL, "Writing %s failed: %s", options->ControlPortWriteToFile, strerror(errno)); } +#ifndef MS_WINDOWS + if (options->ControlPortFileGroupReadable) { + if (chmod(options->ControlPortWriteToFile, 0640)) { + log_warn(LD_FS,"Unable to make %s group-readable.", + options->ControlPortWriteToFile); + } + } +#endif tor_free(joined); SMARTLIST_FOREACH(lines, char *, cp, tor_free(cp)); smartlist_free(lines); |