diff options
author | Garming Sam <garming@catalyst.net.nz> | 2014-02-05 15:40:59 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-02-05 08:42:25 +0100 |
commit | f279a297a4a94c5cbc049c9b2cde14b02960a76f (patch) | |
tree | bde647c8220aa353496a5c0685820c595d0883ae | |
parent | ad773cc01435e65fa5d8e84758b0642069e96c40 (diff) | |
download | samba-f279a297a4a94c5cbc049c9b2cde14b02960a76f.tar.gz samba-f279a297a4a94c5cbc049c9b2cde14b02960a76f.tar.xz samba-f279a297a4a94c5cbc049c9b2cde14b02960a76f.zip |
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>
-rw-r--r-- | python/samba/provision/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py index fc9e0bed75..0acd6f4340 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: |