slightly retentive cleanup of error codes
This commit is contained in:
@@ -45,7 +45,7 @@ mech_authorize_localname(OM_uint32 *minor_status,
|
||||
const struct _gss_name *user,
|
||||
int *user_ok)
|
||||
{
|
||||
OM_uint32 major_status = GSS_S_UNAVAILABLE;
|
||||
OM_uint32 major_status = GSS_S_NAME_NOT_MN;
|
||||
struct _gss_mechanism_name *mn;
|
||||
|
||||
*user_ok = 0;
|
||||
@@ -53,8 +53,10 @@ mech_authorize_localname(OM_uint32 *minor_status,
|
||||
HEIM_SLIST_FOREACH(mn, &name->gn_mn, gmn_link) {
|
||||
gssapi_mech_interface m = mn->gmn_mech;
|
||||
|
||||
if (!m->gm_authorize_localname)
|
||||
if (m->gm_authorize_localname == NULL) {
|
||||
major_status = GSS_S_UNAVAILABLE;
|
||||
continue;
|
||||
}
|
||||
|
||||
major_status = m->gm_authorize_localname(minor_status,
|
||||
mn->gmn_name,
|
||||
@@ -131,7 +133,7 @@ gss_authorize_localname(OM_uint32 *minor_status,
|
||||
if (gss_name == GSS_C_NO_NAME || gss_user == GSS_C_NO_NAME)
|
||||
return GSS_S_CALL_INACCESSIBLE_READ;
|
||||
|
||||
/* name must not be a MN */
|
||||
/* user name must not be a MN */
|
||||
if (HEIM_SLIST_FIRST(&user->gn_mn) != NULL)
|
||||
return GSS_S_BAD_NAME;
|
||||
|
||||
|
Reference in New Issue
Block a user