summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-10-26 16:46:45 +0000
committerLuke Leighton <lkcl@samba.org>1999-10-26 16:46:45 +0000
commitea6592046f40ca21c689bff6472b4dd764850e43 (patch)
tree20c95af4ac1b735d9a1a42ddd5776f1d544d7a37 /source3/rpc_client
parent9d890f269cf54291edee585168960a56731cb363 (diff)
downloadsamba-ea6592046f40ca21c689bff6472b4dd764850e43.tar.gz
samba-ea6592046f40ca21c689bff6472b4dd764850e43.tar.bz2
samba-ea6592046f40ca21c689bff6472b4dd764850e43.zip
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)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_netlogon.c15
-rw-r--r--source3/rpc_client/cli_netlogon_sync.c2
2 files changed, 12 insertions, 5 deletions
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);
diff --git a/source3/rpc_client/cli_netlogon_sync.c b/source3/rpc_client/cli_netlogon_sync.c
index eb8dfe0b9f..5dd2ab4909 100644
--- a/source3/rpc_client/cli_netlogon_sync.c
+++ b/source3/rpc_client/cli_netlogon_sync.c
@@ -62,7 +62,7 @@ BOOL synchronise_passdb(void)
return False;
}
- ret = do_sam_sync(&cli, trust_passwd, global_myname,
+ ret = do_sam_sync(&cli, trust_passwd, cli.mach_acct, global_myname,
hdr_deltas, deltas, &num);
if (ret)