aboutsummaryrefslogtreecommitdiffstats
path: root/rsync.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2009-09-12 09:27:07 -0700
committerWayne Davison <wayned@samba.org>2009-09-12 09:27:07 -0700
commitee1c00fea8647356e403368fad9ad4c909e9ef08 (patch)
treeeae7a614d05e6ca49d0244bf7f337302f8cb58ff /rsync.c
parent1b502f3ec234bf1045c6bb146f64734d09e81956 (diff)
downloadandroid_external_rsync-ee1c00fea8647356e403368fad9ad4c909e9ef08.tar.gz
android_external_rsync-ee1c00fea8647356e403368fad9ad4c909e9ef08.tar.bz2
android_external_rsync-ee1c00fea8647356e403368fad9ad4c909e9ef08.zip
Pass "new_mode" to set_acl() and change its return values.
Diffstat (limited to 'rsync.c')
-rw-r--r--rsync.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rsync.c b/rsync.c
index db7abcc5..c84e8e8d 100644
--- a/rsync.c
+++ b/rsync.c
@@ -497,8 +497,10 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp,
* If set_acl() changes permission bits in the process of setting
* an access ACL, it changes sxp->st.st_mode so we know whether we
* need to chmod(). */
- if (preserve_acls && !S_ISLNK(new_mode) && set_acl(fname, file, sxp) == 0)
- updated = 1;
+ if (preserve_acls && !S_ISLNK(new_mode)) {
+ if (set_acl(fname, file, sxp, new_mode) > 0)
+ updated = 1;
+ }
#endif
#ifdef HAVE_CHMOD