From 66ea399856d60f4b7450a27039ededb6d5f99006 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 7 Oct 2010 14:12:17 -0400 Subject: [PATCH] Having a timestamp file defined is no longer indicative of tty tickets being enabled. Check def_tty_tickets directly. --- plugins/sudoers/check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sudoers/check.c b/plugins/sudoers/check.c index e06b2cd37..12d3da21a 100644 --- a/plugins/sudoers/check.c +++ b/plugins/sudoers/check.c @@ -205,7 +205,7 @@ static void update_timestamp(char *timestampdir, char *timestampfile) { /* If using tty timestamps but we have no tty there is nothing to do. */ - if (timestampfile && !user_ttypath) + if (def_tty_tickets && !user_ttypath) return; if (timestamp_uid != 0) @@ -525,7 +525,7 @@ timestamp_status(char *timestampdir, char *timestampfile, char *user, int flags) if (timestampfile && status != TS_ERROR) { if (status != TS_MISSING) status = TS_NOFILE; /* dir there, file missing */ - if (!user_ttypath) + if (def_tty_tickets && !user_ttypath) goto done; /* no tty, always prompt */ if (lstat(timestampfile, &sb) == 0) { if (!S_ISREG(sb.st_mode)) { -- 2.40.0