r26435: Remove global_loadparm instance.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 13 Dec 2007 21:46:37 +0000 (22:46 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:50:04 +0000 (05:50 +0100)
(This used to be commit 66fd8d480bdfeb1c95da8843da3d18abe3f997e1)

source4/libcli/finddcs.c
source4/libnet/libnet_lookup.c
source4/winbind/wb_dom_info.c

index 4b7f2dce8ccb43a26e9a87063c05533ebf69db60..606809751eb5fd4ea83efd604298ee5d0531c856 100644 (file)
@@ -28,7 +28,6 @@
 #include "libcli/libcli.h"
 #include "libcli/resolve/resolve.h"
 #include "libcli/finddcs.h"
-#include "param/param.h"
 
 struct finddcs_state {
        struct composite_context *ctx;
@@ -63,6 +62,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,
+                                      uint16_t nbt_port,
                                       const char *domain_name,
                                       int name_type,
                                       struct dom_sid *domain_sid,
@@ -83,7 +83,7 @@ struct composite_context *finddcs_send(TALLOC_CTX *mem_ctx,
 
        state->ctx = c;
 
-       state->nbt_port = lp_nbt_port(global_loadparm);
+       state->nbt_port = nbt_port;
        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;
@@ -250,6 +250,7 @@ NTSTATUS finddcs_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
 
 NTSTATUS finddcs(TALLOC_CTX *mem_ctx,
                 const char *my_netbios_name,
+                uint16_t nbt_port,
                 const char *domain_name, int name_type, 
                 struct dom_sid *domain_sid,
                 struct resolve_context *resolve_ctx,
@@ -259,6 +260,7 @@ NTSTATUS finddcs(TALLOC_CTX *mem_ctx,
 {
        struct composite_context *c = finddcs_send(mem_ctx,
                                                   my_netbios_name,
+                                                  nbt_port,
                                                   domain_name, name_type,
                                                   domain_sid, resolve_ctx,
                                                   event_ctx, msg_ctx);
index b8c6609d8e3fbf79eed350a2c3ddb51f2ba43b2f..a7442eb32d425b2860f45aa57d6d9b4c318e2288 100644 (file)
@@ -194,7 +194,7 @@ 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, lp_netbios_name(ctx->lp_ctx),
+       c = finddcs_send(mem_ctx, lp_netbios_name(ctx->lp_ctx), lp_nbt_port(ctx->lp_ctx),
                         io->in.domain_name, io->in.name_type,
                         NULL, ctx->resolve_ctx, ctx->event_ctx, msg_ctx);
        return c;
index 05b63e67c8ac99eac966d63e4a0d8636557fc482..7558fc9d623d181c92c49358a0f64862498979c2 100644 (file)
@@ -68,6 +68,7 @@ struct composite_context *wb_get_dom_info_send(TALLOC_CTX *mem_ctx,
        if (dom_sid == NULL) goto failed;
 
        ctx = finddcs_send(mem_ctx, lp_netbios_name(service->task->lp_ctx),
+                          lp_nbt_port(service->task->lp_ctx),
                           domain_name, NBT_NAME_LOGON, 
                           dom_sid, 
                           lp_resolve_context(service->task->lp_ctx),