diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-05-29 18:38:17 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-05-29 18:38:17 +1000 |
commit | b7c8e020a6f7221d6d10f2dd7610a232edeedf83 (patch) | |
tree | c35a97723edc144c38d7fcc306404e63643ed6ab /source4/scripting/python | |
parent | ea039105b2b728c2a5713800c4c3165fc5f3e575 (diff) | |
download | samba-b7c8e020a6f7221d6d10f2dd7610a232edeedf83.tar.gz samba-b7c8e020a6f7221d6d10f2dd7610a232edeedf83.tar.bz2 samba-b7c8e020a6f7221d6d10f2dd7610a232edeedf83.zip |
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 24ae9a55ec326807afd8d5bfa0a422a6668bd7c3)
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/provision.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 4a9def8aa9..71c1ac3187 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -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) |