]> arthur.barton.de Git - bup.git/commitdiff
Add initial (trivial) root-only ACL metadata tests and fix exposed bugs.
authorRob Browning <rlb@defaultvalue.org>
Tue, 25 Jan 2011 04:40:10 +0000 (22:40 -0600)
committerRob Browning <rlb@defaultvalue.org>
Tue, 25 Jan 2011 04:51:00 +0000 (22:51 -0600)
In metadata.py, call ACL constructor with file keyword argument, and
call _load_posix1e_acl_rec() instead of _load_posix1e_acl().

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/metadata.py
t/test-meta.sh

index a6b85f544bac6001d23b811309fbf7b0376f3f53..24f1c476b609e04fcd3c28e9617b8012904eb38a 100644 (file)
@@ -389,7 +389,7 @@ class Metadata:
         acl_reps = vint.unpack('ssss', data)
         if(acl_reps[2] == ''):
             acl_reps = acl_reps[:2]
-        self.posix1e_acl = [posix1e.ACL(x) for x in acl_reps]
+        self.posix1e_acl = [posix1e.ACL(text=x) for x in acl_reps]
 
     def _apply_posix1e_acl_rec(self, path, restore_numeric_ids=False):
         if(self.posix1e_acl):
@@ -507,7 +507,7 @@ class Metadata:
                 elif tag == _rec_tag_symlink_target:
                     result._load_symlink_target_rec(port)
                 elif tag == _rec_tag_posix1e_acl:
-                    result._load_posix1e_acl(port)
+                    result._load_posix1e_acl_rec(port)
                 elif tag ==_rec_tag_nfsv4_acl:
                     result._load_nfsv4_acl_rec(port)
                 elif tag == _rec_tag_linux_attr:
index a087b5393e4700f0a80b0babf93cb1f3a2cdfa24..9fd47b278a712bc24c60494fde5c60ec2193e70e 100755 (executable)
@@ -136,6 +136,17 @@ then
       attr -s foo -V bar testfs/src/bar
       (cd testfs && test-src-create-extract)
     )
+
+    # Test POSIX.1e ACLs.
+    force-delete testfs/src
+    mkdir testfs/src
+    (
+      touch testfs/src/foo
+      mkdir testfs/src/bar
+      setfacl -m u:root:r testfs/src/foo
+      setfacl -m u:root:r testfs/src/bar
+      (cd testfs && test-src-create-extract)
+    )
   )
 fi