From d03e8cd91d7f42060b814a29fb85a618a0bd261f Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Fri, 2 Aug 2013 19:09:32 -0500 Subject: [PATCH] Use krb5_timeofday() in kuser/copy_cred_cache.c --- kuser/copy_cred_cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kuser/copy_cred_cache.c b/kuser/copy_cred_cache.c index 3834140ac..10670003c 100644 --- a/kuser/copy_cred_cache.c +++ b/kuser/copy_cred_cache.c @@ -112,7 +112,8 @@ copy_cred_cache(struct copy_cred_cache_options *opt, int argc, char **argv) time_t t = parse_time(opt->valid_for_string, "s"); if(t < 0) errx(1, "unknown time \"%s\"", opt->valid_for_string); - ctx.mcreds.times.endtime = time(NULL) + t; + krb5_timeofday(heimtools_context, &ctx.mcreds.times.endtime); + ctx.mcreds.times.endtime += t; ctx.whichfields |= KRB5_TC_MATCH_TIMES; } if (opt->fcache_version_integer)