mirror of
https://github.com/samba-team/samba.git
synced 2025-01-04 05:18:06 +03:00
s4 upgradeprovision: fix whitespaces
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
62a32975c8
commit
6c51b3a432
@ -320,7 +320,7 @@ def handle_special_case(att, delta, new, old, usn):
|
|||||||
delta.remove(att)
|
delta.remove(att)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if (att in ("gPLink", "gPCFileSysPath") and
|
if (att in ("gPLink", "gPCFileSysPath") and
|
||||||
flag == FLAG_MOD_REPLACE and
|
flag == FLAG_MOD_REPLACE and
|
||||||
str(new[0].dn).lower() == str(old[0].dn).lower()):
|
str(new[0].dn).lower() == str(old[0].dn).lower()):
|
||||||
delta.remove(att)
|
delta.remove(att)
|
||||||
@ -530,8 +530,8 @@ def add_missing_object(ref_samdb, samdb, dn, names, basedn, hash, index):
|
|||||||
depend_on_yet_tobecreated = check_dn_nottobecreated(hash, index,
|
depend_on_yet_tobecreated = check_dn_nottobecreated(hash, index,
|
||||||
delta.get(str(att)))
|
delta.get(str(att)))
|
||||||
if depend_on_yet_tobecreated is not None:
|
if depend_on_yet_tobecreated is not None:
|
||||||
message(CHANGE, "Object %s depends on %s in attribute %s,"
|
message(CHANGE, "Object %s depends on %s in attribute %s,"
|
||||||
"delaying the creation" % (dn,
|
"delaying the creation" % (dn,
|
||||||
depend_on_yet_tobecreated, att))
|
depend_on_yet_tobecreated, att))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -827,16 +827,16 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid):
|
|||||||
if attrUSN == -1:
|
if attrUSN == -1:
|
||||||
# This attribute was last modified by another DC forget
|
# This attribute was last modified by another DC forget
|
||||||
# about it
|
# about it
|
||||||
message(CHANGE, "%sAttribute: %s has been"
|
message(CHANGE, "%sAttribute: %s has been"
|
||||||
"created/modified/deleted by another DC,"
|
"created/modified/deleted by another DC,"
|
||||||
" do nothing" % (txt, att ))
|
" do nothing" % (txt, att ))
|
||||||
txt = ""
|
txt = ""
|
||||||
delta.remove(att)
|
delta.remove(att)
|
||||||
continue
|
continue
|
||||||
elif not usn_in_range(int(attrUSN), usns):
|
elif not usn_in_range(int(attrUSN), usns):
|
||||||
message(CHANGE, "%sAttribute: %s has been"
|
message(CHANGE, "%sAttribute: %s has been"
|
||||||
"created/modified/deleted not during a"
|
"created/modified/deleted not during a"
|
||||||
" provision or upgradeprovision: current"
|
" provision or upgradeprovision: current"
|
||||||
" usn %d , do nothing" % (txt, att, attrUSN))
|
" usn %d , do nothing" % (txt, att, attrUSN))
|
||||||
txt = ""
|
txt = ""
|
||||||
delta.remove(att)
|
delta.remove(att)
|
||||||
@ -845,13 +845,13 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid):
|
|||||||
if att == "defaultSecurityDescriptor":
|
if att == "defaultSecurityDescriptor":
|
||||||
defSDmodified = True
|
defSDmodified = True
|
||||||
if attrUSN:
|
if attrUSN:
|
||||||
message(CHANGE, "%sAttribute: %s will be modified"
|
message(CHANGE, "%sAttribute: %s will be modified"
|
||||||
"/deleted it was last modified"
|
"/deleted it was last modified"
|
||||||
"during a provision, current usn:"
|
"during a provision, current usn:"
|
||||||
"%d" % (txt, att, attrUSN))
|
"%d" % (txt, att, attrUSN))
|
||||||
txt = ""
|
txt = ""
|
||||||
else:
|
else:
|
||||||
message(CHANGE, "%sAttribute: %s will be added because"
|
message(CHANGE, "%sAttribute: %s will be added because"
|
||||||
" it hasn't existed before " % (txt, att))
|
" it hasn't existed before " % (txt, att))
|
||||||
txt = ""
|
txt = ""
|
||||||
continue
|
continue
|
||||||
@ -893,7 +893,7 @@ def update_present(ref_samdb, samdb, basedn, listPresent, usns, invocationid):
|
|||||||
delta.dn = dn
|
delta.dn = dn
|
||||||
if len(delta.items()) >1:
|
if len(delta.items()) >1:
|
||||||
attributes=", ".join(delta.keys())
|
attributes=", ".join(delta.keys())
|
||||||
message(CHANGE, "%s is different from the reference one, changed"
|
message(CHANGE, "%s is different from the reference one, changed"
|
||||||
" attributes: %s\n" % (dn, attributes))
|
" attributes: %s\n" % (dn, attributes))
|
||||||
changed += 1
|
changed += 1
|
||||||
samdb.modify(delta)
|
samdb.modify(delta)
|
||||||
@ -1073,7 +1073,7 @@ def rebuild_sd(samdb, names):
|
|||||||
controls=["search_options:1:2"])
|
controls=["search_options:1:2"])
|
||||||
for obj in res:
|
for obj in res:
|
||||||
if not (str(obj["dn"]) == str(names.rootdn) or
|
if not (str(obj["dn"]) == str(names.rootdn) or
|
||||||
str(obj["dn"]) == str(names.configdn) or
|
str(obj["dn"]) == str(names.configdn) or
|
||||||
str(obj["dn"]) == str(names.schemadn)):
|
str(obj["dn"]) == str(names.schemadn)):
|
||||||
hash[str(obj["dn"])] = obj["whenCreated"]
|
hash[str(obj["dn"])] = obj["whenCreated"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user