]> granicus.if.org Git - sudo/commitdiff
def_timestamp_timeout is a double so compare against 0.0 not 0 to
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 26 Oct 2016 16:56:32 +0000 (10:56 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 26 Oct 2016 16:56:32 +0000 (10:56 -0600)
avoid making it appear to be an integer type.

plugins/sudoers/timestamp.c

index dfdb86d9199f0b374bfc78bd827f978f0f546338..20bb1e6e15630daf84b0874f3639ee4f46d95eee 100644 (file)
@@ -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;