summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-06-14 02:14:48 +0400
committerJelmer Vernooij <jelmer@samba.org>2010-06-20 00:43:09 +0200
commitaea0003d088f5e5f7d1393d4d75f570418dda043 (patch)
tree0323c76c9e3dbd9be99dba785e9d143e920edd8e /source4/scripting
parent17af115de59fc3b52134a44ae1b0c5170b8f67e3 (diff)
downloadsamba-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')
-rwxr-xr-xsource4/scripting/python/samba/upgradehelpers.py14
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