]> granicus.if.org Git - sudo/commitdiff
Don't update ticket file if verify_user returns FALSE.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 16 Mar 2010 11:13:57 +0000 (07:13 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 16 Mar 2010 11:13:57 +0000 (07:13 -0400)
plugins/sudoers/check.c

index f6390d04bd51239563a0cff25eb9e225b8394dd9..e0f3d11c47a76e3df8e77c06d43ca9ccb80f7011 100644 (file)
@@ -140,7 +140,8 @@ check_user(validated, mode)
        rval = verify_user(auth_pw, prompt);
     }
     /* Only update timestamp if user was validated. */
-    if (ISSET(validated, VALIDATE_OK) && !ISSET(mode, MODE_IGNORE_TICKET) && status != TS_ERROR)
+    if (rval == TRUE && ISSET(validated, VALIDATE_OK) &&
+       !ISSET(mode, MODE_IGNORE_TICKET) && status != TS_ERROR)
        update_timestamp(timestampdir, timestampfile);
     efree(timestampdir);
     efree(timestampfile);