mirror of
https://github.com/samba-team/samba.git
synced 2025-12-06 16:23:49 +03:00
Print prefixMap in a human-readable format.
This should allow the prefixMap to be edited, until we find the right
way to autogenerate it.
Andrew Bartlett
(This used to be commit 24ae9a55ec)
This commit is contained in:
@@ -797,13 +797,17 @@ def setup_samdb(path, setup_path, session_info, credentials, lp,
|
||||
"EXTENSIBLEOBJECT": "# no objectClass: extensibleObject for local ldb"
|
||||
})
|
||||
message("Modifying schema container")
|
||||
|
||||
prefixmap = open(setup_path("prefixMap.txt"), 'r').read()
|
||||
|
||||
setup_modify_ldif(samdb,
|
||||
setup_path("provision_schema_basedn_modify.ldif"), {
|
||||
"SCHEMADN": names.schemadn,
|
||||
"NETBIOSNAME": names.netbiosname,
|
||||
"DEFAULTSITE": names.sitename,
|
||||
"CONFIGDN": names.configdn,
|
||||
"SERVERDN": names.serverdn
|
||||
"SERVERDN": names.serverdn,
|
||||
"PREFIXMAP_B64": b64encode(prefixmap)
|
||||
})
|
||||
|
||||
message("Setting up sam.ldb Samba4 schema")
|
||||
@@ -1389,12 +1393,16 @@ def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename):
|
||||
schema_data = open(setup_path("schema.ldif"), 'r').read()
|
||||
schema_data += open(setup_path("schema_samba4.ldif"), 'r').read()
|
||||
schema_data = substitute_var(schema_data, {"SCHEMADN": schemadn})
|
||||
prefixmap = open(setup_path("prefixMap.txt"), 'r').read()
|
||||
prefixmap = b64encode(prefixmap)
|
||||
|
||||
head_data = open(setup_path("provision_schema_basedn_modify.ldif"), 'r').read()
|
||||
head_data = substitute_var(head_data, {
|
||||
"SCHEMADN": schemadn,
|
||||
"NETBIOSNAME": netbiosname,
|
||||
"CONFIGDN": configdn,
|
||||
"DEFAULTSITE":sitename
|
||||
"DEFAULTSITE":sitename,
|
||||
"PREFIXMAP_B64":prefixmap
|
||||
})
|
||||
samdb.attach_schema_from_ldif(head_data, schema_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user