From: Todd C. Miller Date: Sat, 24 Apr 2010 23:22:52 +0000 (-0400) Subject: Fix typo in last commit (ifndef vs ifdef) X-Git-Tag: SUDO_1_8_0~697 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af092dc4069307a5f3abac862b33d74b93d9d74f;p=sudo Fix typo in last commit (ifndef vs ifdef) Make sure we pass ctime() a pointer to time_t as tv_sec in struct timeval may be long. --- diff --git a/plugins/sudoers/check.c b/plugins/sudoers/check.c index 172b011c7..90902de97 100644 --- a/plugins/sudoers/check.c +++ b/plugins/sudoers/check.c @@ -104,7 +104,7 @@ check_user(int validated, int mode) tty_info.dev = sb.st_dev; tty_info.ino = sb.st_ino; tty_info.rdev = sb.st_rdev; -#ifndef notyet +#ifdef notyet ctim_get(&sb, &tty_info.ctime); if (stat("/", &sb) == 0) { /* @@ -608,9 +608,10 @@ timestamp_status(char *timestampdir, char *timestampfile, char *user, int flags) * have been set back or someone could be trying to spoof us. */ if (mtime.tv_sec > now + 60 * def_timestamp_timeout * 2) { + time_t tv_sec = (time_t)mtime.tv_sec; log_error(NO_EXIT, "timestamp too far in the future: %20.20s", - 4 + ctime(&mtime.tv_sec)); + 4 + ctime(&tv_sec)); if (timestampfile) (void) unlink(timestampfile); else