Commit 3fe82d3a authored by owsla's avatar owsla

Don't backup Windows ACLs if the --no-acls option is specified.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@947 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 8c424415
New in v1.2.2 (????/??/??) 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 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 SMB share. Improve test in fs_abilities to determine if Windows ACLs are
supported. (Andrew Ferguson) supported. (Andrew Ferguson)
......
...@@ -157,7 +157,9 @@ def parse_cmdlineoptions(arglist): ...@@ -157,7 +157,9 @@ def parse_cmdlineoptions(arglist):
elif opt == "--max-file-size": select_opts.append((opt, arg)) elif opt == "--max-file-size": select_opts.append((opt, arg))
elif opt == "--min-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 == "--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-carbonfile": Globals.set("carbonfile_active", 0)
elif opt == "--no-compare-inode": Globals.set("compare_inode", 0) elif opt == "--no-compare-inode": Globals.set("compare_inode", 0)
elif opt == "--no-compression": Globals.set("compression", None) elif opt == "--no-compression": Globals.set("compression", None)
......
...@@ -266,6 +266,12 @@ class FSAbilities: ...@@ -266,6 +266,12 @@ class FSAbilities:
"""Set self.acls based on rp. Does not write. Needs to be local""" """Set self.acls based on rp. Does not write. Needs to be local"""
assert Globals.local_connection is rp.conn assert Globals.local_connection is rp.conn
assert rp.lstat() 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 try: import posix1e
except ImportError: except ImportError:
log.Log("Unable to import module posix1e from pylibacl " log.Log("Unable to import module posix1e from pylibacl "
...@@ -379,6 +385,12 @@ class FSAbilities: ...@@ -379,6 +385,12 @@ class FSAbilities:
"""Test if windows access control lists are supported""" """Test if windows access control lists are supported"""
assert Globals.local_connection is dir_rp.conn assert Globals.local_connection is dir_rp.conn
assert dir_rp.lstat() 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: try:
import win32security, pywintypes import win32security, pywintypes
except ImportError: except ImportError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment