diff options
Diffstat (limited to 'python')
-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 fc9e0bed75c..0acd6f43408 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: |