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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user