summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_schannel.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-05-01 19:29:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:26 -0500
commit85e9412c4786ede6f94d879185d493756d37eebe (patch)
treebb1f38e33db38af59f427228402cec1095bf4793 /source4/librpc/rpc/dcerpc_schannel.c
parent7fca1d46cea38229faf9a7092d86a452658f2ca0 (diff)
downloadsamba-85e9412c4786ede6f94d879185d493756d37eebe.tar.gz
samba-85e9412c4786ede6f94d879185d493756d37eebe.tar.bz2
samba-85e9412c4786ede6f94d879185d493756d37eebe.zip
r6565: Cludge, cludge, cludge...
We need to pass the 'secure channel type' to the NETLOGON layer, which must match the account type. (Yes, jelmer objects to this inclusion of the kitchen sink ;-) Andrew Bartlett (This used to be commit 8ee208a926d2b15fdc42753b1f9ee586564c6248)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_schannel.c')
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index 3ae2624ff9..cc6cbe7b46 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -30,8 +30,7 @@
*/
static NTSTATUS dcerpc_schannel_key(TALLOC_CTX *tmp_ctx,
struct dcerpc_pipe *p,
- struct cli_credentials *credentials,
- int chan_type)
+ struct cli_credentials *credentials)
{
NTSTATUS status;
struct dcerpc_binding *b;
@@ -109,7 +108,8 @@ static NTSTATUS dcerpc_schannel_key(TALLOC_CTX *tmp_ctx,
a.in.server_name = r.in.server_name;
a.in.account_name = cli_credentials_get_username(credentials);
- a.in.secure_channel_type = chan_type;
+ a.in.secure_channel_type =
+ cli_credentials_get_secure_channel_type(credentials);
a.in.computer_name = cli_credentials_get_workstation(credentials);
a.in.negotiate_flags = &negotiate_flags;
a.out.negotiate_flags = &negotiate_flags;
@@ -143,20 +143,10 @@ NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx,
struct cli_credentials *credentials)
{
NTSTATUS status;
- int chan_type = 0;
-
- if (p->conn->flags & DCERPC_SCHANNEL_BDC) {
- chan_type = SEC_CHAN_BDC;
- } else if (p->conn->flags & DCERPC_SCHANNEL_WORKSTATION) {
- chan_type = SEC_CHAN_WKSTA;
- } else if (p->conn->flags & DCERPC_SCHANNEL_DOMAIN) {
- chan_type = SEC_CHAN_DOMAIN;
- }
/* Fills in NETLOGON credentials */
status = dcerpc_schannel_key(tmp_ctx,
- p, credentials,
- chan_type);
+ p, credentials);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("Failed to setup credentials for account %s: %s\n",