On Sat, Mar 01, 2008 at 06:10:21PM -0500, Robert DuToit wrote:
> Verifying:            bsd-flags ... FAIL
> Verifying:                 fifo ... FAIL
> Verifying:              devices ... FAIL

I'm attaching a patch that adds the *_APPEND changes I mentioned and
also a fix for the sending of devices and special files.

..wayne..
--- a/rsync.h
+++ b/rsync.h
@@ -469,8 +469,8 @@ typedef unsigned int size_t;
 #ifndef SF_NOUNLINK
 #define SF_NOUNLINK 0
 #endif
-#define USR_IMMUTABLE (UF_IMMUTABLE|UF_NOUNLINK)
-#define SYS_IMMUTABLE (SF_IMMUTABLE|SF_NOUNLINK)
+#define USR_IMMUTABLE (UF_IMMUTABLE|UF_NOUNLINK|UF_APPEND)
+#define SYS_IMMUTABLE (SF_IMMUTABLE|SF_NOUNLINK|SF_APPEND)
 #define ALL_IMMUTABLE (USR_IMMUTABLE|SYS_IMMUTABLE)
 #define ST_FLAGS(st) (st.st_flags)
 #else
--- a/xattrs.c
+++ b/xattrs.c
@@ -282,6 +282,10 @@ int get_xattr(const char *fname, stat_x *sxp)
 {
        sxp->xattr = new(item_list);
        *sxp->xattr = empty_xattr;
+
+       if (IS_SPECIAL(sxp->st.st_mode) || IS_DEVICE(sxp->st.st_mode))
+               return 0;
+
        if (rsync_xal_get(fname, sxp->xattr) < 0) {
                free_xattr(sxp);
                return -1;
@@ -799,6 +803,11 @@ int set_xattr(const char *fname, const struct file_struct 
*file,
                return -1;
        }
 
+       if (IS_SPECIAL(sxp->st.st_mode) || IS_DEVICE(sxp->st.st_mode)) {
+               errno = ENOTSUP;
+               return -1;
+       }
+
        ndx = F_XATTR(file);
        return rsync_xal_set(fname, lst + ndx, fnamecmp, sxp);
 }
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to