From ad2854bcfc33c199c17a7b2f11cd514f4ed0640d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 9 May 2007 15:33:01 +0000 Subject: [PATCH] Fill in all of the variables if they are passed in. Pointed out by Phil Fisher. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20634 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/gssapi/krb5/inquire_cred_by_mech.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/gssapi/krb5/inquire_cred_by_mech.c b/lib/gssapi/krb5/inquire_cred_by_mech.c index 60c67d5e1..de7ec6cd7 100644 --- a/lib/gssapi/krb5/inquire_cred_by_mech.c +++ b/lib/gssapi/krb5/inquire_cred_by_mech.c @@ -54,14 +54,23 @@ OM_uint32 _gsskrb5_inquire_cred_by_mech ( name, &lifetime, &usage, NULL); if (maj_stat) return maj_stat; - - if (initiator_lifetime) + + if (initiator_lifetime) { if (usage == GSS_C_INITIATE || usage == GSS_C_BOTH) *initiator_lifetime = lifetime; + else + *initiator_lifetime = 0; + } - if (acceptor_lifetime) + if (acceptor_lifetime) { if (usage == GSS_C_ACCEPT || usage == GSS_C_BOTH) *acceptor_lifetime = lifetime; + else + *acceptor_lifetime = 0; + } + + if (cred_usage) + *cred_usage = usage; return GSS_S_COMPLETE; }