summaryrefslogtreecommitdiff
path: root/usr/src/lib/libgss/g_inquire_cred.c
diff options
context:
space:
mode:
authorwyllys <none@none>2005-07-13 10:02:39 -0700
committerwyllys <none@none>2005-07-13 10:02:39 -0700
commit354d1447ce995f3923a8f53d41c49fd3e6543282 (patch)
treeb3380cb1588026a43df9055acffff2ed4428a11a /usr/src/lib/libgss/g_inquire_cred.c
parentf3f5a4dd0d8a3e3659add4eeca8b25772c3b35a2 (diff)
downloadillumos-gate-354d1447ce995f3923a8f53d41c49fd3e6543282.tar.gz
6259944 call gss_acquire_cred() with SPNEGO OID, it returns GSS_S_COMPLETE but did not return any credential
6260520 Call gss_context_time() with a handle of an un-established SPNEGO context, it will core dump. 6285582 gss_add_cred() is broken when input_cred_handle == GSS_C_NO_CREDENTIAL, assumes GSS_C_NO_NAME 6287358 SPNEGO init_sec_context fails when given 'actual_mechs' parameter 6290437 gss_accept_sec_context needs better handling of delegated credentials 6293338 call gss_create_empty_oid_set() with oid_set=NULL, it will seg fault.
Diffstat (limited to 'usr/src/lib/libgss/g_inquire_cred.c')
-rw-r--r--usr/src/lib/libgss/g_inquire_cred.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/usr/src/lib/libgss/g_inquire_cred.c b/usr/src/lib/libgss/g_inquire_cred.c
index 78fc641b74..f7b4d025c4 100644
--- a/usr/src/lib/libgss/g_inquire_cred.c
+++ b/usr/src/lib/libgss/g_inquire_cred.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -234,26 +234,31 @@ gss_inquire_cred_by_mech(minor_status, cred_handle, mech_type, name,
if (mech_cred == NULL)
return (GSS_S_DEFECTIVE_CREDENTIAL);
- status = mech->gss_inquire_cred_by_mech(mech->context, minor_status,
- mech_cred, mech_type,
- name ? &internal_name : NULL,
- initiator_lifetime,
- acceptor_lifetime, cred_usage);
-
- if (status != GSS_S_COMPLETE)
- return (status);
+ if (mech->gss_inquire_cred_by_mech != NULL) {
+ status = mech->gss_inquire_cred_by_mech(mech->context,
+ minor_status,
+ mech_cred, mech_type,
+ name ? &internal_name : NULL,
+ initiator_lifetime,
+ acceptor_lifetime, cred_usage);
- if (name) {
- /*
- * Convert internal_name into a union_name equivalent.
- */
- status = __gss_convert_name_to_union_name(
- &temp_minor_status, mech,
- internal_name, name);
- if (status != GSS_S_COMPLETE) {
- *minor_status = temp_minor_status;
+ if (status != GSS_S_COMPLETE)
return (status);
+
+ if (name) {
+ /*
+ * Convert internal_name into a union_name equivalent.
+ */
+ status = __gss_convert_name_to_union_name(
+ &temp_minor_status, mech,
+ internal_name, name);
+ if (status != GSS_S_COMPLETE) {
+ *minor_status = temp_minor_status;
+ return (status);
+ }
}
+ } else {
+ return (GSS_S_UNAVAILABLE);
}
return (GSS_S_COMPLETE);