summaryrefslogtreecommitdiffstats
path: root/source/rpcclient/cmd_netlogon.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
commit5b3cb7725a974629d0bd8b707bc2940c36b8745e (patch)
tree68f5e3322050b81a24ad7f8d5424758aa524a234 /source/rpcclient/cmd_netlogon.c
parent9abe3b23836ae75bd31fd2af4c7d82f34c27f52a (diff)
downloadsamba-5b3cb7725a974629d0bd8b707bc2940c36b8745e.tar.gz
samba-5b3cb7725a974629d0bd8b707bc2940c36b8745e.tar.xz
samba-5b3cb7725a974629d0bd8b707bc2940c36b8745e.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
Diffstat (limited to 'source/rpcclient/cmd_netlogon.c')
-rw-r--r--source/rpcclient/cmd_netlogon.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/rpcclient/cmd_netlogon.c b/source/rpcclient/cmd_netlogon.c
index 32fa9c3699f..0ec78a06734 100644
--- a/source/rpcclient/cmd_netlogon.c
+++ b/source/rpcclient/cmd_netlogon.c
@@ -275,6 +275,7 @@ static NTSTATUS cmd_netlogon_sam_logon(struct cli_state *cli,
const char *username, *password;
uint32 neg_flags = 0x000001ff;
int auth_level = 2;
+ DOM_CRED ret_creds;
/* Check arguments */
@@ -299,7 +300,13 @@ static NTSTATUS cmd_netlogon_sam_logon(struct cli_state *cli,
/* Perform the sam logon */
- result = cli_netlogon_sam_logon(cli, mem_ctx, username, password, logon_type);
+ ZERO_STRUCT(ret_creds);
+
+ result = cli_netlogon_sam_logon(cli, mem_ctx, &ret_creds, username, password, logon_type);
+
+ clnt_deal_with_creds(cli->sess_key, &(cli->clnt_cred), &ret_creds);
+
+ result = cli_netlogon_sam_logon(cli, mem_ctx, &ret_creds, username, password, logon_type);
if (!NT_STATUS_IS_OK(result))
goto done;