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
a60e2dca
Commit
a60e2dca
authored
Jan 03, 2004
by
J.W. Schultz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create GID_NONE for use gid test readability.
parent
86c4601e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
generator.c
generator.c
+3
-3
rsync.c
rsync.c
+1
-1
rsync.h
rsync.h
+2
-0
uidlist.c
uidlist.c
+2
-2
No files found.
generator.c
View file @
a60e2dca
...
...
@@ -54,14 +54,14 @@ static int skip_file(char *fname,
}
if
(
link_dest
)
{
if
(
preserve_perms
&&
(
st
->
st_mode
&
~
_S_IFMT
)
!=
(
file
->
mode
&
~
_S_IFMT
))
&&
(
st
->
st_mode
&
~
_S_IFMT
)
!=
(
file
->
mode
&
~
_S_IFMT
))
return
0
;
if
(
am_root
&&
preserve_uid
&&
st
->
st_uid
!=
file
->
uid
)
return
0
;
if
(
preserve_gid
&&
file
->
gid
!=
(
gid_t
)
-
1
&&
st
->
st_gid
!=
file
->
gid
)
if
(
preserve_gid
&&
file
->
gid
!=
GID_NONE
&&
st
->
st_gid
!=
file
->
gid
)
return
0
;
}
...
...
rsync.c
View file @
a60e2dca
...
...
@@ -152,7 +152,7 @@ int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st,
}
change_uid
=
am_root
&&
preserve_uid
&&
st
->
st_uid
!=
file
->
uid
;
change_gid
=
preserve_gid
&&
file
->
gid
!=
(
gid_t
)
-
1
change_gid
=
preserve_gid
&&
file
->
gid
!=
GID_NONE
&&
st
->
st_gid
!=
file
->
gid
;
if
(
change_uid
||
change_gid
)
{
if
(
do_lchown
(
fname
,
...
...
rsync.h
View file @
a60e2dca
...
...
@@ -362,6 +362,8 @@ enum logcode {FNONE=0, FERROR=1, FINFO=2, FLOG=3 };
#define IN_LOOPBACKNET 127
#endif
#define GID_NONE (gid_t) -1
struct
file_struct
{
unsigned
flags
;
time_t
modtime
;
...
...
uidlist.c
View file @
a60e2dca
...
...
@@ -160,7 +160,7 @@ static gid_t match_gid(gid_t gid)
if
(
am_root
)
last_out
=
gid
;
else
last_out
=
(
gid_t
)
-
1
;
last_out
=
GID_NONE
;
return
last_out
;
}
...
...
@@ -307,7 +307,7 @@ void recv_uid_list(int f, struct file_list *flist)
}
list
->
id2
=
map_gid
(
id
,
name
);
if
(
!
am_root
&&
!
is_in_group
(
list
->
id2
))
list
->
id2
=
(
gid_t
)
-
1
;
list
->
id2
=
GID_NONE
;
free
(
name
);
}
}
...
...
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