From 5131c693f5ec34eaddef6d94b2981b79ca45a6e7 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 26 Aug 2004 23:34:26 +0000 Subject: [PATCH] * acquire_cred.c (krb5_gss_acquire_cred): Call gssint_initialize_library. Return correct error code on mutex initialization failure. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16687 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/ChangeLog | 6 ++++++ src/lib/gssapi/krb5/acquire_cred.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 4a5757a89..ac27dec44 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,9 @@ +2004-08-26 Ken Raeburn + + * acquire_cred.c (krb5_gss_acquire_cred): Call + gssint_initialize_library. Return correct error code on mutex + initialization failure. + 2004-07-29 Ken Raeburn * gssapi_krb5.c (kg_ccache_name): Variable deleted. diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c index b65fc0962..12d2cacc0 100644 --- a/src/lib/gssapi/krb5/acquire_cred.c +++ b/src/lib/gssapi/krb5/acquire_cred.c @@ -359,6 +359,12 @@ krb5_gss_acquire_cred(minor_status, desired_name, time_req, OM_uint32 ret; krb5_error_code code; + code = gssint_initialize_library(); + if (code) { + *minor_status = code; + return GSS_S_FAILURE; + } + code = krb5_init_context(&context); if (code) { *minor_status = code; @@ -427,7 +433,7 @@ krb5_gss_acquire_cred(minor_status, desired_name, time_req, code = k5_mutex_init(&cred->lock); if (code) { - *minor_status = ret; + *minor_status = code; krb5_free_context(context); return GSS_S_FAILURE; } -- 2.26.2