use krb5_timeofday and krb5_us_timeofday

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2927 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-08-11 23:35:31 +00:00
parent 098bd34b7d
commit 6fd5ea4f86
10 changed files with 55 additions and 41 deletions

View File

@@ -113,12 +113,12 @@ krb5_rd_priv(krb5_context context,
/* check timestamp */
if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) {
struct timeval tv;
int32_t sec;
gettimeofday (&tv, NULL);
krb5_timeofday (context, &sec);
if (part.timestamp == NULL ||
part.usec == NULL ||
abs(*part.timestamp - tv.tv_sec) > context->max_skew) {
abs(*part.timestamp - sec) > context->max_skew) {
r = KRB5KRB_AP_ERR_SKEW;
goto failure_part;
}