From 5bf740dfb8fddd4348cb707c17ed47132d3be13b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 7 Oct 2004 14:44:18 +0000 Subject: r2850: - check for GENSEC_WANT_SEAL in gensec_unseal_packet() - pass functions to the subcontext in spnego metze (This used to be commit d02fab41f8261095ca8f9a819e0c25bef41b5807) --- source4/libcli/auth/gensec.c | 4 ++++ source4/libcli/auth/spnego.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c index b6c4f91610..d9849276a6 100644 --- a/source4/libcli/auth/gensec.c +++ b/source4/libcli/auth/gensec.c @@ -314,6 +314,10 @@ NTSTATUS gensec_unseal_packet(struct gensec_security *gensec_security, if (!gensec_security->ops->unseal_packet) { return NT_STATUS_NOT_IMPLEMENTED; } + if (!(gensec_security->want_features & GENSEC_WANT_SEAL)) { + return NT_STATUS_INVALID_PARAMETER; + } + return gensec_security->ops->unseal_packet(gensec_security, mem_ctx, data, length, whole_pdu, pdu_length, diff --git a/source4/libcli/auth/spnego.c b/source4/libcli/auth/spnego.c index efe9ad675b..4409f5ea9d 100644 --- a/source4/libcli/auth/spnego.c +++ b/source4/libcli/auth/spnego.c @@ -108,7 +108,6 @@ static NTSTATUS gensec_spnego_check_packet(struct gensec_security *gensec_securi { struct spnego_state *spnego_state = gensec_security->private_data; - return NT_STATUS_NOT_IMPLEMENTED; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { return NT_STATUS_INVALID_PARAMETER; @@ -129,7 +128,6 @@ static NTSTATUS gensec_spnego_seal_packet(struct gensec_security *gensec_securit { struct spnego_state *spnego_state = gensec_security->private_data; - return NT_STATUS_NOT_IMPLEMENTED; if (spnego_state->state_position != SPNEGO_DONE && spnego_state->state_position != SPNEGO_FALLBACK) { return NT_STATUS_INVALID_PARAMETER; -- cgit