summaryrefslogtreecommitdiff
path: root/source4/libcli/auth/gensec.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/auth/gensec.c')
-rw-r--r--source4/libcli/auth/gensec.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c
index f6d6db9e62..8ece7c76dc 100644
--- a/source4/libcli/auth/gensec.c
+++ b/source4/libcli/auth/gensec.c
@@ -162,6 +162,17 @@ static NTSTATUS gensec_start_mech(struct gensec_security *gensec_security)
return NT_STATUS_INVALID_PARAMETER;
}
+NTSTATUS gensec_start_mech_by_name(struct gensec_security *gensec_security,
+ const char *name)
+{
+ gensec_security->ops = gensec_security_by_name(name);
+ if (!gensec_security->ops) {
+ DEBUG(1, ("Could not find GENSEC backend for name=%s\n", name));
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+ return gensec_start_mech(gensec_security);
+}
+
NTSTATUS gensec_start_mech_by_authtype(struct gensec_security *gensec_security,
uint8_t authtype)
{