From be7872de7c8fe8836adc4bf423ded5bb41501969 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sun, 18 Sep 2011 13:39:51 +1000 Subject: [PATCH] Add CRED_FLAG_TARGET Set a flag indicating whether the credential has been bound to a service --- moonshot/mech_eap/gssapiP_eap.h | 1 + moonshot/mech_eap/util_cred.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/moonshot/mech_eap/gssapiP_eap.h b/moonshot/mech_eap/gssapiP_eap.h index 43208a9..8b498e9 100644 --- a/moonshot/mech_eap/gssapiP_eap.h +++ b/moonshot/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/moonshot/mech_eap/util_cred.c b/moonshot/mech_eap/util_cred.c index fad8bad..37e94b0 100644 --- a/moonshot/mech_eap/util_cred.c +++ b/moonshot/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); -- 2.1.4