Reloading the full schema in upgradeprovision
Andrew Bartlett
abartlet at samba.org
Mon Jul 12 16:28:14 MDT 2010
On Tue, 2010-07-13 at 01:14 +0400, Matthieu Patou wrote:
> So I guess you want me to do this:
> diff --git a/source4/scripting/bin/upgradeprovision
> b/source4/scripting/bin/upgradeprovision
> index f72883d..46d5fe0 100755
> --- a/source4/scripting/bin/upgradeprovision
> +++ b/source4/scripting/bin/upgradeprovision
> @@ -943,8 +943,6 @@ def reload_full_schema(samdb, names):
>
> current = samdb.search(expression="objectClass=*",
> base=str(names.schemadn),
> scope=SCOPE_SUBTREE)
> - tmpldb = samba.samdb.SamDB(global_schema=False, am_rodc=False)
> -
> schema_ldif = ""
> prefixmap_data = ""
>
> @@ -958,8 +956,8 @@ def reload_full_schema(samdb, names):
> # We don't actually add this ldif, just parse it
> prefixmap_ldif = "dn: cn=schema\nprefixMap:: %s\n\n" % prefixmap_data
>
> - dsdb._dsdb_set_schema_from_ldif(tmpldb, prefixmap_ldif, schema_ldif)
> - samdb.set_schema_from_ldb(tmpldb)
> + dsdb._dsdb_set_schema_from_ldif(samdb, prefixmap_ldif, schema_ldif)
> + samdb.set_schema_from_ldb(samdb)
You don't need the samdb.set_schema_from_ldb(samdb) - the
_dsdb_set_schema_from_ldif has already done that.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100713/1f2b86cd/attachment.pgp>
More information about the samba-technical
mailing list