summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-01-02 15:48:09 +1100
committerStefan Metzmacher <metze@samba.org>2012-01-18 16:23:22 +0100
commit5ddec1182ec378e4560f0d98604060fdc4b6f542 (patch)
tree1eaf362d0c128a7f63051e0710ed12294feb5167 /source3/rpc_server
parent0c1b4c232135ebdef58bb5e697dfc60ddbb358bc (diff)
downloadsamba-5ddec1182ec378e4560f0d98604060fdc4b6f542.tar.gz
samba-5ddec1182ec378e4560f0d98604060fdc4b6f542.tar.bz2
samba-5ddec1182ec378e4560f0d98604060fdc4b6f542.zip
s3-librpc: Simplify SPNEGO code now that all mechs use a struct gensec_security
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/dcesrv_spnego.c15
-rw-r--r--source3/rpc_server/srv_pipe.c5
2 files changed, 4 insertions, 16 deletions
diff --git a/source3/rpc_server/dcesrv_spnego.c b/source3/rpc_server/dcesrv_spnego.c
index 1bea2321ef..0a6b3b8512 100644
--- a/source3/rpc_server/dcesrv_spnego.c
+++ b/source3/rpc_server/dcesrv_spnego.c
@@ -136,18 +136,9 @@ NTSTATUS spnego_server_step(struct spnego_context *sp_ctx,
case SPNEGO_CONV_AUTH_MORE:
- switch(sp_ctx->mech) {
- case SPNEGO_KRB5:
- case SPNEGO_NTLMSSP:
- status = auth_generic_server_step(
- sp_ctx->mech_ctx.gensec_security,
- mem_ctx, &token_in, &token_out);
- break;
- default:
- status = NT_STATUS_INVALID_PARAMETER;
- goto done;
- }
-
+ status = auth_generic_server_step(
+ sp_ctx->mech_ctx.gensec_security,
+ mem_ctx, &token_in, &token_out);
break;
case SPNEGO_CONV_AUTH_DONE:
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 18389b42e0..8731a28d82 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -678,10 +678,8 @@ static bool pipe_auth_generic_verify_final(TALLOC_CTX *mem_ctx,
static NTSTATUS pipe_auth_verify_final(struct pipes_struct *p)
{
- enum spnego_mech auth_type;
struct gensec_security *gensec_security;
struct spnego_context *spnego_ctx;
- void *mech_ctx;
NTSTATUS status;
switch (p->auth.auth_type) {
@@ -698,8 +696,7 @@ static NTSTATUS pipe_auth_verify_final(struct pipes_struct *p)
case DCERPC_AUTH_TYPE_SPNEGO:
spnego_ctx = talloc_get_type_abort(p->auth.auth_ctx,
struct spnego_context);
- status = spnego_get_negotiated_mech(spnego_ctx,
- &auth_type, &gensec_security);
+ status = spnego_get_negotiated_mech(spnego_ctx, &gensec_security);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Bad SPNEGO state (%s)\n",
nt_errstr(status)));