Check that cred != GSS_C_NO_CREDENTIAL, this is a standard conformance

failure, but much better then a crash.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17026 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-09 18:38:13 +00:00
parent 59aa089d03
commit 31b3e7004d
2 changed files with 10 additions and 0 deletions

View File

@@ -64,6 +64,11 @@ OM_uint32 gss_add_cred (
return GSS_S_NO_CRED;
}
if (cred == GSS_C_NO_CREDENTIAL) { /* XXX standard conformance failure */
*minor_status = 0;
return GSS_S_NO_CRED;
}
/* check if requested output usage is compatible with output usage */
if (output_cred_handle != NULL) {
HEIMDAL_MUTEX_lock(&cred->cred_id_mutex);

View File

@@ -64,6 +64,11 @@ OM_uint32 gss_add_cred (
return GSS_S_NO_CRED;
}
if (cred == GSS_C_NO_CREDENTIAL) { /* XXX standard conformance failure */
*minor_status = 0;
return GSS_S_NO_CRED;
}
/* check if requested output usage is compatible with output usage */
if (output_cred_handle != NULL) {
HEIMDAL_MUTEX_lock(&cred->cred_id_mutex);