r25446: Merge some changes I made on the way home from SFO:
[jelmer/samba4-debian.git] / source / libcli / finddcs.c
index 5371879895169f9f75643dfb6cd207adb586d792..e00697fe17ae21cae1e66a07248e85490ddff00e 100644 (file)
@@ -27,6 +27,8 @@
 #include "libcli/composite/composite.h"
 #include "libcli/libcli.h"
 #include "libcli/resolve/resolve.h"
+#include "libcli/finddcs.h"
+#include "param/param.h"
 
 struct finddcs_state {
        struct composite_context *ctx;
@@ -143,15 +145,15 @@ 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();
+       state->r.in.my_computername = lp_netbios_name(global_loadparm);
        state->r.in.my_accountname = talloc_asprintf(state, "%s$",
-                                                    lp_netbios_name());
+                                       lp_netbios_name(global_loadparm));
        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;
 
        ireq = irpc_call_send(state->msg_ctx, nbt_servers[0],
-                             &ndr_table_irpc, DCERPC_NBTD_GETDCNAME,
+                             &ndr_table_irpc, NDR_NBTD_GETDCNAME,
                              &state->r, state);
        if (!ireq) {
                fallback_node_status(state);