summaryrefslogtreecommitdiff
path: root/source4/scripting/bin
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-03-22 21:58:25 +1100
committerStefan Metzmacher <metze@samba.org>2013-03-25 13:25:30 +0100
commit30adf0cdbae6d9aaf2e72513d9c33267248f20c0 (patch)
tree938570ace85a6dcf2637eaf35614c8a38d98324f /source4/scripting/bin
parent5d42260eecfd4f26cc82637ce1bc989083c9eb9d (diff)
downloadsamba-30adf0cdbae6d9aaf2e72513d9c33267248f20c0.tar.gz
samba-30adf0cdbae6d9aaf2e72513d9c33267248f20c0.tar.bz2
samba-30adf0cdbae6d9aaf2e72513d9c33267248f20c0.zip
scripting: Fill the ProvisionNames hash with strings, not ldb.MessageElement or Dn
This avoids the need to fix it up again in samba_upgradedns. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Mar 25 13:25:30 CET 2013 on sn-devel-104
Diffstat (limited to 'source4/scripting/bin')
-rwxr-xr-xsource4/scripting/bin/samba_upgradedns16
1 files changed, 1 insertions, 15 deletions
diff --git a/source4/scripting/bin/samba_upgradedns b/source4/scripting/bin/samba_upgradedns
index f389ef7f4a..3c30090e0f 100755
--- a/source4/scripting/bin/samba_upgradedns
+++ b/source4/scripting/bin/samba_upgradedns
@@ -83,19 +83,6 @@ def find_bind_gid():
return None
-def fix_names(pnames):
- """Convert elements to strings from MessageElement
- """
- names = pnames
- names.rootdn = pnames.rootdn[0]
- names.domaindn = pnames.domaindn[0]
- names.configdn = pnames.configdn[0]
- names.schemadn = pnames.schemadn[0]
- names.root_gid = pnames.root_gid
- names.serverdn = str(pnames.serverdn)
- return names
-
-
def convert_dns_rdata(rdata, serial=1):
"""Convert resource records in dnsRecord format
"""
@@ -270,9 +257,8 @@ if __name__ == '__main__':
paths = get_paths(param, smbconf=lp.configfile)
paths.bind_gid = find_bind_gid()
ldbs = get_ldbs(paths, creds, system_session(), lp)
- pnames = find_provision_key_parameters(ldbs.sam, ldbs.secrets, ldbs.idmap,
+ names = find_provision_key_parameters(ldbs.sam, ldbs.secrets, ldbs.idmap,
paths, lp.configfile, lp)
- names = fix_names(pnames)
if names.domainlevel < DS_DOMAIN_FUNCTION_2003:
logger.error("Cannot create AD based DNS for OS level < 2003")