From: Luke Howard Date: Thu, 31 Mar 2011 07:55:25 +0000 (+1100) Subject: If RADIUS returns a present but empty PW_USER_NAME, treat as anonymous. X-Git-Tag: tr-beta1~213 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=265178b55bb8dc2770a64d118e0d3e7a638ae117;p=moonshot.git If RADIUS returns a present but empty PW_USER_NAME, treat as anonymous. --- diff --git a/mech_eap/accept_sec_context.c b/mech_eap/accept_sec_context.c index afbfb3f..a0421ea 100644 --- a/mech_eap/accept_sec_context.c +++ b/mech_eap/accept_sec_context.c @@ -72,7 +72,7 @@ acceptReadyEap(OM_uint32 *minor, gss_ctx_id_t ctx, gss_cred_id_t cred) major = gssEapRadiusGetRawAvp(minor, ctx->acceptorCtx.vps, PW_USER_NAME, 0, &vp); - if (major == GSS_S_COMPLETE) { + if (major == GSS_S_COMPLETE && vp->length) { nameBuf.length = vp->length; nameBuf.value = vp->vp_strvalue; } else {