sanon: Do not acquire creds for GSS_C_NO_NAME

This commit is contained in:
Nicolas Williams
2026-01-18 20:49:30 -06:00
parent d233bf84d7
commit 76db37d833
3 changed files with 12 additions and 6 deletions

View File

@@ -46,6 +46,9 @@ _gss_sanon_acquire_cred_from(OM_uint32 *minor,
{
*minor = 0;
if (desired_name == GSS_C_NO_NAME)
return GSS_S_NO_CRED;
if (desired_name == GSS_C_NO_NAME ||
desired_name == _gss_sanon_anonymous_identity)
*output_cred_handle = _gss_sanon_anonymous_cred;

View File

@@ -48,6 +48,9 @@ _gss_sanon_add_cred_from(OM_uint32 *minor,
{
*minor = 0;
if (desired_name == GSS_C_NO_NAME)
return GSS_S_NO_CRED;
if (output_cred_handle != NULL) {
if (desired_name == GSS_C_NO_NAME ||
desired_name == _gss_sanon_anonymous_identity)

View File

@@ -146,8 +146,8 @@ ${kdestroy}
for mech in sanon-x25519 spnego ; do
echo "Trying ${mech} pre-authentication with FAST armor"; > messages.log
${kinit} --fast-armor-cache=${acache} \
--anonymous --gss-mech=${mech} @$R 2>/dev/null || \
${kinit} --fast-armor-cache=${acache} --anonymous \
--gss-mech=${mech} --gss-name=anonymous @$R 2>/dev/null || \
{ ec=1 ; eval "${testfailed}"; }
echo "Getting service ticket"
@@ -155,8 +155,8 @@ for mech in sanon-x25519 spnego ; do
${kdestroy}
echo "Trying ${mech} pre-authentication with anonymous FAST armor"; > messages.log
${kinit} --pk-anon-fast-armor \
--anonymous --gss-mech=${mech} @$R 2>/dev/null || \
${kinit} --pk-anon-fast-armor --anonymous \
--gss-mech=${mech} --gss-name=anonymous @$R 2>/dev/null || \
{ ec=1 ; eval "${testfailed}"; }
echo "Getting service ticket"
@@ -164,8 +164,8 @@ for mech in sanon-x25519 spnego ; do
${kdestroy}
echo "Trying ${mech} pre-authentication with no FAST armor"; > messages.log
${kinit} \
--anonymous --gss-mech=${mech} @$R 2>/dev/null && \
${kinit} --anonymous \
----gss-mech=${mech} --gss-name=anonymous @$R 2>/dev/null && \
{ ec=1 ; eval "${testfailed}"; }
done