Don't update ticket file if verify_user returns FALSE.

This commit is contained in:
Todd C. Miller
2010-03-16 07:13:57 -04:00
parent ee223889c1
commit cbf298bfc8

View File

@@ -140,7 +140,8 @@ check_user(validated, mode)
rval = verify_user(auth_pw, prompt); rval = verify_user(auth_pw, prompt);
} }
/* Only update timestamp if user was validated. */ /* 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); update_timestamp(timestampdir, timestampfile);
efree(timestampdir); efree(timestampdir);
efree(timestampfile); efree(timestampfile);