From 209565763c750c0d86fa14488fa89b89f2a23d36 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 6 Feb 2000 05:20:51 +0000 Subject: [PATCH] update to new prototype of krb5_timeofday git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7857 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/get_in_tkt.c | 4 ++-- lib/krb5/init_creds_pw.c | 6 +++--- lib/krb5/rd_cred.c | 4 ++-- lib/krb5/rd_priv.c | 16 ++++++++-------- lib/krb5/rd_req.c | 2 +- lib/krb5/rd_safe.c | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/krb5/get_in_tkt.c b/lib/krb5/get_in_tkt.c index 7883e0fdf..3f0331215 100644 --- a/lib/krb5/get_in_tkt.c +++ b/lib/krb5/get_in_tkt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1998, 1999 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -131,7 +131,7 @@ _krb5_extract_ticket(krb5_context context, krb5_principal tmp_principal; int tmp; time_t tmp_time; - int32_t sec_now; + krb5_timestamp sec_now; /* compare client */ diff --git a/lib/krb5/init_creds_pw.c b/lib/krb5/init_creds_pw.c index 5eb3275f6..2e5518bb7 100644 --- a/lib/krb5/init_creds_pw.c +++ b/lib/krb5/init_creds_pw.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1998, 1999 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -88,7 +88,7 @@ init_cred (krb5_context context, krb5_error_code ret; krb5_realm *client_realm; int tmp; - int32_t now; + krb5_timestamp now; krb5_timeofday (context, &now); @@ -164,7 +164,7 @@ print_expire (krb5_context context, { int i; LastReq *lr = &rep->enc_part.last_req; - int32_t sec; + krb5_timestamp sec; time_t t; krb5_timeofday (context, &sec); diff --git a/lib/krb5/rd_cred.c b/lib/krb5/rd_cred.c index 68c5a1aca..1f8837c45 100644 --- a/lib/krb5/rd_cred.c +++ b/lib/krb5/rd_cred.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997 - 1999 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -122,7 +122,7 @@ krb5_rd_cred (krb5_context context, /* check timestamp */ if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { - int32_t sec; + krb5_timestamp sec; krb5_timeofday (context, &sec); diff --git a/lib/krb5/rd_priv.c b/lib/krb5/rd_priv.c index 48c1fb60f..5fc021ef5 100644 --- a/lib/krb5/rd_priv.c +++ b/lib/krb5/rd_priv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1998 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -111,15 +111,15 @@ krb5_rd_priv(krb5_context context, /* check timestamp */ if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { - int32_t sec; + krb5_timestamp sec; krb5_timeofday (context, &sec); - if (part.timestamp == NULL || - part.usec == NULL || - abs(*part.timestamp - sec) > context->max_skew) { - ret = KRB5KRB_AP_ERR_SKEW; - goto failure_part; - } + if (part.timestamp == NULL || + part.usec == NULL || + abs(*part.timestamp - sec) > context->max_skew) { + ret = KRB5KRB_AP_ERR_SKEW; + goto failure_part; + } } /* XXX - check replay cache */ diff --git a/lib/krb5/rd_req.c b/lib/krb5/rd_req.c index 250e0b84e..eeca55a72 100644 --- a/lib/krb5/rd_req.c +++ b/lib/krb5/rd_req.c @@ -128,7 +128,7 @@ krb5_decrypt_ticket(krb5_context context, return ret; { - int32_t now; + krb5_timestamp now; time_t start = t.authtime; krb5_timeofday (context, &now); diff --git a/lib/krb5/rd_safe.c b/lib/krb5/rd_safe.c index eb87eb0ff..f3526ebc7 100644 --- a/lib/krb5/rd_safe.c +++ b/lib/krb5/rd_safe.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -131,7 +131,7 @@ krb5_rd_safe(krb5_context context, /* check timestamp */ if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { - int32_t sec; + krb5_timestamp sec; krb5_timeofday (context, &sec);