summaryrefslogtreecommitdiffstats
path: root/proxy/src/mechglue/gpp_context.c
diff options
context:
space:
mode:
authorGünther Deschner <gdeschner@redhat.com>2013-03-09 00:30:47 +0100
committerSimo Sorce <simo@redhat.com>2013-03-14 13:42:50 -0400
commit1dd5fe0f01c53b20a71983f3eddab373a239d3ee (patch)
tree14ee3ae7645b3d5a8d2a943bf275f1b2db5bb6ad /proxy/src/mechglue/gpp_context.c
parent8d86b99faeb2e725471bedc9837c72e9e579ca3b (diff)
downloadgss-proxy-1dd5fe0f01c53b20a71983f3eddab373a239d3ee.tar.gz
gss-proxy-1dd5fe0f01c53b20a71983f3eddab373a239d3ee.tar.xz
gss-proxy-1dd5fe0f01c53b20a71983f3eddab373a239d3ee.zip
Fix gssi_context_time for remote calls.
lifetime is alredy returned as remaining seconds of lifetime. Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'proxy/src/mechglue/gpp_context.c')
-rw-r--r--proxy/src/mechglue/gpp_context.c7
1 files changed, 3 insertions, 4 deletions
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) {