summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-06-15 00:05:29 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-07-25 17:42:55 +0200
commitee9f4374ed5e531e8af008eb0642108bca1d2744 (patch)
tree6f39956dddd694a10dc2f0241c160f983da2449e /auth
parent39353c9a6e3628a670fc9aa130b6eaf05d1083be (diff)
downloadsamba-ee9f4374ed5e531e8af008eb0642108bca1d2744.tar.gz
auth/gensec: finally remove unused gensec_update_ev()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jul 25 17:42:55 CEST 2017 on sn-devel-144
Diffstat (limited to 'auth')
-rw-r--r--auth/gensec/gensec.c56
-rw-r--r--auth/gensec/gensec.h4
2 files changed, 23 insertions, 37 deletions
diff --git a/auth/gensec/gensec.c b/auth/gensec/gensec.c
index f3969b4129b..61bff225450 100644
--- a/auth/gensec/gensec.c
+++ b/auth/gensec/gensec.c
@@ -319,13 +319,23 @@ static NTSTATUS gensec_verify_features(struct gensec_security *gensec_security)
return NT_STATUS_OK;
}
-_PUBLIC_ NTSTATUS gensec_update_ev(struct gensec_security *gensec_security,
- TALLOC_CTX *out_mem_ctx,
- struct tevent_context *ev,
- const DATA_BLOB in, DATA_BLOB *out)
+/**
+ * Next state function for the GENSEC state machine
+ *
+ * @param gensec_security GENSEC State
+ * @param out_mem_ctx The TALLOC_CTX for *out to be allocated on
+ * @param in The request, as a DATA_BLOB
+ * @param out The reply, as an talloc()ed DATA_BLOB, on *out_mem_ctx
+ * @return Error, MORE_PROCESSING_REQUIRED if a reply is sent,
+ * or NT_STATUS_OK if the user is authenticated.
+ */
+_PUBLIC_ NTSTATUS gensec_update(struct gensec_security *gensec_security,
+ TALLOC_CTX *out_mem_ctx,
+ const DATA_BLOB in, DATA_BLOB *out)
{
NTSTATUS status;
TALLOC_CTX *frame = NULL;
+ struct tevent_context *ev = NULL;
struct tevent_req *subreq = NULL;
bool ok;
@@ -338,20 +348,18 @@ _PUBLIC_ NTSTATUS gensec_update_ev(struct gensec_security *gensec_security,
frame = talloc_stackframe();
+ ev = samba_tevent_context_init(frame);
if (ev == NULL) {
- ev = samba_tevent_context_init(frame);
- if (ev == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto fail;
- }
-
- /*
- * TODO: remove this hack once the backends
- * are fixed.
- */
- tevent_loop_allow_nesting(ev);
+ status = NT_STATUS_NO_MEMORY;
+ goto fail;
}
+ /*
+ * TODO: remove this hack once the backends
+ * are fixed.
+ */
+ tevent_loop_allow_nesting(ev);
+
subreq = gensec_update_send(frame, ev, gensec_security, in);
if (subreq == NULL) {
status = NT_STATUS_NO_MEMORY;
@@ -367,24 +375,6 @@ _PUBLIC_ NTSTATUS gensec_update_ev(struct gensec_security *gensec_security,
return status;
}
-/**
- * Next state function for the GENSEC state machine
- *
- * @param gensec_security GENSEC State
- * @param out_mem_ctx The TALLOC_CTX for *out to be allocated on
- * @param in The request, as a DATA_BLOB
- * @param out The reply, as an talloc()ed DATA_BLOB, on *out_mem_ctx
- * @return Error, MORE_PROCESSING_REQUIRED if a reply is sent,
- * or NT_STATUS_OK if the user is authenticated.
- */
-
-_PUBLIC_ NTSTATUS gensec_update(struct gensec_security *gensec_security,
- TALLOC_CTX *out_mem_ctx,
- const DATA_BLOB in, DATA_BLOB *out)
-{
- return gensec_update_ev(gensec_security, out_mem_ctx, NULL, in, out);
-}
-
struct gensec_update_state {
const struct gensec_security_ops *ops;
struct gensec_security *gensec_security;
diff --git a/auth/gensec/gensec.h b/auth/gensec/gensec.h
index a466f27b756..d424067d02c 100644
--- a/auth/gensec/gensec.h
+++ b/auth/gensec/gensec.h
@@ -138,10 +138,6 @@ size_t gensec_max_update_size(struct gensec_security *gensec_security);
NTSTATUS gensec_update(struct gensec_security *gensec_security,
TALLOC_CTX *out_mem_ctx,
const DATA_BLOB in, DATA_BLOB *out);
-NTSTATUS gensec_update_ev(struct gensec_security *gensec_security,
- TALLOC_CTX *out_mem_ctx,
- struct tevent_context *ev,
- const DATA_BLOB in, DATA_BLOB *out);
struct tevent_req *gensec_update_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct gensec_security *gensec_security,