summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_samsync.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-04-09 15:47:06 +0000
committerVolker Lendecke <vlendec@samba.org>2003-04-09 15:47:06 +0000
commit803e23f403bdb38d2523d73fd12083da486bca2f (patch)
tree6f370271d9ede3d25e466816fa7772fb465e1876 /source3/utils/net_rpc_samsync.c
parent83479a9dc9affb36ea14e701ee8847195c6b8f7f (diff)
downloadsamba-803e23f403bdb38d2523d73fd12083da486bca2f.tar.gz
samba-803e23f403bdb38d2523d73fd12083da486bca2f.tar.bz2
samba-803e23f403bdb38d2523d73fd12083da486bca2f.zip
This is the netlogon schannel client code. Try a
rpcclient -S pdc -U% -c "samlogon user password" and it should work with the schannel. Needs testing platforms different from NT4SP6. Volker (This used to be commit ecd0ee4d248e750168597ccf79c389513bb0f740)
Diffstat (limited to 'source3/utils/net_rpc_samsync.c')
-rw-r--r--source3/utils/net_rpc_samsync.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index e42c8f5637..0b78cd54ce 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -209,19 +209,17 @@ int rpc_samdump(int argc, const char **argv)
return 1;
}
- if (!cli_nt_session_open(cli, PI_NETLOGON)) {
- DEBUG(0,("Error connecting to NETLOGON pipe\n"));
- goto fail;
- }
+ fstrcpy(cli->domain, lp_workgroup());
- if (!secrets_fetch_trust_account_password(lp_workgroup(), trust_password, NULL)) {
- d_printf("Could not retrieve domain trust secret\n");
+ if (!secrets_fetch_trust_account_password(lp_workgroup(),
+ trust_password,
+ NULL)) {
+ DEBUG(0,("Could not fetch trust account password\n"));
goto fail;
}
-
- result = cli_nt_setup_creds(cli, SEC_CHAN_BDC, trust_password, &neg_flags, 2);
- if (!NT_STATUS_IS_OK(result)) {
- d_printf("Failed to setup BDC creds\n");
+
+ if (!cli_nt_open_netlogon(cli, trust_password, SEC_CHAN_BDC)) {
+ DEBUG(0,("Error connecting to NETLOGON pipe\n"));
goto fail;
}