struct ldb_message *msg;
struct ldb_result *res;
struct ldb_context *ldb = ldb_module_get_ctx(module);
- const char *attrs[] = { "partition", "replicateEntries", "modules", NULL };
+ const char *attrs[] = { "partition", "replicateEntries", "modules", "ldapBackend", NULL };
/* perform search for @PARTITION, looking for module, replicateEntries and ldapBackend */
ret = dsdb_module_search_dn(module, mem_ctx, &res,
ldb_dn_new(mem_ctx, ldb, DSDB_PARTITION_DN),
ctrl->version = DSDB_CONTROL_CURRENT_PARTITION_VERSION;
ctrl->dn = talloc_steal(ctrl, dn);
- ret = ldb_connect_backend(ldb, backend_url, NULL, &backend_module);
+ ret = ldb_connect_backend(ldb, (*partition)->backend_url, NULL, &backend_module);
if (ret != LDB_SUCCESS) {
return ret;
}
import uuid
import time
import shutil
+import subprocess
from samba import read_and_sub_file
from samba import Ldb
self.slapd_command_escaped = "\'" + "\' \'".join(self.slapd_command) + "\'"
setup_file(setup_path("ldap_backend_startup.sh"), paths.ldapdir + "/ldap_backend_startup.sh", {
- "SLAPD_COMMAND" : slapd_command})
+ "SLAPD_COMMAND" : self.slapd_command_escaped})
# Now start the slapd, so we can provision onto it. We keep the
# subprocess context around, to kill this off at the successful