X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=mech_eap%2Finquire_cred.c;h=243276d68c55579f8244000041c42311574f41e9;hb=refs%2Fheads%2Fddf-name;hp=05ae554d4aad4691c1c3281708c238827fcc8727;hpb=e508e24662b582f1f7d10db50b544e6b7f332836;p=moonshot.git diff --git a/mech_eap/inquire_cred.c b/mech_eap/inquire_cred.c index 05ae554..243276d 100644 --- a/mech_eap/inquire_cred.c +++ b/mech_eap/inquire_cred.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. */ +/* + * Return credential handle properties. + */ + #include "gssapiP_eap.h" OM_uint32 @@ -40,10 +44,12 @@ gss_inquire_cred(OM_uint32 *minor, gss_cred_usage_t *cred_usage, gss_OID_set *mechanisms) { - OM_uint32 major = GSS_S_COMPLETE; + OM_uint32 major; - if (cred == NULL) + if (cred == NULL) { + *minor = EINVAL; return GSS_S_NO_CRED; + } GSSEAP_MUTEX_LOCK(&cred->mutex); @@ -93,6 +99,9 @@ gss_inquire_cred(OM_uint32 *minor, goto cleanup; } + major = GSS_S_COMPLETE; + *minor = 0; + cleanup: GSSEAP_MUTEX_UNLOCK(&cred->mutex);