From: Luke Howard Date: Sun, 18 Sep 2011 03:39:51 +0000 (+1000) Subject: Add CRED_FLAG_TARGET X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.orig;a=commitdiff_plain;h=b1b3dca0c2202a69aad49f04a54fa6cc2fec09de Add CRED_FLAG_TARGET Set a flag indicating whether the credential has been bound to a service --- diff --git a/mech_eap/gssapiP_eap.h b/mech_eap/gssapiP_eap.h index 43208a9..8b498e9 100644 --- a/mech_eap/gssapiP_eap.h +++ b/mech_eap/gssapiP_eap.h @@ -149,6 +149,7 @@ struct gss_name_struct #define CRED_FLAG_PASSWORD 0x00040000 #define CRED_FLAG_DEFAULT_CCACHE 0x00080000 #define CRED_FLAG_RESOLVED 0x00100000 +#define CRED_FLAG_TARGET 0x00200000 #define CRED_FLAG_PUBLIC_MASK 0x0000FFFF #ifdef HAVE_HEIMDAL_VERSION diff --git a/mech_eap/util_cred.c b/mech_eap/util_cred.c index fad8bad..37e94b0 100644 --- a/mech_eap/util_cred.c +++ b/mech_eap/util_cred.c @@ -541,6 +541,10 @@ gssEapSetCredService(OM_uint32 *minor, major = gssEapDuplicateName(minor, target, &newTarget); if (GSS_ERROR(major)) goto cleanup; + + cred->flags |= CRED_FLAG_TARGET; + } else { + cred->flags &= ~(CRED_FLAG_TARGET); } gssEapReleaseName(&tmpMinor, &cred->target);