summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordgaudet <dgaudet@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-06-28 05:29:59 +0000
committerdgaudet <dgaudet@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-06-28 05:29:59 +0000
commite214547bd104a5853a9009f698b3b91b4c703455 (patch)
tree989ac6583bc6b97d0c2a8313741a2278a4bf108d
parent00bd818426e320be4190da43390a16d110b022cd (diff)
downloadrdiff-backup-e214547bd104a5853a9009f698b3b91b4c703455.tar.gz
debian bug#306798: SELinux security attributes can not be removed and
rdiff-backup should not fail when it fails to remove them from temp files. fix from Konrad Podloucky. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@595 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG5
-rw-r--r--rdiff-backup/rdiff_backup/eas_acls.py11
2 files changed, 15 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 0864161..f44ca35 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -19,6 +19,11 @@ moved to another device (and the inodes don't change).
bug#13475: correct an UpdateError when backing up hardlinks with EAs
and/or ACLs.
+debian bug#306798: SELinux security attributes can not be removed and
+rdiff-backup should not fail when it fails to remove them from temp
+files. fix from Konrad Podloucky.
+
+
New in v0.13.6 (2005/04/07)
---------------------------
diff --git a/rdiff-backup/rdiff_backup/eas_acls.py b/rdiff-backup/rdiff_backup/eas_acls.py
index abb8ece..aa87606 100644
--- a/rdiff-backup/rdiff_backup/eas_acls.py
+++ b/rdiff-backup/rdiff_backup/eas_acls.py
@@ -74,7 +74,16 @@ class ExtendedAttributes:
def clear_rp(self, rp):
"""Delete all the extended attributes in rpath"""
for name in rp.conn.xattr.listxattr(rp.path):
- rp.conn.xattr.removexattr(rp.path, name)
+ try:
+ rp.conn.xattr.removexattr(rp.path, name)
+ except IOError, exc:
+ # SELinux attributes cannot be removed, and we don't want
+ # to bail out or be too noisy at low log levels.
+ if exc[0] == errno.EACCES:
+ log.Log("Warning: unable to remove xattr %s from %s"
+ % (name, rp.path), 7)
+ continue
+ else: raise
def write_to_rp(self, rp):
"""Write extended attributes to rpath rp"""