diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-04-09 15:47:06 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-04-09 15:47:06 +0000 |
commit | 803e23f403bdb38d2523d73fd12083da486bca2f (patch) | |
tree | 6f370271d9ede3d25e466816fa7772fb465e1876 /source3/rpcclient/rpcclient.c | |
parent | 83479a9dc9affb36ea14e701ee8847195c6b8f7f (diff) | |
download | samba-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/rpcclient/rpcclient.c')
-rw-r--r-- | source3/rpcclient/rpcclient.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 6c1d05b3e9..1de181f77c 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -389,11 +389,28 @@ static NTSTATUS do_cmd(struct cli_state *cli, /* Open pipe */ - if (cmd_entry->pipe_idx != -1) - if (!cli_nt_session_open(cli, cmd_entry->pipe_idx)) { - DEBUG(0, ("Could not initialize pipe\n")); + if (cmd_entry->pipe_idx == PI_NETLOGON) { + uchar trust_password[16]; + + if (!secrets_fetch_trust_account_password(lp_workgroup(), + trust_password, + NULL)) { + return NT_STATUS_UNSUCCESSFUL; + } + + if (!cli_nt_open_netlogon(cli, trust_password, + SEC_CHAN_WKSTA)) { + DEBUG(0, ("Could not initialize NETLOGON pipe\n")); return NT_STATUS_UNSUCCESSFUL; } + } else { + if (cmd_entry->pipe_idx != -1) { + if (!cli_nt_session_open(cli, cmd_entry->pipe_idx)) { + DEBUG(0, ("Could not initialize pipe\n")); + return NT_STATUS_UNSUCCESSFUL; + } + } + } /* Run command */ |