summaryrefslogtreecommitdiff
path: root/source4/winbind
diff options
context:
space:
mode:
Diffstat (limited to 'source4/winbind')
-rw-r--r--source4/winbind/config.mk2
-rw-r--r--source4/winbind/idmap.c14
-rw-r--r--source4/winbind/wb_server.c2
3 files changed, 7 insertions, 11 deletions
diff --git a/source4/winbind/config.mk b/source4/winbind/config.mk
index 1837c52891..f719f00853 100644
--- a/source4/winbind/config.mk
+++ b/source4/winbind/config.mk
@@ -4,7 +4,7 @@
# Start SUBSYSTEM WINBIND
[MODULE::WINBIND]
INIT_FUNCTION = server_service_winbind_init
-SUBSYSTEM = smbd
+SUBSYSTEM = samba
PRIVATE_DEPENDENCIES = \
WB_HELPER \
IDMAP \
diff --git a/source4/winbind/idmap.c b/source4/winbind/idmap.c
index 333a86445a..56ade3e8b1 100644
--- a/source4/winbind/idmap.c
+++ b/source4/winbind/idmap.c
@@ -54,11 +54,9 @@ static int idmap_get_bounds(struct idmap_context *idmap_ctx, uint32_t *low,
dn = ldb_dn_new(tmp_ctx, ldb, "CN=CONFIG");
if (dn == NULL) goto failed;
- ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, NULL, &res);
+ ret = ldb_search(ldb, tmp_ctx, &res, dn, LDB_SCOPE_BASE, NULL, NULL);
if (ret != LDB_SUCCESS) goto failed;
- talloc_steal(tmp_ctx, res);
-
if (res->count != 1) {
ret = -1;
goto failed;
@@ -228,7 +226,7 @@ NTSTATUS idmap_xid_to_sid(struct idmap_context *idmap_ctx, TALLOC_CTX *mem_ctx,
goto failed;
}
- ret = ldb_search_exp_fmt(ldb, tmp_ctx, &res, NULL, LDB_SCOPE_SUBTREE,
+ ret = ldb_search(ldb, tmp_ctx, &res, NULL, LDB_SCOPE_SUBTREE,
NULL, "(&(|(type=ID_TYPE_BOTH)(type=%s))"
"(xidNumber=%u))", id_type, unixid->id);
if (ret != LDB_SUCCESS) {
@@ -345,7 +343,7 @@ NTSTATUS idmap_sid_to_xid(struct idmap_context *idmap_ctx, TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
- ret = ldb_search_exp_fmt(ldb, tmp_ctx, &res, NULL, LDB_SCOPE_SUBTREE,
+ ret = ldb_search(ldb, tmp_ctx, &res, NULL, LDB_SCOPE_SUBTREE,
NULL, "(&(objectClass=sidMap)(objectSid=%s))",
ldap_encode_ndr_dom_sid(tmp_ctx, sid));
if (ret != LDB_SUCCESS) {
@@ -401,7 +399,7 @@ NTSTATUS idmap_sid_to_xid(struct idmap_context *idmap_ctx, TALLOC_CTX *mem_ctx,
/* Redo the search to make sure noone changed the mapping while we
* weren't looking */
- ret = ldb_search_exp_fmt(ldb, tmp_ctx, &res, NULL, LDB_SCOPE_SUBTREE,
+ ret = ldb_search(ldb, tmp_ctx, &res, NULL, LDB_SCOPE_SUBTREE,
NULL, "(&(objectClass=sidMap)(objectSid=%s))",
ldap_encode_ndr_dom_sid(tmp_ctx, sid));
if (ret != LDB_SUCCESS) {
@@ -431,15 +429,13 @@ NTSTATUS idmap_sid_to_xid(struct idmap_context *idmap_ctx, TALLOC_CTX *mem_ctx,
goto failed;
}
- ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, NULL, &res);
+ ret = ldb_search(ldb, tmp_ctx, &res, dn, LDB_SCOPE_BASE, NULL, NULL);
if (ret != LDB_SUCCESS) {
DEBUG(1, ("Search failed: %s\n", ldb_errstring(ldb)));
status = NT_STATUS_NONE_MAPPED;
goto failed;
}
- talloc_steal(tmp_ctx, res);
-
if (res->count != 1) {
DEBUG(1, ("No CN=CONFIG record, idmap database is broken.\n"));
status = NT_STATUS_NONE_MAPPED;
diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c
index d56a82ea18..638fac00a1 100644
--- a/source4/winbind/wb_server.c
+++ b/source4/winbind/wb_server.c
@@ -122,7 +122,7 @@ static void winbind_task_init(struct task_server *task)
/* within the winbind task we want to be a single process, so
ask for the single process model ops and pass these to the
stream_setup_socket() call. */
- model_ops = process_model_byname("single");
+ model_ops = process_model_startup(task->event_ctx, "single");
if (!model_ops) {
task_server_terminate(task,
"Can't find 'single' process model_ops");