mirror of
https://github.com/samba-team/samba.git
synced 2025-01-29 21:47:30 +03:00
Re-enable secure channel for net rpc vampire.
Jump out of sam entry processing loop if the return value from cli_netlogon_sam_sync() isn't OK or STATUS_MORE_ENTRIES.
This commit is contained in:
parent
a8c11e8556
commit
47d8ee3679
@ -935,11 +935,17 @@ fetch_database(struct cli_state *cli, unsigned db_type, DOM_CRED *ret_creds,
|
||||
db_type, sync_context,
|
||||
&num_deltas,
|
||||
&hdr_deltas, &deltas);
|
||||
clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred),
|
||||
ret_creds);
|
||||
for (i = 0; i < num_deltas; i++) {
|
||||
fetch_sam_entry(&hdr_deltas[i], &deltas[i], dom_sid);
|
||||
}
|
||||
|
||||
if (NT_STATUS_IS_OK(result) ||
|
||||
NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)) {
|
||||
|
||||
clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred),
|
||||
ret_creds);
|
||||
|
||||
for (i = 0; i < num_deltas; i++) {
|
||||
fetch_sam_entry(&hdr_deltas[i], &deltas[i], dom_sid);
|
||||
}
|
||||
}
|
||||
sync_context += 1;
|
||||
} while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES));
|
||||
|
||||
@ -953,7 +959,6 @@ int rpc_vampire(int argc, const char **argv)
|
||||
struct cli_state *cli = NULL;
|
||||
uchar trust_password[16];
|
||||
DOM_CRED ret_creds;
|
||||
uint32 neg_flags = 0x000001ff;
|
||||
DOM_SID dom_sid;
|
||||
uint32 sec_channel;
|
||||
|
||||
@ -977,8 +982,8 @@ int rpc_vampire(int argc, const char **argv)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
result = cli_nt_setup_creds(cli, sec_channel, trust_password,
|
||||
&neg_flags, 2);
|
||||
result = cli_nt_establish_netlogon(cli, sec_channel, trust_password);
|
||||
|
||||
if (!NT_STATUS_IS_OK(result)) {
|
||||
d_printf("Failed to setup BDC creds\n");
|
||||
goto fail;
|
||||
|
Loading…
x
Reference in New Issue
Block a user