summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2014-02-05 15:40:59 +1300
committerKarolin Seeger <kseeger@samba.org>2014-07-15 12:46:13 +0200
commitb4904f606b025782712cb021fadbcb8d1ba4f808 (patch)
tree22d91f4ab8a011965c77eb2623aaca2cba8ef5bf /python
parent8892da9f4e4b3e15a78c3d9b55de508b7ed8cc68 (diff)
downloadsamba-b4904f606b025782712cb021fadbcb8d1ba4f808.tar.gz
provision: capture slightly less generic exceptions during the test for acls
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> (cherry picked from commit f279a297a4a94c5cbc049c9b2cde14b02960a76f) The last 4 patches address bug #10703 - backport provision fixes from master.
Diffstat (limited to 'python')
-rw-r--r--python/samba/provision/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py
index fa4f7c717a8..fb7da9dcbf3 100644
--- a/python/samba/provision/__init__.py
+++ b/python/samba/provision/__init__.py
@@ -1540,7 +1540,7 @@ def setsysvolacl(samdb, netlogon, sysvol, uid, gid, domainsid, dnsdomain,
try:
try:
smbd.set_simple_acl(file.name, 0755, gid)
- except Exception:
+ except OSError:
if not smbd.have_posix_acls():
# This clue is only strictly correct for RPM and
# Debian-like Linux systems, but hopefully other users
@@ -1552,7 +1552,7 @@ def setsysvolacl(samdb, netlogon, sysvol, uid, gid, domainsid, dnsdomain,
"Try the mounting the filesystem with the 'acl' option.")
try:
smbd.chown(file.name, uid, gid)
- except Exception:
+ except OSError:
raise ProvisioningError("Unable to chown a file on your filesystem. "
"You may not be running provision as root.")
finally: