summaryrefslogtreecommitdiff
path: root/source3/libsmb/clidgram.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clidgram.c')
-rw-r--r--source3/libsmb/clidgram.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/libsmb/clidgram.c b/source3/libsmb/clidgram.c
index 92f381e87b..90f06fd535 100644
--- a/source3/libsmb/clidgram.c
+++ b/source3/libsmb/clidgram.c
@@ -20,6 +20,8 @@
*/
#include "includes.h"
+#include "libsmb/libsmb.h"
+#include "../lib/util/tevent_ntstatus.h"
#include "libsmb/clidgram.h"
#include "libsmb/nmblib.h"
#include "messages.h"
@@ -138,7 +140,7 @@ static bool prep_getdc_request(const struct sockaddr_storage *dc_ss,
my_sid = *sid;
}
- my_acct_name = talloc_asprintf(talloc_tos(), "%s$", global_myname());
+ my_acct_name = talloc_asprintf(talloc_tos(), "%s$", lp_netbios_name());
if (my_acct_name == NULL) {
goto fail;
}
@@ -147,7 +149,7 @@ static bool prep_getdc_request(const struct sockaddr_storage *dc_ss,
s = &packet.req.logon;
s->request_count = 0;
- s->computer_name = global_myname();
+ s->computer_name = lp_netbios_name();
s->user_name = my_acct_name;
s->mailslot_name = my_mailslot;
s->acct_control = ACB_WSTRUST;
@@ -168,7 +170,7 @@ static bool prep_getdc_request(const struct sockaddr_storage *dc_ss,
ret = cli_prep_mailslot(false, NBT_MAILSLOT_NTLOGON, 0,
(char *)blob.data, blob.length,
- global_myname(), 0, domain_name, 0x1c,
+ lp_netbios_name(), 0, domain_name, 0x1c,
dc_ss, dgm_id, p);
fail:
TALLOC_FREE(frame);
@@ -225,7 +227,7 @@ static bool parse_getdc_response(
blob = p.smb.body.trans.data;
- r = TALLOC_ZERO_P(mem_ctx, struct netlogon_samlogon_response);
+ r = talloc_zero(mem_ctx, struct netlogon_samlogon_response);
if (!r) {
return false;
}
@@ -320,7 +322,7 @@ struct tevent_req *nbt_getdc_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
state->my_mailslot = mailslot_name(
- state, ((struct sockaddr_in *)dc_addr)->sin_addr);
+ state, ((const struct sockaddr_in *)dc_addr)->sin_addr);
if (tevent_req_nomem(state->my_mailslot, req)) {
return tevent_req_post(req, ev);
}