projects
/
mech_eap.orig
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
comment out dumping code
[mech_eap.orig]
/
inquire_cred.c
diff --git
a/inquire_cred.c
b/inquire_cred.c
index
c74e617
..
243276d
100644
(file)
--- a/
inquire_cred.c
+++ b/
inquire_cred.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 201
0
, JANET(UK)
+ * Copyright (c) 201
1
, JANET(UK)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-30,6
+30,10
@@
* SUCH DAMAGE.
*/
* SUCH DAMAGE.
*/
+/*
+ * Return credential handle properties.
+ */
+
#include "gssapiP_eap.h"
OM_uint32
#include "gssapiP_eap.h"
OM_uint32
@@
-40,7
+44,14
@@
gss_inquire_cred(OM_uint32 *minor,
gss_cred_usage_t *cred_usage,
gss_OID_set *mechanisms)
{
gss_cred_usage_t *cred_usage,
gss_OID_set *mechanisms)
{
- OM_uint32 major = GSS_S_COMPLETE;
+ OM_uint32 major;
+
+ if (cred == NULL) {
+ *minor = EINVAL;
+ return GSS_S_NO_CRED;
+ }
+
+ GSSEAP_MUTEX_LOCK(&cred->mutex);
if (name != NULL) {
major = gssEapDuplicateName(minor, cred->name, name);
if (name != NULL) {
major = gssEapDuplicateName(minor, cred->name, name);
@@
-88,6
+99,11
@@
gss_inquire_cred(OM_uint32 *minor,
goto cleanup;
}
goto cleanup;
}
+ major = GSS_S_COMPLETE;
+ *minor = 0;
+
cleanup:
cleanup:
+ GSSEAP_MUTEX_UNLOCK(&cred->mutex);
+
return major;
}
return major;
}