diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/auth_winbind.c | 8 | ||||
-rw-r--r-- | source4/lib/messaging/irpc.h | 2 | ||||
-rw-r--r-- | source4/lib/messaging/messaging.c | 5 | ||||
-rw-r--r-- | source4/libcli/finddcs.c | 2 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_rpc.c | 2 | ||||
-rw-r--r-- | source4/winbind/wb_dom_info.c | 2 | ||||
-rw-r--r-- | source4/wrepl_server/wrepl_apply_records.c | 6 | ||||
-rw-r--r-- | source4/wrepl_server/wrepl_scavenging.c | 2 |
8 files changed, 15 insertions, 14 deletions
diff --git a/source4/auth/auth_winbind.c b/source4/auth/auth_winbind.c index 2a35047e21..05183d65d0 100644 --- a/source4/auth/auth_winbind.c +++ b/source4/auth/auth_winbind.c @@ -162,7 +162,10 @@ static NTSTATUS winbind_check_password(struct auth_method_context *ctx, const struct auth_usersupplied_info *user_info_new; struct netr_IdentityInfo *identity_info; - winbind_servers = irpc_servers_byname(ctx->auth_ctx->msg_ctx, "winbind_server"); + s = talloc(mem_ctx, struct winbind_check_password_state); + NT_STATUS_HAVE_NO_MEMORY(s); + + winbind_servers = irpc_servers_byname(ctx->auth_ctx->msg_ctx, s, "winbind_server"); if ((winbind_servers == NULL) || (winbind_servers[0].id == 0)) { DEBUG(0, ("Winbind authentication for [%s]\\[%s] failed, " "no winbind_server running!\n", @@ -170,9 +173,6 @@ static NTSTATUS winbind_check_password(struct auth_method_context *ctx, return NT_STATUS_NO_LOGON_SERVERS; } - s = talloc(mem_ctx, struct winbind_check_password_state); - NT_STATUS_HAVE_NO_MEMORY(s); - if (user_info->flags & USER_INFO_INTERACTIVE_LOGON) { struct netr_PasswordInfo *password_info; diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h index 6873f014a6..0ea1d5d69f 100644 --- a/source4/lib/messaging/irpc.h +++ b/source4/lib/messaging/irpc.h @@ -117,7 +117,7 @@ NTSTATUS irpc_call(struct messaging_context *msg_ctx, int callnum, void *r, TALLOC_CTX *ctx); NTSTATUS irpc_add_name(struct messaging_context *msg_ctx, const char *name); -struct server_id *irpc_servers_byname(struct messaging_context *msg_ctx, const char *name); +struct server_id *irpc_servers_byname(struct messaging_context *msg_ctx, TALLOC_CTX *mem_ctx, const char *name); void irpc_remove_name(struct messaging_context *msg_ctx, const char *name); NTSTATUS irpc_send_reply(struct irpc_message *m, NTSTATUS status); diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 705fdcc465..9b4f4b49c4 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -961,7 +961,8 @@ NTSTATUS irpc_add_name(struct messaging_context *msg_ctx, const char *name) /* return a list of server ids for a server name */ -struct server_id *irpc_servers_byname(struct messaging_context *msg_ctx, +struct server_id *irpc_servers_byname(struct messaging_context *msg_ctx, + TALLOC_CTX *mem_ctx, const char *name) { struct tdb_wrap *t; @@ -985,7 +986,7 @@ struct server_id *irpc_servers_byname(struct messaging_context *msg_ctx, return NULL; } count = rec.dsize / sizeof(struct server_id); - ret = talloc_array(msg_ctx, struct server_id, count+1); + ret = talloc_array(mem_ctx, struct server_id, count+1); if (ret == NULL) { tdb_unlock_bystring(t->tdb, name); talloc_free(t); diff --git a/source4/libcli/finddcs.c b/source4/libcli/finddcs.c index d8acf44ba0..09967c72b1 100644 --- a/source4/libcli/finddcs.c +++ b/source4/libcli/finddcs.c @@ -133,7 +133,7 @@ static void finddcs_name_resolved(struct composite_context *ctx) return; } - nbt_servers = irpc_servers_byname(state->msg_ctx, "nbt_server"); + nbt_servers = irpc_servers_byname(state->msg_ctx, state, "nbt_server"); if ((nbt_servers == NULL) || (nbt_servers[0].id == 0)) { fallback_node_status(state); return; diff --git a/source4/scripting/ejs/smbcalls_rpc.c b/source4/scripting/ejs/smbcalls_rpc.c index 4d4e12e855..73b6661cd3 100644 --- a/source4/scripting/ejs/smbcalls_rpc.c +++ b/source4/scripting/ejs/smbcalls_rpc.c @@ -88,7 +88,7 @@ static int ejs_irpc_connect(MprVarHandle eid, int argc, char **argv) return -1; } - p->dest_ids = irpc_servers_byname(p->msg_ctx, p->server_name); + p->dest_ids = irpc_servers_byname(p->msg_ctx, p, p->server_name); if (p->dest_ids == NULL || p->dest_ids[0].id == 0) { talloc_free(p); status = NT_STATUS_OBJECT_NAME_NOT_FOUND; diff --git a/source4/winbind/wb_dom_info.c b/source4/winbind/wb_dom_info.c index 28f35c2095..39a734aace 100644 --- a/source4/winbind/wb_dom_info.c +++ b/source4/winbind/wb_dom_info.c @@ -96,7 +96,7 @@ static void get_dom_info_recv_addrs(struct composite_context *ctx) if (!composite_is_ok(state->ctx)) return; nbt_servers = irpc_servers_byname(state->service->task->msg_ctx, - "nbt_server"); + state, "nbt_server"); if ((nbt_servers == NULL) || (nbt_servers[0].id == 0)) { composite_error(state->ctx, NT_STATUS_NO_LOGON_SERVERS); return; diff --git a/source4/wrepl_server/wrepl_apply_records.c b/source4/wrepl_server/wrepl_apply_records.c index f805d21dfe..033657987e 100644 --- a/source4/wrepl_server/wrepl_apply_records.c +++ b/source4/wrepl_server/wrepl_apply_records.c @@ -911,7 +911,7 @@ static NTSTATUS r_do_late_release_demand(struct r_do_challenge_state *state) DEBUG(4,("late release demand record %s\n", nbt_name_string(state, &state->replica.name))); - nbt_servers = irpc_servers_byname(state->msg_ctx, "nbt_server"); + nbt_servers = irpc_servers_byname(state->msg_ctx, state, "nbt_server"); if ((nbt_servers == NULL) || (nbt_servers[0].id == 0)) { return NT_STATUS_INTERNAL_ERROR; } @@ -1051,7 +1051,7 @@ static NTSTATUS r_do_challenge(struct wreplsrv_partner *partner, talloc_steal(state, replica->owner); talloc_steal(state, replica->addresses); - nbt_servers = irpc_servers_byname(state->msg_ctx, "nbt_server"); + nbt_servers = irpc_servers_byname(state->msg_ctx, state, "nbt_server"); if ((nbt_servers == NULL) || (nbt_servers[0].id == 0)) { return NT_STATUS_INTERNAL_ERROR; } @@ -1113,7 +1113,7 @@ static NTSTATUS r_do_release_demand(struct wreplsrv_partner *partner, DEBUG(4,("release demand record %s\n", nbt_name_string(mem_ctx, &replica->name))); - nbt_servers = irpc_servers_byname(partner->service->task->msg_ctx, "nbt_server"); + nbt_servers = irpc_servers_byname(partner->service->task->msg_ctx, mem_ctx, "nbt_server"); if ((nbt_servers == NULL) || (nbt_servers[0].id == 0)) { return NT_STATUS_INTERNAL_ERROR; } diff --git a/source4/wrepl_server/wrepl_scavenging.c b/source4/wrepl_server/wrepl_scavenging.c index e134e64c06..b75fa72abf 100644 --- a/source4/wrepl_server/wrepl_scavenging.c +++ b/source4/wrepl_server/wrepl_scavenging.c @@ -390,7 +390,7 @@ static NTSTATUS wreplsrv_scavenging_replica_active_records(struct wreplsrv_servi struct verify_state *s; struct server_id *nbt_servers; - nbt_servers = irpc_servers_byname(service->task->msg_ctx, "nbt_server"); + nbt_servers = irpc_servers_byname(service->task->msg_ctx, tmp_mem, "nbt_server"); if ((nbt_servers == NULL) || (nbt_servers[0].id == 0)) { return NT_STATUS_INTERNAL_ERROR; } |