summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-05-13 02:25:44 +0200
committerAndrew Bartlett <abartlet@samba.org>2017-05-21 21:05:08 +0200
commit76693c197adff1cebdd30837310a89c95f3ce4ee (patch)
tree2ee9e8d31526f23eb358f7109f00088e4c670190 /auth
parent31691963b3d9ac460df0c56d36f81ec815db0225 (diff)
downloadsamba-76693c197adff1cebdd30837310a89c95f3ce4ee.tar.gz
auth/gensec: call gensec_verify_features() also after update_recv() in gensec_update_ev()
This is no a real problem until now, because the only backends with update_send()/recv() are "schannel" (which only supports AUTH_LEVEL_{INTEGRITY,PRIVACY}) and "naclrpc_as_system" (which doesn't support any protection beside using unix domain sockets). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'auth')
-rw-r--r--auth/gensec/gensec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/auth/gensec/gensec.c b/auth/gensec/gensec.c
index 6cc82e61176..23d762b2a73 100644
--- a/auth/gensec/gensec.c
+++ b/auth/gensec/gensec.c
@@ -397,6 +397,19 @@ _PUBLIC_ NTSTATUS gensec_update_ev(struct gensec_security *gensec_security,
goto fail;
}
status = ops->update_recv(subreq, out_mem_ctx, out);
+ if (!NT_STATUS_IS_OK(status)) {
+ goto fail;
+ }
+
+ /*
+ * Because callers using the
+ * gensec_start_mech_by_auth_type() never call
+ * gensec_want_feature(), it isn't sensible for them
+ * to have to call gensec_have_feature() manually, and
+ * these are not points of negotiation, but are
+ * asserted by the client
+ */
+ status = gensec_verify_features(gensec_security);
fail:
TALLOC_FREE(frame);
return status;