From: Todd C. Miller Date: Wed, 26 Oct 2016 16:56:32 +0000 (-0600) Subject: def_timestamp_timeout is a double so compare against 0.0 not 0 to X-Git-Tag: SUDO_1_8_19^2~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf5a12c09ae28a4461af2939e787e6120ecd938a;p=sudo def_timestamp_timeout is a double so compare against 0.0 not 0 to avoid making it appear to be an integer type. --- diff --git a/plugins/sudoers/timestamp.c b/plugins/sudoers/timestamp.c index dfdb86d91..20bb1e6e1 100644 --- a/plugins/sudoers/timestamp.c +++ b/plugins/sudoers/timestamp.c @@ -388,7 +388,7 @@ timestamp_open(const char *user, pid_t sid) debug_decl(timestamp_open, SUDOERS_DEBUG_AUTH) /* Zero timeout means don't use the time stamp file. */ - if (def_timestamp_timeout == 0) { + if (def_timestamp_timeout == 0.0) { errno = ENOENT; goto bad; } @@ -705,7 +705,7 @@ timestamp_status(void *vcookie, struct passwd *pw) debug_decl(timestamp_status, SUDOERS_DEBUG_AUTH) /* Zero timeout means don't use time stamp files. */ - if (def_timestamp_timeout == 0) { + if (def_timestamp_timeout == 0.0) { sudo_debug_printf(SUDO_DEBUG_DEBUG|SUDO_DEBUG_LINENO, "timestamps disabled"); status = TS_OLD; @@ -808,7 +808,7 @@ timestamp_update(void *vcookie, struct passwd *pw) debug_decl(timestamp_update, SUDOERS_DEBUG_AUTH) /* Zero timeout means don't use time stamp files. */ - if (def_timestamp_timeout == 0) { + if (def_timestamp_timeout == 0.0) { sudo_debug_printf(SUDO_DEBUG_DEBUG|SUDO_DEBUG_LINENO, "timestamps disabled"); goto done;