summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/rpath.py
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-09-18 02:10:14 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-09-18 02:10:14 +0000
commitbfd24043e3f728e960cf8c8829df36d799505106 (patch)
treec17ceb5abdb684d868e77f38780a4a523ada322d /rdiff-backup/rdiff_backup/rpath.py
parent70b97a3bc174351ff9a3044414c2699070304488 (diff)
downloadrdiff-backup-bfd24043e3f728e960cf8c8829df36d799505106.tar.gz
Added --never-drop-acls, ACL entry dropping. Final for 0.13.2
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@442 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/rpath.py')
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index de2d2f7..a834c5c 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -179,8 +179,7 @@ def copy_attribs_inc(rpin, rpout):
if rpin.isdir() and not rpout.isdir():
rpout.chmod(rpin.getperms() & 0777)
else: rpout.chmod(rpin.getperms())
- if Globals.write_acls and not (rpin.isdir() and not rpout.isdir()):
- rpout.write_acl(rpin.get_acl())
+ if Globals.write_acls: rpout.write_acl(rpin.get_acl(), map_names = 0)
if not rpin.isdev(): rpout.setmtime(rpin.getmtime())
def cmp_attribs(rp1, rp2):
@@ -302,7 +301,8 @@ class RORPath:
not Globals.compare_inode or
not Globals.preserve_hardlinks)): pass
elif (not other.data.has_key(key) or
- self.data[key] != other.data[key]): return None
+ self.data[key] != other.data[key]):
+ return None
return 1
def equal_loose(self, other):
@@ -1035,9 +1035,13 @@ class RPath(RORPath):
except KeyError: acl = self.data['acl'] = acl_get(self)
return acl
- def write_acl(self, acl):
- """Change access control list of rp"""
- acl.write_to_rp(self)
+ def write_acl(self, acl, map_names = 1):
+ """Change access control list of rp
+
+ If map_names is true, map the ids in acl by user/group names.
+
+ """
+ acl.write_to_rp(self, map_names)
self.data['acl'] = acl
def get_ea(self):