mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-01 08:03:31 +01:00
Fix overwide lines in util.c
This commit is contained in:
parent
8e5dfe42a0
commit
1040ccafb2
@ -1677,11 +1677,12 @@ file_status(const char *fname)
|
|||||||
* is group-readable, but in all cases we create the directory mode 0700.
|
* 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 CPD_CHECK_MODE_ONLY is set, then we don't alter the directory permissions
|
||||||
* if they are too permissive: we just return -1.
|
* if they are too permissive: we just return -1.
|
||||||
* When effective_user is not NULL, check permissions against the given user and
|
* When effective_user is not NULL, check permissions against the given user
|
||||||
* its primary group.
|
* and its primary group.
|
||||||
*/
|
*/
|
||||||
int
|
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;
|
int r;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
@ -1730,10 +1731,12 @@ check_private_dir(const char *dirname, cpd_check_t check, const char *effective_
|
|||||||
}
|
}
|
||||||
#ifndef MS_WINDOWS
|
#ifndef MS_WINDOWS
|
||||||
if (effective_user) {
|
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);
|
pw = getpwnam(effective_user);
|
||||||
if (pw == NULL) {
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
running_uid = pw->pw_uid;
|
running_uid = pw->pw_uid;
|
||||||
|
Loading…
Reference in New Issue
Block a user