1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-06 08:59:08 +03:00

s4 upgradeprovision: Emit message instead of crashing when not able to set acl

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
This commit is contained in:
Matthieu Patou
2010-06-14 02:14:48 +04:00
committed by Jelmer Vernooij
parent 17af115de5
commit aea0003d08

View File

@ -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