diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-06-20 15:28:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-06-20 15:28:16 -0400 |
commit | 997499369e8f2e022d2d923fa10e54a9370c1e1e (patch) | |
tree | 1e90fa6ff749f669e3120ed532c7611119adb02b /src/common/util.c | |
parent | 8b265543eb0f5fdda15fca882028fa95983fa919 (diff) | |
parent | 1040ccafb20d5d32cdf0945226f570dcbaf96e90 (diff) | |
download | tor-997499369e8f2e022d2d923fa10e54a9370c1e1e.tar.gz tor-997499369e8f2e022d2d923fa10e54a9370c1e1e.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/common/util.c b/src/common/util.c index 629c33977b..b95ee3a612 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1678,11 +1678,12 @@ file_status(const char *fname) * is group-readable, but in all cases we create the directory mode 0700. * If CPD_CHECK_MODE_ONLY is set, then we don't alter the directory permissions * if they are too permissive: we just return -1. - * When effective_user is not NULL, check permissions against the given user and - * its primary group. + * When effective_user is not NULL, check permissions against the given user + * and its primary group. */ int -check_private_dir(const char *dirname, cpd_check_t check, const char *effective_user) +check_private_dir(const char *dirname, cpd_check_t check, + const char *effective_user) { int r; struct stat st; @@ -1731,10 +1732,12 @@ check_private_dir(const char *dirname, cpd_check_t check, const char *effective_ } #ifndef MS_WINDOWS if (effective_user) { - /* Lookup the user and group information, if we have a problem, bail out. */ + /* Look up the user and group information. + * If we have a problem, bail out. */ pw = getpwnam(effective_user); if (pw == NULL) { - log_warn(LD_CONFIG, "Error setting configured user: %s not found", effective_user); + log_warn(LD_CONFIG, "Error setting configured user: %s not found", + effective_user); return -1; } running_uid = pw->pw_uid; |