From 3e2f355a2ed4b372585d259839ff67d20e5d61d1 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 31 Oct 2001 04:26:36 +0000 Subject: Some tweaking to make the samlogon function look more like NT on the wire. (This used to be commit b30232e2b7ddb5eab419d4e6237176f695a534ad) --- source3/libsmb/cli_netlogon.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/cli_netlogon.c b/source3/libsmb/cli_netlogon.c index 45564ae27c..7499d9ca7b 100644 --- a/source3/libsmb/cli_netlogon.c +++ b/source3/libsmb/cli_netlogon.c @@ -434,9 +434,10 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, nt_lm_owf_gen(password, nt_owf_user_pwd, lm_owf_user_pwd); - init_id_info1(&ctr.auth.id1, lp_workgroup(), 0, + init_id_info1(&ctr.auth.id1, lp_workgroup(), + 0, /* param_ctrl */ 0xdead, 0xbeef, /* LUID? */ - username, global_myname, + username, cli->clnt_name_slash, cli->sess_key, lm_owf_user_pwd, nt_owf_user_pwd); @@ -452,16 +453,17 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, SMBencrypt(password, chal, local_lm_response); SMBNTencrypt(password, chal, local_nt_response); - init_id_info2(&ctr.auth.id2, lp_workgroup(), 0, + init_id_info2(&ctr.auth.id2, lp_workgroup(), + 0, /* param_ctrl */ 0xdead, 0xbeef, /* LUID? */ - username, global_myname, chal, + username, cli->clnt_name_slash, chal, local_lm_response, 24, local_nt_response, 24); break; } default: DEBUG(0, ("switch value %d not supported\n", ctr.switch_value)); - break; + goto done; } init_sam_info(&q.sam_id, cli->srv_name_slash, global_myname, @@ -472,7 +474,6 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, if (!net_io_q_sam_logon("", &q, &qbuf, 0) || !rpc_api_pipe_req(cli, NET_SAMLOGON, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; goto done; } @@ -481,7 +482,6 @@ NTSTATUS cli_netlogon_sam_logon(struct cli_state *cli, TALLOC_CTX *mem_ctx, r.user = &user; if (!net_io_r_sam_logon("", &r, &rbuf, 0)) { - result = NT_STATUS_UNSUCCESSFUL; goto done; } -- cgit