git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8268374
)
auth/gensec: make use of gensec_update_send/recv in gensec_update_ev()
author
Stefan Metzmacher
<metze@samba.org>
Thu, 11 May 2017 11:16:16 +0000
(13:16 +0200)
committer
Andreas Schneider
<asn@cryptomilk.org>
Tue, 25 Jul 2017 11:51:12 +0000
(13:51 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
auth/gensec/gensec.c
patch
|
blob
|
history
diff --git
a/auth/gensec/gensec.c
b/auth/gensec/gensec.c
index 6569c72ea2573e0ff6e9c21c72ec46b92bc78bee..6a747ca3601c241dbc2ca5a8f63c6dddc022ad14 100644
(file)
--- a/
auth/gensec/gensec.c
+++ b/
auth/gensec/gensec.c
@@
-325,15
+325,10
@@
_PUBLIC_ NTSTATUS gensec_update_ev(struct gensec_security *gensec_security,
const DATA_BLOB in, DATA_BLOB *out)
{
NTSTATUS status;
const DATA_BLOB in, DATA_BLOB *out)
{
NTSTATUS status;
- const struct gensec_security_ops *ops = gensec_security->ops;
TALLOC_CTX *frame = NULL;
struct tevent_req *subreq = NULL;
bool ok;
TALLOC_CTX *frame = NULL;
struct tevent_req *subreq = NULL;
bool ok;
- if (gensec_security->child_security != NULL) {
- return NT_STATUS_INVALID_PARAMETER;
- }
-
frame = talloc_stackframe();
if (ev == NULL) {
frame = talloc_stackframe();
if (ev == NULL) {
@@
-350,7
+345,7
@@
_PUBLIC_ NTSTATUS gensec_update_ev(struct gensec_security *gensec_security,
tevent_loop_allow_nesting(ev);
}
tevent_loop_allow_nesting(ev);
}
- subreq =
ops->
update_send(frame, ev, gensec_security, in);
+ subreq =
gensec_
update_send(frame, ev, gensec_security, in);
if (subreq == NULL) {
status = NT_STATUS_NO_MEMORY;
goto fail;
if (subreq == NULL) {
status = NT_STATUS_NO_MEMORY;
goto fail;
@@
-359,20
+354,7
@@
_PUBLIC_ NTSTATUS gensec_update_ev(struct gensec_security *gensec_security,
if (!ok) {
goto fail;
}
if (!ok) {
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);
+ status = gensec_update_recv(subreq, out_mem_ctx, out);
fail:
TALLOC_FREE(frame);
return status;
fail:
TALLOC_FREE(frame);
return status;