Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0d6e308
)
If verbose > 2, mention it if we're setting the uid or the gid.
author
Wayne Davison
<wayned@samba.org>
Tue, 3 Feb 2004 20:00:35 +0000
(20:00 +0000)
committer
Wayne Davison
<wayned@samba.org>
Tue, 3 Feb 2004 20:00:35 +0000
(20:00 +0000)
rsync.c
patch
|
blob
|
blame
|
history
diff --git
a/rsync.c
b/rsync.c
index
df52b69
..
78fedab
100644
(file)
--- a/
rsync.c
+++ b/
rsync.c
@@
-158,6
+158,18
@@
int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st,
change_gid = preserve_gid && file->gid != GID_NONE
&& st->st_gid != file->gid;
if (change_uid || change_gid) {
change_gid = preserve_gid && file->gid != GID_NONE
&& st->st_gid != file->gid;
if (change_uid || change_gid) {
+ if (verbose > 2 && !dry_run) {
+ if (change_uid) {
+ rprintf(FINFO,
+ "set uid of %s from %ld to %ld\n",
+ fname, (long)st->st_uid, (long)file->uid);
+ }
+ if (change_gid) {
+ rprintf(FINFO,
+ "set gid of %s from %ld to %ld\n",
+ fname, (long)st->st_gid, (long)file->gid);
+ }
+ }
if (do_lchown(fname,
change_uid?file->uid:st->st_uid,
change_gid?file->gid:st->st_gid) != 0) {
if (do_lchown(fname,
change_uid?file->uid:st->st_uid,
change_gid?file->gid:st->st_gid) != 0) {