mirror of
https://github.com/samba-team/samba.git
synced 2025-08-05 12:22:11 +03:00
s4:upgradeprovision - remove some "recalculate_sd" uses
We need "recalculate_sd" only when no external "nTSecurityDescriptor" change is performed. Otherwise the recalculation is performed automatically. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sun Nov 7 18:52:42 UTC 2010 on sn-devel-104
This commit is contained in:
@ -1156,7 +1156,7 @@ def fix_partition_sd(samdb, names):
|
||||
descr = get_domain_descriptor(names.domainsid)
|
||||
delta["nTSecurityDescriptor"] = MessageElement(descr, FLAG_MOD_REPLACE,
|
||||
"nTSecurityDescriptor")
|
||||
samdb.modify(delta, ["recalculate_sd:0"])
|
||||
samdb.modify(delta)
|
||||
# Then the config dn
|
||||
res = samdb.search(expression="objectClass=*", base=str(names.configdn),
|
||||
scope=SCOPE_BASE, attrs=["dn", "whenCreated"],
|
||||
@ -1166,7 +1166,7 @@ def fix_partition_sd(samdb, names):
|
||||
descr = get_config_descriptor(names.domainsid)
|
||||
delta["nTSecurityDescriptor"] = MessageElement(descr, FLAG_MOD_REPLACE,
|
||||
"nTSecurityDescriptor" )
|
||||
samdb.modify(delta, ["recalculate_sd:0"])
|
||||
samdb.modify(delta)
|
||||
# Then the schema dn
|
||||
res = samdb.search(expression="objectClass=*", base=str(names.schemadn),
|
||||
scope=SCOPE_BASE, attrs=["dn", "whenCreated"],
|
||||
@ -1177,7 +1177,7 @@ def fix_partition_sd(samdb, names):
|
||||
descr = get_schema_descriptor(names.domainsid)
|
||||
delta["nTSecurityDescriptor"] = MessageElement(descr, FLAG_MOD_REPLACE,
|
||||
"nTSecurityDescriptor" )
|
||||
samdb.modify(delta, ["recalculate_sd:0"])
|
||||
samdb.modify(delta)
|
||||
|
||||
def rebuild_sd(samdb, names):
|
||||
"""Rebuild security descriptor of the current provision from scratch
|
||||
|
Reference in New Issue
Block a user