From 1dd5fe0f01c53b20a71983f3eddab373a239d3ee Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sat, 9 Mar 2013 00:30:47 +0100 Subject: Fix gssi_context_time for remote calls. lifetime is alredy returned as remaining seconds of lifetime. Signed-off-by: Simo Sorce --- proxy/src/mechglue/gpp_context.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'proxy/src') diff --git a/proxy/src/mechglue/gpp_context.c b/proxy/src/mechglue/gpp_context.c index 19a7925..5a3311b 100644 --- a/proxy/src/mechglue/gpp_context.c +++ b/proxy/src/mechglue/gpp_context.c @@ -173,18 +173,17 @@ OM_uint32 gssi_context_time(OM_uint32 *minor_status, * mechanisms for which we can export/import the context */ if (ctx->remote) { OM_uint32 lifetime; - long int t; maj = gpm_inquire_context(&min, ctx->remote, NULL, NULL, &lifetime, NULL, NULL, NULL, NULL); if (maj != GSS_S_COMPLETE) { *minor_status = gpp_map_error(min); return maj; } - t = lifetime - time(NULL); - if (t > 0) { - *time_rec = t; + if (lifetime > 0) { + *time_rec = lifetime; return GSS_S_COMPLETE; } else { + *time_rec = 0; return GSS_S_CONTEXT_EXPIRED; } } else if (ctx->local) { -- cgit