diff options
author | Matthieu Patou <mat@matws.net> | 2010-06-14 02:14:48 +0400 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-06-20 00:43:09 +0200 |
commit | aea0003d088f5e5f7d1393d4d75f570418dda043 (patch) | |
tree | 0323c76c9e3dbd9be99dba785e9d143e920edd8e /source4/scripting/python | |
parent | 17af115de59fc3b52134a44ae1b0c5170b8f67e3 (diff) | |
download | samba-aea0003d088f5e5f7d1393d4d75f570418dda043.tar.gz samba-aea0003d088f5e5f7d1393d4d75f570418dda043.tar.bz2 samba-aea0003d088f5e5f7d1393d4d75f570418dda043.zip |
s4 upgradeprovision: Emit message instead of crashing when not able to set acl
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rwxr-xr-x | source4/scripting/python/samba/upgradehelpers.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/upgradehelpers.py b/source4/scripting/python/samba/upgradehelpers.py index 1d02094d0d..78e23a2f87 100755 --- a/source4/scripting/python/samba/upgradehelpers.py +++ b/source4/scripting/python/samba/upgradehelpers.py @@ -637,12 +637,18 @@ def update_gpo(paths, samdb, names, lp, message, force=0): create_gpo_struct(dir) # We always reinforce acls on GPO folder because they have to be in sync # with the one in DS - set_gpo_acl(paths.sysvol, names.dnsdomain, names.domainsid, - names.domaindn, samdb, lp) + try: + set_gpo_acl(paths.sysvol, names.dnsdomain, names.domainsid, + names.domaindn, samdb, lp) + except TypeError, e: + message(ERROR, "Unable to set ACLs on policies related objects, if not using posix:eadb, you must be root to do it") if resetacls: - setsysvolacl(samdb, paths.netlogon, paths.sysvol, names.wheel_gid, - names.domainsid, names.dnsdomain, names.domaindn, lp) + try: + setsysvolacl(samdb, paths.netlogon, paths.sysvol, names.wheel_gid, + names.domainsid, names.dnsdomain, names.domaindn, lp) + except TypeError, e: + message(ERROR, "Unable to set ACLs on sysvol share, if not using posix:eadb, you must be root to do it") def delta_update_basesamdb(refsam, sam, creds, session, lp, message): """Update the provision container db: sam.ldb |