summaryrefslogtreecommitdiffstats
path: root/source/rpcclient/cmd_netlogon.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-04-21 14:09:03 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-04-21 14:09:03 +0000
commit876e00fd112e4aaf7519eec27f382eb99ec7562a (patch)
tree4ce05f9ffed9fd4d9d30e59c562bed22d6ddbc9d /source/rpcclient/cmd_netlogon.c
parent9ba88c7314168b87b72a7e9dc3c7588dcce86893 (diff)
downloadsamba-876e00fd112e4aaf7519eec27f382eb99ec7562a.tar.gz
samba-876e00fd112e4aaf7519eec27f382eb99ec7562a.tar.xz
samba-876e00fd112e4aaf7519eec27f382eb99ec7562a.zip
Merge from HEAD - save the type of channel used to contact the DC.
This allows us to join as a BDC, without appearing on the network as one until we have the database replicated, and the admin changes the configuration. This also change the SID retreval order from secrets.tdb, so we no longer require a 'net rpc getsid' - the sid fetch during the domain join is sufficient. Also minor fixes to 'net'. Andrew Bartlett
Diffstat (limited to 'source/rpcclient/cmd_netlogon.c')
-rw-r--r--source/rpcclient/cmd_netlogon.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/rpcclient/cmd_netlogon.c b/source/rpcclient/cmd_netlogon.c
index 7a77d125a6f..32fa9c3699f 100644
--- a/source/rpcclient/cmd_netlogon.c
+++ b/source/rpcclient/cmd_netlogon.c
@@ -152,6 +152,7 @@ static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli,
SAM_DELTA_CTR *deltas;
DOM_CRED ret_creds;
uint32 neg_flags = 0x000001ff;
+ uint32 sec_channel_type = 0;
if (argc > 2) {
fprintf(stderr, "Usage: %s [database_id]\n", argv[0]);
@@ -169,12 +170,12 @@ static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli,
/* Initialise session credentials */
if (!secrets_fetch_trust_account_password(lp_workgroup(), trust_passwd,
- NULL)) {
+ NULL, &sec_channel_type)) {
fprintf(stderr, "could not fetch trust account password\n");
goto done;
}
- result = cli_nt_setup_creds(cli, get_sec_chan(), trust_passwd, &neg_flags, 2);
+ result = cli_nt_setup_creds(cli, sec_channel_type, trust_passwd, &neg_flags, 2);
if (!NT_STATUS_IS_OK(result)) {
fprintf(stderr, "Error initialising session creds\n");
@@ -213,6 +214,7 @@ static NTSTATUS cmd_netlogon_sam_deltas(struct cli_state *cli,
SAM_DELTA_CTR *deltas;
UINT64_S seqnum;
uint32 neg_flags = 0x000001ff;
+ uint32 sec_channel_type = 0;
if (argc != 3) {
fprintf(stderr, "Usage: %s database_id seqnum\n", argv[0]);
@@ -233,12 +235,12 @@ static NTSTATUS cmd_netlogon_sam_deltas(struct cli_state *cli,
/* Initialise session credentials */
if (!secrets_fetch_trust_account_password(lp_workgroup(), trust_passwd,
- NULL)) {
+ NULL, &sec_channel_type)) {
fprintf(stderr, "could not fetch trust account password\n");
goto done;
}
- result = cli_nt_setup_creds(cli, get_sec_chan(), trust_passwd, &neg_flags, 2);
+ result = cli_nt_setup_creds(cli, sec_channel_type, trust_passwd, &neg_flags, 2);
if (!NT_STATUS_IS_OK(result)) {
fprintf(stderr, "Error initialising session creds\n");