From: Stefan Metzmacher Date: Thu, 11 May 2017 12:22:27 +0000 (+0200) Subject: auth/gensec: don't allow gensec_update[_ev] to be called on a subcontext X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=39353c9a6e3628a670fc9aa130b6eaf05d1083be;p=amitay%2Fsamba.git auth/gensec: don't allow gensec_update[_ev] to be called on a subcontext Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/auth/gensec/gensec.c b/auth/gensec/gensec.c index 6a747ca3601..f3969b4129b 100644 --- a/auth/gensec/gensec.c +++ b/auth/gensec/gensec.c @@ -329,6 +329,13 @@ _PUBLIC_ NTSTATUS gensec_update_ev(struct gensec_security *gensec_security, struct tevent_req *subreq = NULL; bool ok; + if (gensec_security->subcontext) { + /* + * gensec modules are not allowed to call the sync version. + */ + return NT_STATUS_INTERNAL_ERROR; + } + frame = talloc_stackframe(); if (ev == NULL) {