From ea6592046f40ca21c689bff6472b4dd764850e43 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Tue, 26 Oct 1999 16:46:45 +0000 Subject: adding extra parameter back in to trust account functions (trust account name). restoring opening S-1-5-20 in sam enum users code. (This used to be commit 1be877114e2e958c59e6516dacf22d3fb5a4240f) --- source3/rpc_client/cli_netlogon.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'source3/rpc_client/cli_netlogon.c') diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index a91a448994..0a9228a3b2 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -490,7 +490,12 @@ password ?).\n", cli->desthost )); /*************************************************************************** Synchronise SAM Database (requires SEC_CHAN_BDC). ****************************************************************************/ -BOOL cli_net_sam_sync(struct cli_state *cli, uint16 nt_pipe_fnum, uint32 database_id, uint32 *num_deltas, SAM_DELTA_HDR *hdr_deltas, SAM_DELTA_CTR *deltas) +BOOL cli_net_sam_sync(struct cli_state *cli, uint16 nt_pipe_fnum, + const char* srv_name, + uint32 database_id, + uint32 *num_deltas, + SAM_DELTA_HDR *hdr_deltas, + SAM_DELTA_CTR *deltas) { NET_Q_SAM_SYNC q_s; prs_struct rbuf; @@ -505,7 +510,7 @@ BOOL cli_net_sam_sync(struct cli_state *cli, uint16 nt_pipe_fnum, uint32 databas /* create and send a MSRPC command with api NET_SAM_SYNC */ - make_q_sam_sync(&q_s, cli->srv_name_slash, global_myname, + make_q_sam_sync(&q_s, cli->srv_name_slash, srv_name, &new_clnt_cred, database_id); /* turn parameters into data stream */ @@ -556,6 +561,7 @@ BOOL cli_net_sam_sync(struct cli_state *cli, uint16 nt_pipe_fnum, uint32 databas BOOL do_sam_sync(struct cli_state *cli, uchar trust_passwd[16], + const char* acct_name, const char* srv_name, SAM_DELTA_HDR hdr_deltas[MAX_SAM_DELTAS], SAM_DELTA_CTR deltas [MAX_SAM_DELTAS], @@ -573,12 +579,13 @@ BOOL do_sam_sync(struct cli_state *cli, uchar trust_passwd[16], res = res ? cli_nt_session_open(cli, PIPE_NETLOGON, &nt_pipe_fnum) : False; res = res ? cli_nt_setup_creds(cli, nt_pipe_fnum, - cli->mach_acct, srv_name, + acct_name, srv_name, trust_passwd, SEC_CHAN_BDC) == 0x0 : False; memset(trust_passwd, 0, 16); - res = res ? cli_net_sam_sync(cli, nt_pipe_fnum, 0, num_deltas, hdr_deltas, deltas) : False; + res = res ? cli_net_sam_sync(cli, nt_pipe_fnum, srv_name, + 0, num_deltas, hdr_deltas, deltas) : False; /* close the session */ cli_nt_session_close(cli, nt_pipe_fnum); -- cgit