diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-07 13:30:23 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:48:45 +0100 |
commit | 949f3c726452a59555236f9fdda52e79c3e5832b (patch) | |
tree | 177f819912951d249aa0854a87fd986f2d7cce81 /source4 | |
parent | 6c01f55e72b77090c6e1c0cd30c881951ce4fc4a (diff) | |
download | samba-949f3c726452a59555236f9fdda52e79c3e5832b.tar.gz samba-949f3c726452a59555236f9fdda52e79c3e5832b.tar.bz2 samba-949f3c726452a59555236f9fdda52e79c3e5832b.zip |
r26333: No more global_loadparm in finddcs.
(This used to be commit 0c91026e587ca74692bc9223a6b5493e35943aee)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/finddcs.c | 10 | ||||
-rw-r--r-- | source4/libnet/libnet_lookup.c | 3 | ||||
-rw-r--r-- | source4/winbind/wb_dom_info.c | 3 |
3 files changed, 11 insertions, 5 deletions
diff --git a/source4/libcli/finddcs.c b/source4/libcli/finddcs.c index 75dc14e3f4..83bf9837f9 100644 --- a/source4/libcli/finddcs.c +++ b/source4/libcli/finddcs.c @@ -34,6 +34,7 @@ struct finddcs_state { struct composite_context *ctx; struct messaging_context *msg_ctx; + const char *my_netbios_name; const char *domain_name; struct dom_sid *domain_sid; @@ -60,6 +61,7 @@ static void fallback_node_status_replied(struct nbt_name_request *name_req); */ struct composite_context *finddcs_send(TALLOC_CTX *mem_ctx, + const char *my_netbios_name, const char *domain_name, int name_type, struct dom_sid *domain_sid, @@ -80,6 +82,7 @@ struct composite_context *finddcs_send(TALLOC_CTX *mem_ctx, state->ctx = c; + state->my_netbios_name = talloc_strdup(state, my_netbios_name); state->domain_name = talloc_strdup(state, domain_name); if (composite_nomem(state->domain_name, c)) return c; @@ -144,9 +147,8 @@ static void finddcs_name_resolved(struct composite_context *ctx) state->r.in.domainname = state->domain_name; state->r.in.ip_address = state->dcs[0].address; - state->r.in.my_computername = lp_netbios_name(global_loadparm); - state->r.in.my_accountname = talloc_asprintf(state, "%s$", - lp_netbios_name(global_loadparm)); + state->r.in.my_computername = state->my_netbios_name; + state->r.in.my_accountname = talloc_asprintf(state, "%s$", state->my_netbios_name); if (composite_nomem(state->r.in.my_accountname, state->ctx)) return; state->r.in.account_control = ACB_WSTRUST; state->r.in.domain_sid = state->domain_sid; @@ -244,6 +246,7 @@ NTSTATUS finddcs_recv(struct composite_context *c, TALLOC_CTX *mem_ctx, } NTSTATUS finddcs(TALLOC_CTX *mem_ctx, + const char *my_netbios_name, const char *domain_name, int name_type, struct dom_sid *domain_sid, const char **methods, @@ -252,6 +255,7 @@ NTSTATUS finddcs(TALLOC_CTX *mem_ctx, int *num_dcs, struct nbt_dc_name **dcs) { struct composite_context *c = finddcs_send(mem_ctx, + my_netbios_name, domain_name, name_type, domain_sid, methods, event_ctx, msg_ctx); diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c index 5788a56a88..fcb24601e4 100644 --- a/source4/libnet/libnet_lookup.c +++ b/source4/libnet/libnet_lookup.c @@ -194,7 +194,8 @@ struct composite_context* libnet_LookupDCs_send(struct libnet_context *ctx, struct messaging_context *msg_ctx = messaging_client_init(mem_ctx, lp_messaging_path(mem_ctx, ctx->lp_ctx), ctx->event_ctx); - c = finddcs_send(mem_ctx, io->in.domain_name, io->in.name_type, + c = finddcs_send(mem_ctx, lp_netbios_name(ctx->lp_ctx), + io->in.domain_name, io->in.name_type, NULL, ctx->name_res_methods, ctx->event_ctx, msg_ctx); return c; } diff --git a/source4/winbind/wb_dom_info.c b/source4/winbind/wb_dom_info.c index 99538bfb00..e53e3d827b 100644 --- a/source4/winbind/wb_dom_info.c +++ b/source4/winbind/wb_dom_info.c @@ -67,7 +67,8 @@ struct composite_context *wb_get_dom_info_send(TALLOC_CTX *mem_ctx, dom_sid = dom_sid_dup(mem_ctx, sid); if (dom_sid == NULL) goto failed; - ctx = finddcs_send(mem_ctx, domain_name, NBT_NAME_LOGON, + ctx = finddcs_send(mem_ctx, lp_netbios_name(service->task->lp_ctx), + domain_name, NBT_NAME_LOGON, dom_sid, lp_name_resolve_order(service->task->lp_ctx), service->task->event_ctx, |