Add CRED_FLAG_TARGET
authorLuke Howard <lukeh@padl.com>
Sun, 18 Sep 2011 03:39:51 +0000 (13:39 +1000)
committerLuke Howard <lukeh@padl.com>
Sun, 18 Sep 2011 03:39:51 +0000 (13:39 +1000)
Set a flag indicating whether the credential has been bound to a service

mech_eap/gssapiP_eap.h
mech_eap/util_cred.c

index 43208a9..8b498e9 100644 (file)
@@ -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
index fad8bad..37e94b0 100644 (file)
@@ -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);