gui-init: Improve wording of TOTP/HOTP mismatch change-time question

This was a yes/no prompt but didn't actually have a question in it,
ask if the user wants to change the time.

Include the current time so the user can tell if it's correct.
Mention that if it's incorrect they should change the time and check
again.

The first line was too long for fbwhiptail by a few characters, trim it
a little.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
This commit is contained in:
Jonathon Hall 2024-08-06 10:01:34 -04:00
parent 6eab9ddd90
commit 05ce2cd0a6
No known key found for this signature in database
GPG Key ID: 1E9C3CA91AE25114

View File

@ -547,7 +547,7 @@ prompt_totp_mismatch()
{
TRACE_FUNC
if (whiptail_warning --title "TOTP/HOTP code mismatched" \
--yesno "TOTP/HOTP code mismatches could indicate either TPM tampering or clock drift.\n\nHere, we will manually set system time to see if TOTP code mismatch was because of time drift.\n\nAlternatively you could sync time from network automatically with 'network-init-recovery' helper from Recovery shell\n " 0 80) then
--yesno "TOTP/HOTP code mismatches could indicate TPM tampering or clock drift.\n\nThe current UTC time is: $(date "+%Y-%m-%d %H:%M:%S %Z")\nIf this is incorrect, set the correct time and check TOTP/HOTP again.\n\nDo you want to change the time?" 0 80) then
change-time.sh
fi
}