summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-19 23:22:40 +0100
committerKarolin Seeger <kseeger@samba.org>2010-02-26 16:06:29 +0100
commit4aa41c7d4a39f33fb4868b27e057d0a169fb97e6 (patch)
treed4225a35d70237dbb301cb5b5ebfbd4dbe6e04f5
parentecda733ca608950c8d3c08d1caf82f45de622461 (diff)
downloadsamba-4aa41c7d4a39f33fb4868b27e057d0a169fb97e6.tar.gz
s3:cli_netlogon: keep the the correct negotiate_flags on the cli->dc structure
This should fix the rpccli_netlogon_set_trust_password() against DC's without netr_ServerPasswordSet2 support. This fixes bug #7160. metze (cherry picked from commit 1e9df26ef970df41de54142a78606a15374acbac) (cherry picked from commit a3e3355b5ccf74a2ffe5da6cbb2747e74586b1e5)
-rw-r--r--source3/rpc_client/cli_netlogon.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 03884479f9f..9cb0bc6c1cf 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -45,6 +45,7 @@ NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
struct samr_Password password;
bool retried = false;
fstring mach_acct;
+ uint32_t neg_flags = *neg_flags_inout;
if (!ndr_syntax_id_equal(&cli->abstract_syntax,
&ndr_table_netlogon.syntax_id)) {
@@ -81,7 +82,7 @@ NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
&srv_chal_recv,
&password,
&clnt_chal_send,
- *neg_flags_inout);
+ neg_flags);
if (!cli->dc) {
return NT_STATUS_NO_MEMORY;
@@ -98,7 +99,7 @@ NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
cli->dc->computer_name,
&clnt_chal_send, /* input. */
&srv_chal_recv, /* output. */
- neg_flags_inout);
+ &neg_flags);
/* we might be talking to NT4, so let's downgrade in that case and retry
* with the returned neg_flags - gd */
@@ -132,6 +133,9 @@ NTSTATUS rpccli_netlogon_setup_creds(struct rpc_pipe_client *cli,
"chain established.\n",
cli->desthost ));
+ cli->dc->negotiate_flags = neg_flags;
+ *neg_flags_inout = neg_flags;
+
return NT_STATUS_OK;
}