From c8e414748a6682ca35ec3c3fb389c6adae9479db Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 2 Nov 2006 00:40:11 +0000 Subject: [PATCH] Fixed to work with the latest xattr.diff. --- fake-super.diff | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/fake-super.diff b/fake-super.diff index 0f45051..e8a078a 100644 --- a/fake-super.diff +++ b/fake-super.diff @@ -449,7 +449,7 @@ above: typedef struct { char *name; char *datum; -@@ -132,9 +135,15 @@ static int rsync_xal_get(const char *fna +@@ -134,9 +137,15 @@ static int rsync_xal_get(const char *fna if (name_size == 0) return 0; for (left = name_size, name = namebuf; left > 0 ; left -= len, name += len) { @@ -466,7 +466,7 @@ above: datum_size = sys_lgetxattr(fname, name, NULL, 0); if (datum_size < 0) { if (errno == ENOTSUP) -@@ -287,10 +296,19 @@ void receive_xattr(struct file_struct *f +@@ -288,6 +297,14 @@ void receive_xattr(struct file_struct *f out_of_memory("receive_xattr"); read_buf(f, ptr, name_len); read_buf(f, ptr + name_len, datum_len); @@ -481,12 +481,7 @@ above: rxa->name_len = name_len; rxa->datum_len = datum_len; rxa->name = ptr; - rxa->datum = ptr + name_len; -+ - #ifdef HAVE_OSX_XATTRS - if (strncmp(rxa->name, UNIQUE_PREFIX, UPRE_LEN) == 0) { - rxa->name_len -= UPRE_LEN; -@@ -372,4 +390,146 @@ int set_xattr(const char *fname, const s +@@ -373,4 +390,146 @@ int set_xattr(const char *fname, const s return rsync_xal_set(fname, lst + ndx); /* TODO: This needs to return 1 if no xattrs changed! */ } @@ -595,7 +590,7 @@ above: + to_wire_mode(file->mode) & (_S_IFMT|CHMOD_BITS), + (int)major(rdev), (int)minor(rdev), + (int)file->uid, (int)file->gid); -+ if (sys_lsetxattr(fname, FAKE_XATTR, buf, len, 0) < 0) { ++ if (sys_lsetxattr(fname, FAKE_XATTR, buf, len) < 0) { + if (errno == EPERM && S_ISLNK(fst.st_mode)) + return 0; + rsyserr(FERROR, errno, -- 2.34.1