diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-07-04 11:06:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:59:06 -0500 |
commit | 3a78f7323a986703c9b7100f551b1c907a9e104b (patch) | |
tree | f2e07813d610d629e5e32f2740dce721a576c1de /source4 | |
parent | 4ace7950d4fbd074611865eee816e748c56b7b83 (diff) | |
download | samba-3a78f7323a986703c9b7100f551b1c907a9e104b.tar.gz samba-3a78f7323a986703c9b7100f551b1c907a9e104b.tar.bz2 samba-3a78f7323a986703c9b7100f551b1c907a9e104b.zip |
r23703: Start to get Samba4 to again work with LDAP backends, after I turned
on metze's schema work.
Andrew Bartlett
(This used to be commit 3111bbdf64f57bf8d2638fd9829c071dcfeb4af1)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb/modules/paged_searches.c | 3 | ||||
-rw-r--r-- | source4/scripting/libjs/provision.js | 6 | ||||
-rwxr-xr-x | source4/setup/provision | 15 | ||||
-rwxr-xr-x | source4/setup/provision-backend | 2 |
4 files changed, 14 insertions, 12 deletions
diff --git a/source4/lib/ldb/modules/paged_searches.c b/source4/lib/ldb/modules/paged_searches.c index f4a06e841f..2022c39286 100644 --- a/source4/lib/ldb/modules/paged_searches.c +++ b/source4/lib/ldb/modules/paged_searches.c @@ -412,6 +412,7 @@ static int ps_init(struct ldb_module *module) data = talloc(module, struct private_data); if (data == NULL) { + ldb_set_errstring(module->ldb, "Out of Memory"); return LDB_ERR_OTHER; } module->private_data = data; @@ -424,7 +425,7 @@ static int ps_init(struct ldb_module *module) } req->operation = LDB_SEARCH; - req->op.search.base = ldb_dn_new(req, module->ldb, NULL); + req->op.search.base = ldb_dn_new(req, module->ldb, ""); req->op.search.scope = LDB_SCOPE_BASE; req->op.search.tree = ldb_parse_tree(req, "objectClass=*"); diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index f94c34e932..2f3f738821 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -450,12 +450,9 @@ function provision_fix_subobj(subobj, paths) subobj.DNSDOMAIN); rdn_list = split(".", subobj.DNSDOMAIN); subobj.DOMAINDN = "DC=" + join(",DC=", rdn_list); - subobj.DOMAINDN_LDB = "users.ldb"; subobj.ROOTDN = subobj.DOMAINDN; subobj.CONFIGDN = "CN=Configuration," + subobj.ROOTDN; - subobj.CONFIGDN_LDB = "configuration.ldb"; subobj.SCHEMADN = "CN=Schema," + subobj.CONFIGDN; - subobj.SCHEMADN_LDB = "schema.ldb"; var rdns = split(",", subobj.DOMAINDN); subobj.RDN_DC = substr(rdns[0], strlen("DC=")); @@ -888,6 +885,9 @@ function provision_guess() "show_deleted", "partition"); subobj.MODULES_LIST = join(",", modules_list); + subobj.DOMAINDN_LDB = "users.ldb"; + subobj.CONFIGDN_LDB = "configuration.ldb"; + subobj.SCHEMADN_LDB = "schema.ldb"; subobj.DOMAINDN_MOD = "pdc_fsmo,password_hash"; subobj.CONFIGDN_MOD = "naming_fsmo"; subobj.SCHEMADN_MOD = "schema_fsmo"; diff --git a/source4/setup/provision b/source4/setup/provision index 9a67d06963..8e67dd4b3c 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -129,14 +129,15 @@ message("set DOMAIN SID: %s\n", subobj["DOMAINSID"]); if (ldapbackend) { if (!ldapmodule) { - subobj["LDAPMODULE"] = "entryUUID"; + subobj.LDAPMODULE = "entryUUID"; } - subobj["DOMAINDN_LDB"] = subobj["LDAPBACKEND"]; - subobj["DOMAINDN_MOD2"] = subobj["LDAPMODULE"] + ",paged_searches"; - subobj["CONFIGDN_LDB"] = subobj["LDAPBACKEND"]; - subobj["CONFIGDN_MOD2"] = subobj["LDAPMODULE"] + ",paged_searches"; - subobj["SCHEMADN_LDB"] = subobj["LDAPBACKEND"]; - subobj["SCHEMADN_MOD2"] = subobj["LDAPMODULE"] + ",paged_searches"; + subobj.DOMAINDN_LDB = subobj.LDAPBACKEND; + subobj.DOMAINDN_MOD2 = "," + subobj.LDAPMODULE + ",paged_searches"; + subobj.CONFIGDN_LDB = subobj.LDAPBACKEND; + subobj.CONFIGDN_MOD2 = "," + subobj.LDAPMODULE + ",paged_searches"; + subobj.SCHEMADN_LDB = subobj.LDAPBACKEND; + subobj.SCHEMADN_MOD2 = "," + subobj.LDAPMODULE + ",paged_searches"; + message("LDAP module: %s backend: %s\n", subobj.LDAPMODULE, subobj.LDAPBACKEND); } if (!provision_validate(subobj, message)) { diff --git a/source4/setup/provision-backend b/source4/setup/provision-backend index 9c1649ac3e..2fa0cc0ecc 100755 --- a/source4/setup/provision-backend +++ b/source4/setup/provision-backend @@ -88,7 +88,7 @@ for (r in options) { var paths = provision_default_paths(subobj); -provision_fix_subobj(subobj, message, paths); +provision_fix_subobj(subobj, paths); message("Provisioning LDAP backend for %s in realm %s into %s\n", subobj.HOSTNAME, subobj.REALM, subobj.LDAPDIR); message("Using LDAP Manager password: %s\n", subobj.LDAPMANAGERPASS); var tmp_schema_ldb = subobj.LDAPDIR + "/schema-tmp.ldb"; |