Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
1040ccaf
Commit
1040ccaf
authored
13 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Fix overwide lines in util.c
parent
8e5dfe42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/util.c
+8
-5
8 additions, 5 deletions
src/common/util.c
with
8 additions
and
5 deletions
src/common/util.c
+
8
−
5
View file @
1040ccaf
...
...
@@ -1677,11 +1677,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
;
...
...
@@ -1730,10 +1731,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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment