- Fix --acls with --delete

Submitted by:	Gary <gary@mups.co.uk>
Obtained from:	http://lists.samba.org/archive/rsync/2006-November/016706.html
This commit is contained in:
Pav Lucistnik 2007-04-09 13:55:32 +00:00
parent c1c2c1cd85
commit d5f3f67cf4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=189566
2 changed files with 27 additions and 3 deletions

View file

@ -60,10 +60,8 @@ EXTRA_PATCHES+= ${WRKSRC}/patches/flags.diff
.endif
.if defined(WITH_ACLSP)
.if ${OSVERSION} >= 500000
EXTRA_PATCHES+= ${WRKSRC}/patches/acls.diff
EXTRA_PATCHES+= ${PATCHDIR}/extra-patches-acls.diff ${WRKSRC}/patches/acls.diff
CONFIGURE_ARGS+=--enable-acl-support
.endif
.if defined(WITH_FLAGSP)
IGNORE= can't be built: Flags and ACLs patches can't be both enabled at the same time. Please rerun 'make config' and disable one of them

View file

@ -0,0 +1,26 @@
--- strip/patches/acls.diff.orig Tue Nov 7 05:41:54 2006
+++ strip/patches/acls.diff Mon Apr 9 15:50:06 2007
@@ -1399,7 +1399,7 @@
file->mode = tweak_mode(file->mode, chmod_modes);
+#ifdef SUPPORT_ACLS
-+ if (preserve_acls) {
++ if (preserve_acls && f >= 0) {
+ sx.st.st_mode = file->mode;
+ sx.acc_acl = sx.def_acl = NULL;
+ if (get_acl(fname, &sx) < 0)
@@ -1415,12 +1415,12 @@
flist->files[flist->count++] = file;
send_file_entry(file, f);
+#ifdef SUPPORT_ACLS
-+ if (preserve_acls)
++ if (preserve_acls && f >= 0)
+ send_acl(&sx, f);
+#endif
+ } else {
+#ifdef SUPPORT_ACLS
-+ if (preserve_acls)
++ if (preserve_acls && f >= 0)
+ free_acl(&sx);
+#endif
}