Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
87629cf2
Commit
87629cf2
authored
Feb 07, 2008
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-indent some code in set_file_attrs() to make the flow clearer.
parent
e7f642cf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
rsync.c
rsync.c
+18
-18
No files found.
rsync.c
View file @
87629cf2
...
...
@@ -422,25 +422,25 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
fname
,
(
unsigned
)
sxp
->
st
.
st_gid
,
F_GROUP
(
file
));
}
}
if
(
am_root
<
0
)
{
;
}
else
if
(
do_lchown
(
fname
,
if
(
am_root
>=
0
)
{
if
(
do_lchown
(
fname
,
change_uid
?
(
uid_t
)
F_OWNER
(
file
)
:
sxp
->
st
.
st_uid
,
change_gid
?
(
gid_t
)
F_GROUP
(
file
)
:
sxp
->
st
.
st_gid
)
!=
0
)
{
/* shouldn't have attempted to change uid or g
id
* unless have the privilege
*/
/* We shouldn't have attempted to change u
id
* or gid unless have the privilege.
*/
rsyserr
(
FERROR_XFER
,
errno
,
"%s %s failed"
,
change_uid
?
"chown"
:
"chgrp"
,
full_fname
(
fname
));
goto
cleanup
;
}
else
/* a lchown had been done - we have to re-stat if the
* destination had the setuid or setgid bits set due
* to the side effect of the chown call
*/
}
/* A lchown had been done, so we need to re-stat if
* the destination had the setuid or setgid bits set
* (due to the side effect of the chown call).
*/
if
(
sxp
->
st
.
st_mode
&
(
S_ISUID
|
S_ISGID
))
{
link_stat
(
fname
,
&
sxp
->
st
,
keep_dirlinks
&&
S_ISDIR
(
sxp
->
st
.
st_mode
));
}
}
updated
=
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment