X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=inquire_name.c;h=2a4e0e39b74fa26c3c4cfe9e54e8e7dfce0f181c;hb=refs%2Fheads%2Fjson-name;hp=e01cc61a9c3ab4c13b682b5e0951742a6f3df3fd;hpb=81378d116795fa8a7a56dc8e00c3b2666126682d;p=mech_eap.orig diff --git a/inquire_name.c b/inquire_name.c index e01cc61..2a4e0e3 100644 --- a/inquire_name.c +++ b/inquire_name.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, JANET(UK) + * Copyright (c) 2011, JANET(UK) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,6 +30,10 @@ * SUCH DAMAGE. */ +/* + * Enumerate name attributes. + */ + #include "gssapiP_eap.h" OM_uint32 gss_inquire_name(OM_uint32 *minor, @@ -40,15 +44,23 @@ OM_uint32 gss_inquire_name(OM_uint32 *minor, { OM_uint32 major, tmpMinor; - *name_is_MN = 1; - *MN_mech = GSS_EAP_MECHANISM; - *attrs = GSS_C_NO_BUFFER_SET; + *minor = 0; + + if (name_is_MN != NULL) + *name_is_MN = 0; + if (MN_mech != NULL) + *MN_mech = GSS_C_NO_OID; + if (attrs != NULL) + *attrs = GSS_C_NO_BUFFER_SET; if (name == GSS_C_NO_NAME) { *minor = EINVAL; return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME; } + if (attrs == NULL) + return GSS_S_COMPLETE; + GSSEAP_MUTEX_LOCK(&name->mutex); major = gssEapInquireName(minor, name, name_is_MN, MN_mech, attrs);