From 07a7c8fa0d76cb7cb10cc88fb5bbe5439b746d01 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 13 Mar 2008 09:55:06 +1100 Subject: Update the provision scripts and selftest for LDAP This should allow us to provision onto an OpenLDAP backend again. Also ensure we always have a sysvol and netlogon share in the selftest environment. Andrew Bartlett (This used to be commit b2d9b03ba3434e76d4d476233a198728523d17f9) --- source4/scripting/python/samba/provision.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 2ede4b8d3d..f9604a84b2 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -1192,16 +1192,18 @@ def provision_backend(setup_dir=None, message=None, for i in range (0, len(res)): linkid = res[i]["linkID"][0] linkid = str(int(linkid) + 1) + expression = "(&(objectclass=attributeSchema)(linkID=" + (linkid) + "))" target = schemadb.searchone(basedn=names.schemadn, - expression="(&(objectclass=attributeSchema)(linkID=" + (linkid) + "))", - attribute="lDAPDisplayName"); + expression=expression, + attribute="lDAPDisplayName", + scope=SCOPE_SUBTREE); if target is not None: - refint_attributes = refint_attributes + " " + target + " " + res[i]["lDAPDisplayName"]; + refint_attributes = refint_attributes + " " + target + " " + res[i]["lDAPDisplayName"][0]; memberof_config = memberof_config + """overlay memberof memberof-dangling error memberof-refint TRUE memberof-group-oc top -memberof-member-ad """ + res[i]["lDAPDisplayName"] + """ +memberof-member-ad """ + res[i]["lDAPDisplayName"][0] + """ memberof-memberof-ad """ + target + """ memberof-dangling-error 32 @@ -1214,7 +1216,7 @@ refint_attributes""" + refint_attributes + "\n"; if os.path.exists(paths.memberofconf): os.unlink(paths.memberof.conf) - open(paths.memberofconf, 'w').write(memberof_config) + open(paths.memberofconf, 'w').write(memberof_config) ldapi_uri = "ldapi://" + urllib.quote(os.path.join(paths.private_dir, "ldap", "ldapi"), safe="") message("Start slapd with: slapd -f " + paths.ldapdir + "/slapd.conf -h " + ldapi_uri) -- cgit