Author: jra Date: 2005-09-04 17:39:52 +0000 (Sun, 04 Sep 2005) New Revision: 10029
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10029 Log: Ensure domain is factored out of the cli_XX calls and never fetched by lp_workgroup(). Jeremy. Modified: branches/tmp/RPCREWRITE/source/auth/auth_domain.c branches/tmp/RPCREWRITE/source/rpc_client/cli_netlogon.c branches/tmp/RPCREWRITE/source/rpcclient/cmd_netlogon.c Changeset: Modified: branches/tmp/RPCREWRITE/source/auth/auth_domain.c =================================================================== --- branches/tmp/RPCREWRITE/source/auth/auth_domain.c 2005-09-04 17:26:23 UTC (rev 10028) +++ branches/tmp/RPCREWRITE/source/auth/auth_domain.c 2005-09-04 17:39:52 UTC (rev 10029) @@ -113,7 +113,7 @@ /* JRA TESTME - do we need to do this to get the netlogon request to succeed ? */ ntresult = rpccli_netlogon_setup_creds(cmd_entry->rpc_pipe, dc_name, - lp_workgroup(), + domain, global_myname(), trust_password, sec_channel_type, @@ -214,7 +214,8 @@ nt_status = make_server_info_info3(mem_ctx, user_info->internal_username.str, user_info->smb_name.str, - domain, server_info, + domain, + server_info, &info3); } Modified: branches/tmp/RPCREWRITE/source/rpc_client/cli_netlogon.c =================================================================== --- branches/tmp/RPCREWRITE/source/rpc_client/cli_netlogon.c 2005-09-04 17:26:23 UTC (rev 10028) +++ branches/tmp/RPCREWRITE/source/rpc_client/cli_netlogon.c 2005-09-04 17:39:52 UTC (rev 10029) @@ -517,8 +517,11 @@ /* Logon domain user */ -NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - const char *username, const char *password, +NTSTATUS rpccli_netlogon_sam_logon(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *domain, + const char *username, + const char *password, int logon_type) { prs_struct qbuf, rbuf; @@ -552,7 +555,7 @@ nt_lm_owf_gen(password, nt_owf_user_pwd, lm_owf_user_pwd); - init_id_info1(&ctr.auth.id1, lp_workgroup(), + init_id_info1(&ctr.auth.id1, domain, 0, /* param_ctrl */ 0xdead, 0xbeef, /* LUID? */ username, clnt_name_slash, @@ -571,7 +574,7 @@ SMBencrypt(password, chal, local_lm_response); SMBNTencrypt(password, chal, local_nt_response); - init_id_info2(&ctr.auth.id2, lp_workgroup(), + init_id_info2(&ctr.auth.id2, domain, 0, /* param_ctrl */ 0xdead, 0xbeef, /* LUID? */ username, clnt_name_slash, chal, Modified: branches/tmp/RPCREWRITE/source/rpcclient/cmd_netlogon.c =================================================================== --- branches/tmp/RPCREWRITE/source/rpcclient/cmd_netlogon.c 2005-09-04 17:26:23 UTC (rev 10028) +++ branches/tmp/RPCREWRITE/source/rpcclient/cmd_netlogon.c 2005-09-04 17:39:52 UTC (rev 10029) @@ -272,7 +272,7 @@ /* Perform the sam logon */ - result = rpccli_netlogon_sam_logon(cli, mem_ctx, username, password, logon_type); + result = rpccli_netlogon_sam_logon(cli, mem_ctx, lp_workgroup(), username, password, logon_type); if (!NT_STATUS_IS_OK(result)) goto done;
