diff options
Diffstat (limited to 'source4/winbind')
-rw-r--r-- | source4/winbind/config.mk | 5 | ||||
-rw-r--r-- | source4/winbind/idmap.c | 14 | ||||
-rw-r--r-- | source4/winbind/wb_samba3_cmd.c | 2 | ||||
-rw-r--r-- | source4/winbind/wb_server.c | 4 | ||||
-rw-r--r-- | source4/winbind/wb_sid2domain.c | 2 |
5 files changed, 12 insertions, 15 deletions
diff --git a/source4/winbind/config.mk b/source4/winbind/config.mk index b5eb2c23f0..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 \ @@ -13,7 +13,8 @@ PRIVATE_DEPENDENCIES = \ RPC_NDR_LSA \ dcerpc_samr \ PAM_ERRORS \ - LIBCLI_LDAP + LIBCLI_LDAP \ + LIBSAMBA-NET # End SUBSYSTEM WINBIND ####################### 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_samba3_cmd.c b/source4/winbind/wb_samba3_cmd.c index c2ba55ff18..03b59f56e9 100644 --- a/source4/winbind/wb_samba3_cmd.c +++ b/source4/winbind/wb_samba3_cmd.c @@ -113,7 +113,7 @@ NTSTATUS wbsrv_samba3_netbios_name(struct wbsrv_samba3_call *s3call) NTSTATUS wbsrv_samba3_priv_pipe_dir(struct wbsrv_samba3_call *s3call) { - char *path = s3call->wbconn->listen_socket->service->priv_socket_path; + const char *path = s3call->wbconn->listen_socket->service->priv_socket_path; s3call->response.result = WINBINDD_OK; s3call->response.extra_data.data = path; diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c index d56a82ea18..b8309597d7 100644 --- a/source4/winbind/wb_server.c +++ b/source4/winbind/wb_server.c @@ -21,7 +21,7 @@ #include "includes.h" #include "lib/socket/socket.h" -#include "lib/util/dlinklist.h" +#include "../lib/util/dlinklist.h" #include "lib/events/events.h" #include "smbd/service_task.h" #include "smbd/process_model.h" @@ -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"); diff --git a/source4/winbind/wb_sid2domain.c b/source4/winbind/wb_sid2domain.c index fcf02cedcd..cb9fa3ada2 100644 --- a/source4/winbind/wb_sid2domain.c +++ b/source4/winbind/wb_sid2domain.c @@ -25,7 +25,7 @@ #include "smbd/service_task.h" #include "winbind/wb_async_helpers.h" #include "libcli/security/security.h" -#include "lib/util/dlinklist.h" +#include "../lib/util/dlinklist.h" #include "param/param.h" static struct wbsrv_domain *find_domain_from_sid(struct wbsrv_service *service, |