summaryrefslogtreecommitdiff
path: root/source3/rpcclient/rpcclient.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-05-08 08:02:52 +0000
committerVolker Lendecke <vlendec@samba.org>2003-05-08 08:02:52 +0000
commitd1da999e0a84939e372ebe590861376e2c0075b3 (patch)
tree98431ea78f62be7e3b383a7d8c8249e573feb307 /source3/rpcclient/rpcclient.c
parent8210b69406f8b3b213cb7d9fdc5c58986f80a56b (diff)
downloadsamba-d1da999e0a84939e372ebe590861376e2c0075b3.tar.gz
samba-d1da999e0a84939e372ebe590861376e2c0075b3.tar.bz2
samba-d1da999e0a84939e372ebe590861376e2c0075b3.zip
This puts real netlogon connection caching to winbind. This becomes
important once we start doing schannel, as there would be a lot more roundtrips for the second PIPE open and bind. With this patch logging in to a member server is a matter of two (three if you count the ack...) packets between us and the DC. Volker (This used to be commit 5b3cb7725a974629d0bd8b707bc2940c36b8745e)
Diffstat (limited to 'source3/rpcclient/rpcclient.c')
-rw-r--r--source3/rpcclient/rpcclient.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index b01e2d694c..a1b0a8cd34 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -391,6 +391,14 @@ 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 initialise %s\n",
+ get_pipe_name_from_index(cmd_entry->pipe_idx)));
+ return NT_STATUS_UNSUCCESSFUL;
+ }
+ }
+
if (cmd_entry->pipe_idx == PI_NETLOGON) {
uchar trust_password[16];
uint32 sec_channel_type;
@@ -401,19 +409,11 @@ static NTSTATUS do_cmd(struct cli_state *cli,
return NT_STATUS_UNSUCCESSFUL;
}
- if (!cli_nt_open_netlogon(cli, trust_password,
- sec_channel_type)) {
+ if (!NT_STATUS_IS_OK(cli_nt_establish_netlogon(cli, sec_channel_type,
+ trust_password))) {
DEBUG(0, ("Could not initialise 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 initialise %s\n",
- get_pipe_name_from_index(cmd_entry->pipe_idx)));
- return NT_STATUS_UNSUCCESSFUL;
- }
- }
}
/* Run command */