diff options
author | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-10-07 23:45:42 +0000 |
---|---|---|
committer | owsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2008-10-07 23:45:42 +0000 |
commit | b9128911b8f9b4d330c5e4760e6671aef385b96c (patch) | |
tree | c9dffeb1e3ffe1ed1375e7bd8ea5802dcde7bed5 /rdiff-backup | |
parent | 52e39f5d839e0957f6bc716cbef28cc3e51f43df (diff) | |
download | rdiff-backup-b9128911b8f9b4d330c5e4760e6671aef385b96c.tar.gz |
Don't backup Windows ACLs if the --no-acls option is specified.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@947 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup')
-rw-r--r-- | rdiff-backup/CHANGELOG | 3 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/Main.py | 4 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/fs_abilities.py | 12 |
3 files changed, 18 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index fbb6932..e2f54b0 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,9 @@ New in v1.2.2 (????/??/??) --------------------------- +Don't backup Windows ACLs if the --no-acls option is specified. Thanks to +Richard Metzger for reporting the issue. (Andrew Ferguson) + Add error handling and logging to Windows ACL support; fixes Windows backup to SMB share. Improve test in fs_abilities to determine if Windows ACLs are supported. (Andrew Ferguson) diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index 6e050c0..a286842 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -157,7 +157,9 @@ def parse_cmdlineoptions(arglist): elif opt == "--max-file-size": select_opts.append((opt, arg)) elif opt == "--min-file-size": select_opts.append((opt, arg)) elif opt == "--never-drop-acls": Globals.set("never_drop_acls", 1) - elif opt == "--no-acls": Globals.set("acls_active", 0) + elif opt == "--no-acls": + Globals.set("acls_active", 0) + Globals.set("win_acls_active", 0) elif opt == "--no-carbonfile": Globals.set("carbonfile_active", 0) elif opt == "--no-compare-inode": Globals.set("compare_inode", 0) elif opt == "--no-compression": Globals.set("compression", None) diff --git a/rdiff-backup/rdiff_backup/fs_abilities.py b/rdiff-backup/rdiff_backup/fs_abilities.py index 3a3f32b..eae41c1 100644 --- a/rdiff-backup/rdiff_backup/fs_abilities.py +++ b/rdiff-backup/rdiff_backup/fs_abilities.py @@ -266,6 +266,12 @@ class FSAbilities: """Set self.acls based on rp. Does not write. Needs to be local""" assert Globals.local_connection is rp.conn assert rp.lstat() + if Globals.acls_active == 0: + log.Log("POSIX ACLs test skipped. rdiff-backup run " + "with --no-acls option.", 4) + self.acls = 0 + return + try: import posix1e except ImportError: log.Log("Unable to import module posix1e from pylibacl " @@ -379,6 +385,12 @@ class FSAbilities: """Test if windows access control lists are supported""" assert Globals.local_connection is dir_rp.conn assert dir_rp.lstat() + if Globals.win_acls_active == 0: + log.Log("Windows ACLs test skipped. rdiff-backup run " + "with --no-acls option.", 4) + self.win_acls = 0 + return + try: import win32security, pywintypes except ImportError: |