1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

python/kcc: Write correct module list into the file during ldif_to_samdb

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2015-09-14 13:48:04 +12:00
parent 1c02f2801e
commit dadfffb519

View File

@ -70,9 +70,13 @@ def ldif_to_samdb(dburl, lp, ldif_file, forced_local_dsa=None):
changetype: modify
replace: dsServiceName
dsServiceName: CN=NTDS Settings,%s
-
""" % forced_local_dsa)
tmpdb.add_ldif("""dn: @MODULES
@LIST: rootdse,extended_dn_in,extended_dn_out_ldb
-
""")
except Exception, estr:
tmpdb.transaction_cancel()
raise LdifError("Failed to import %s: %s" % (ldif_file, estr))
@ -82,9 +86,7 @@ dsServiceName: CN=NTDS Settings,%s
# We have an abbreviated list of options here because we have built
# an abbreviated database. We use the rootdse and extended-dn
# modules only during this re-open
samdb = SamDB(url=dburl, session_info=system_session(), lp=lp,
options=["modules:rootdse,extended_dn_in,"
"extended_dn_out_ldb"])
samdb = SamDB(url=dburl, session_info=system_session(), lp=lp)
return samdb