mirror of
https://github.com/samba-team/samba.git
synced 2025-02-21 01:59:07 +03:00
r1348: get gensec backend by OID instead of name
metze
This commit is contained in:
parent
3f84263c27
commit
38e00f8719
@ -162,17 +162,6 @@ 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)
|
||||
{
|
||||
|
@ -421,7 +421,7 @@ static NTSTATUS smb_raw_session_setup_generic_spnego(struct cli_session *session
|
||||
goto done;
|
||||
}
|
||||
|
||||
status = gensec_start_mech_by_name(session->gensec, "spnego");
|
||||
status = gensec_start_mech_by_oid(session->gensec, OID_SPNEGO);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(1, ("Failed to start set GENSEC client SPNEGO mechanism: %s\n",
|
||||
nt_errstr(status)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user