summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-03-25 11:40:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:12 -0500
commitff573597613e8253ff1b9d6c6a69cd127a9e4fb5 (patch)
treedcc6900f34122082b0e99565d6da9ddc1694dca7 /source4/librpc/rpc
parent57589e3b67c4fbe6412478bef9a46cdf5b1df795 (diff)
downloadsamba-ff573597613e8253ff1b9d6c6a69cd127a9e4fb5.tar.gz
samba-ff573597613e8253ff1b9d6c6a69cd127a9e4fb5.tar.bz2
samba-ff573597613e8253ff1b9d6c6a69cd127a9e4fb5.zip
r14715: Correct the definition of the DCE/RPC bind_nak, per the OpenGroup spec.
This allows us to correctly parse the bind_nak from NT4, when we use an invalid auth type (the unsupported SPNEGO).. Andrew Bartlett (This used to be commit ce0c7f86fd5eeeacad885d732b66c65ac9103ace)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 16721b4b03..a2cd62d399 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -72,6 +72,11 @@ struct dcerpc_connection *dcerpc_connection_init(TALLOC_CTX *mem_ctx,
}
c->event_ctx = ev;
+
+ if (!talloc_reference(c, ev)) {
+ talloc_free(c);
+ return NULL;
+ }
c->call_id = 1;
c->security_state.auth_info = NULL;
c->security_state.session_key = dcerpc_generic_session_key;
@@ -478,6 +483,8 @@ static NTSTATUS dcerpc_map_reason(uint16_t reason)
switch (reason) {
case DCERPC_BIND_REASON_ASYNTAX:
return NT_STATUS_RPC_UNSUPPORTED_NAME_SYNTAX;
+ case DCERPC_BIND_REASON_INVALID_AUTH_TYPE:
+ return NT_STATUS_INVALID_PARAMETER;
}
return NT_STATUS_UNSUCCESSFUL;
}