summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2005-04-05 19:53:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:11:27 -0500
commit66a3750b142cbf54bfb7318ac4e1831f3d491793 (patch)
treea7e6ce1f1ce350b3ff58240c85372a92812f5aa7 /source4/librpc/rpc
parent86122d78e5356c0bce7dc0f6599d0efb2d09ee7c (diff)
downloadsamba-66a3750b142cbf54bfb7318ac4e1831f3d491793.tar.gz
samba-66a3750b142cbf54bfb7318ac4e1831f3d491793.tar.bz2
samba-66a3750b142cbf54bfb7318ac4e1831f3d491793.zip
r6219: This change allows us to fall back to authenticating without
DCERPC_SCHANNEL_128 if we fail. Thus, it allows us to work with Windows NT DCs ... (This used to be commit 3034b226705c4736d57c9bf4e9470c4d44c72e8e)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index 3ae2624ff9..a98ed50b9a 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -162,7 +162,21 @@ NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx,
DEBUG(1, ("Failed to setup credentials for account %s: %s\n",
cli_credentials_get_username(credentials),
nt_errstr(status)));
- return status;
+ /*
+ * If we get back NT_STATUS_ACCESS_DENIED and we asked for
+ * DCERPC_SCHANNEL_128, then try again without
+ */
+ if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED) &&
+ p->conn->flags & DCERPC_SCHANNEL_128) {
+ DEBUG(1, ("Retrying to setup credentials without DCERPC_SCHANNEL_128\n"));
+ p->conn->flags &= ~DCERPC_SCHANNEL_128;
+ status = dcerpc_schannel_key(tmp_ctx,
+ p, credentials,
+ chan_type);
+ }
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
}
return dcerpc_bind_auth_password(p, uuid, version,