Return WRONG_ACCEPTOR_NAME
authorSam Hartman <hartmans@painless-security.com>
Fri, 16 Nov 2012 02:38:27 +0000 (21:38 -0500)
committerSam Hartman <hartmans@painless-security.com>
Fri, 16 Nov 2012 03:09:25 +0000 (22:09 -0500)
Create a new error for incorrect acceptor name received from acceptor
to aid in debugging.

mech_eap/gsseap_err.et
mech_eap/init_sec_context.c

index c126424..3d8fefb 100644 (file)
@@ -70,6 +70,7 @@ error_code GSSEAP_BAD_SERVICE_NAME,             "Name is not a valid service nam
 error_code GSSEAP_BAD_INITIATOR_NAME,           "Initiator identity must be a valid name"
 error_code GSSEAP_NO_HOSTNAME,                  "Could not determine local host name"
 error_code GSSEAP_NO_ACCEPTOR_NAME,             "Could not determine acceptor identity"
+error_code GSSEAP_WRONG_ACCEPTOR_NAME, "Acceptor identity different than expected"
 error_code GSSEAP_BAD_NAME_TOKEN,               "Name token is malformed or corrupt"
 error_code GSSEAP_NO_LOCAL_MAPPING,             "Unable to map name to a local identity"
 
index 7826556..2fb682a 100644 (file)
@@ -589,7 +589,7 @@ eapGssSmInitAcceptorName(OM_uint32 *minor,
             gssEapReleaseName(&tmpMinor, &nameHint);
 
             if (!equal) {
-                *minor = GSSEAP_BAD_CONTEXT_TOKEN;
+             *minor = GSSEAP_WRONG_ACCEPTOR_NAME;
                 return GSS_S_DEFECTIVE_TOKEN;
             }
         } else {