From: Todd C. Miller Date: Fri, 6 Aug 2010 13:39:01 +0000 (-0400) Subject: When removing/resetting the timestamp file ignore the tty ticket contents. X-Git-Tag: SUDO_1_7_5~201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f04b789ec95b3b9abbcca93b537998e064592a4;p=sudo When removing/resetting the timestamp file ignore the tty ticket contents. --HG-- branch : 1.7 --- diff --git a/check.c b/check.c index 942da76dd..96af763b1 100644 --- a/check.c +++ b/check.c @@ -561,9 +561,12 @@ timestamp_status(timestampdir, timestampfile, user, flags) /* * Check for stored tty info. If the file is zero-sized * it is an old-style timestamp with no tty info in it. + * If removing, we don't care about the contents. * The actual mtime check is done later. */ - if (sb.st_size != 0) { + if (ISSET(flags, TS_REMOVE)) { + status = TS_OLD; + } else if (sb.st_size != 0) { struct tty_info info; int fd = open(timestampfile, O_RDONLY, 0644); if (fd != -1) {