Udiff g_rel_cred.c
--- /net/etna.eng/build7/semery/mit2/webrev/usr/src/lib/libgss/g_rel_cred.c- Wed Sep 8 17:00:36 2004
+++ g_rel_cred.c Wed Sep 8 13:42:04 2004
@@ -1,11 +1,11 @@
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "@(#)g_rel_cred.c 1.15 04/09/08 SMI"
+#pragma ident "@(#)g_rel_cred.c 1.14 04/02/23 SMI"
/*
* glue routine for gss_release_cred
*/
@@ -26,31 +26,29 @@
OM_uint32 status, temp_status;
int j;
gss_union_cred_t union_cred;
gss_mechanism mech;
- gss_initialize();
+ if (minor_status == NULL)
+ return (GSS_S_CALL_INACCESSIBLE_WRITE);
- if (minor_status)
*minor_status = 0;
- /* if the cred_handle is null, return a NO_CRED error */
+ if (cred_handle == NULL)
+ return (GSS_S_NO_CRED | GSS_S_CALL_INACCESSIBLE_READ);
- if (cred_handle == GSS_C_NO_CREDENTIAL)
- return (GSS_S_NO_CRED);
-
/*
* Loop through the union_cred struct, selecting the approprate
* underlying mechanism routine and calling it. At the end,
* release all of the storage taken by the union_cred struct.
*/
union_cred = (gss_union_cred_t)*cred_handle;
*cred_handle = NULL;
- if (union_cred == NULL)
- return (GSS_S_NO_CRED);
+ if (union_cred == (gss_union_cred_t)GSS_C_NO_CREDENTIAL)
+ return (GSS_S_COMPLETE);
status = GSS_S_COMPLETE;
for (j = 0; j < union_cred->count; j++) {
@@ -65,13 +63,13 @@
&union_cred->cred_array[j]);
if (temp_status != GSS_S_COMPLETE)
status = GSS_S_NO_CRED;
} else
- status = GSS_S_NO_CRED;
+ status = GSS_S_UNAVAILABLE;
} else
- status = GSS_S_NO_CRED;
+ status = GSS_S_DEFECTIVE_CREDENTIAL;
}
(void) gss_release_buffer(minor_status, &union_cred->auxinfo.name);
free(union_cred->cred_array);
free(union_cred->mechs_array);