Skip to content

Commit

Permalink
ticket: 3182
Browse files Browse the repository at this point in the history
version_fixed: 1.4.3

pullup r17384 from trunk.


git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-4@17390 dc483132-0cff-0310-8789-dd5450dbe970
  • Loading branch information
tlyu committed Sep 22, 2005
1 parent da28d8e commit efe1b64
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/lib/gssapi/krb5/ChangeLog
@@ -1,3 +1,10 @@
2005-09-21 Tom Yu <tlyu@mit.edu>

* inq_cred.c (krb5_gss_inquire_cred): Initialize ret_name to
NULL. Only call kg_save_name() if ret_name is actually non-NULL.
Return GSS_C_NO_NAME for now if no principal name in the cred.
Reported by Christoph Weizen.

2005-08-11 Tom Yu <tlyu@mit.edu>

* import_name.c: Include stdio.h regardless of presence of
Expand Down
11 changes: 8 additions & 3 deletions src/lib/gssapi/krb5/inq_cred.c
Expand Up @@ -92,6 +92,7 @@ krb5_gss_inquire_cred(minor_status, cred_handle, name, lifetime_ret,
OM_uint32 ret;

ret = GSS_S_FAILURE;
ret_name = NULL;

code = krb5_init_context(&context);
if (code) {
Expand Down Expand Up @@ -164,22 +165,26 @@ krb5_gss_inquire_cred(minor_status, cred_handle, name, lifetime_ret,
(gss_OID) gss_mech_krb5,
&mechs)))) {
k5_mutex_unlock(&cred->lock);
krb5_free_principal(context, ret_name);
if (ret_name)
krb5_free_principal(context, ret_name);
/* *minor_status set above */
goto fail;
}
}

if (name) {
if (! kg_save_name((gss_name_t) ret_name)) {
if (ret_name != NULL && ! kg_save_name((gss_name_t) ret_name)) {
k5_mutex_unlock(&cred->lock);
(void) gss_release_oid_set(minor_status, &mechs);
krb5_free_principal(context, ret_name);
*minor_status = (OM_uint32) G_VALIDATE_FAILED;
krb5_free_context(context);
return(GSS_S_FAILURE);
}
*name = (gss_name_t) ret_name;
if (ret_name != NULL)
*name = (gss_name_t) ret_name;
else
*name = GSS_C_NO_NAME;
}

if (lifetime_ret)
Expand Down

0 comments on commit efe1b64

Please sign in to comment.