projects
/
mech_eap.orig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a39728
)
set cred->flags from usage before testing
author
Luke Howard
<lukeh@padl.com>
Mon, 25 Oct 2010 11:45:21 +0000
(22:45 +1100)
committer
Luke Howard
<lukeh@padl.com>
Mon, 25 Oct 2010 11:45:21 +0000
(22:45 +1100)
util_cred.c
patch
|
blob
|
history
diff --git
a/util_cred.c
b/util_cred.c
index
6878bc2
..
fbe1ec0
100644
(file)
--- a/
util_cred.c
+++ b/
util_cred.c
@@
-128,6
+128,23
@@
gssEapAcquireCred(OM_uint32 *minor,
if (GSS_ERROR(major))
goto cleanup;
if (GSS_ERROR(major))
goto cleanup;
+ switch (credUsage) {
+ case GSS_C_BOTH:
+ cred->flags |= CRED_FLAG_INITIATE | CRED_FLAG_ACCEPT;
+ break;
+ case GSS_C_INITIATE:
+ cred->flags |= CRED_FLAG_INITIATE;
+ break;
+ case GSS_C_ACCEPT:
+ cred->flags |= CRED_FLAG_ACCEPT;
+ break;
+ default:
+ major = GSS_S_FAILURE;
+ *minor = GSSEAP_BAD_USAGE;
+ goto cleanup;
+ break;
+ }
+
if (desiredName != GSS_C_NO_NAME) {
GSSEAP_MUTEX_LOCK(&desiredName->mutex);
if (desiredName != GSS_C_NO_NAME) {
GSSEAP_MUTEX_LOCK(&desiredName->mutex);
@@
-178,7
+195,7
@@
gssEapAcquireCred(OM_uint32 *minor,
goto cleanup;
cred->flags |= CRED_FLAG_PASSWORD;
goto cleanup;
cred->flags |= CRED_FLAG_PASSWORD;
- } else if (cred
Usage == GSS_C
_INITIATE) {
+ } else if (cred
->flags & CRED_FLAG
_INITIATE) {
/*
* OK, here we need to ask the supplicant if we have creds or it
* will acquire them, so GS2 can know whether to prompt for a
/*
* OK, here we need to ask the supplicant if we have creds or it
* will acquire them, so GS2 can know whether to prompt for a
@@
-191,23
+208,6
@@
gssEapAcquireCred(OM_uint32 *minor,
goto cleanup;
}
goto cleanup;
}
- switch (credUsage) {
- case GSS_C_BOTH:
- cred->flags |= CRED_FLAG_INITIATE | CRED_FLAG_ACCEPT;
- break;
- case GSS_C_INITIATE:
- cred->flags |= CRED_FLAG_INITIATE;
- break;
- case GSS_C_ACCEPT:
- cred->flags |= CRED_FLAG_ACCEPT;
- break;
- default:
- major = GSS_S_FAILURE;
- *minor = GSSEAP_BAD_USAGE;
- goto cleanup;
- break;
- }
-
major = gssEapValidateMechs(minor, desiredMechs);
if (GSS_ERROR(major))
goto cleanup;
major = gssEapValidateMechs(minor, desiredMechs);
if (GSS_ERROR(major))
goto cleanup;