mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-09 20:31:08 +00:00
oem-factory-reset: set title_text accordingly to mode, either 'OEM Factory Reset Mode', 'Re-Ownership Mode' or 'OEM Factory Reset / Re-Ownership'
TODO: further specialize warning prompt to tell what is going to happen (randomized PIN, signle custom randomized PIN etc) Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
parent
789231fac3
commit
c372370210
@ -52,12 +52,16 @@ handle_mode() {
|
|||||||
USER_PIN=$CUSTOM_SINGLE_PASS
|
USER_PIN=$CUSTOM_SINGLE_PASS
|
||||||
ADMIN_PIN=$CUSTOM_SINGLE_PASS
|
ADMIN_PIN=$CUSTOM_SINGLE_PASS
|
||||||
TPM_PASS=$CUSTOM_SINGLE_PASS
|
TPM_PASS=$CUSTOM_SINGLE_PASS
|
||||||
|
|
||||||
|
title_text="OEM Factory Reset Mode"
|
||||||
;;
|
;;
|
||||||
user)
|
user)
|
||||||
DEBUG "User mode selected"
|
DEBUG "User mode selected"
|
||||||
USER_PIN=$(generate_passphrase --number_words 2 --max_length $MAX_HOTP_GPG_PIN_LENGTH)
|
USER_PIN=$(generate_passphrase --number_words 2 --max_length $MAX_HOTP_GPG_PIN_LENGTH)
|
||||||
ADMIN_PIN=$(generate_passphrase --number_words 2 --max_length $MAX_HOTP_GPG_PIN_LENGTH)
|
ADMIN_PIN=$(generate_passphrase --number_words 2 --max_length $MAX_HOTP_GPG_PIN_LENGTH)
|
||||||
TPM_PASS=$ADMIN_PIN
|
TPM_PASS=$ADMIN_PIN
|
||||||
|
|
||||||
|
title_text="User Re-Ownership Mode"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
warn "Unknown oem-factory-reset lauched mode, setting PINs to weak defaults"
|
warn "Unknown oem-factory-reset lauched mode, setting PINs to weak defaults"
|
||||||
@ -911,9 +915,7 @@ usb_security_token_capabilities_check() {
|
|||||||
## main script start
|
## main script start
|
||||||
|
|
||||||
# check for args
|
# check for args
|
||||||
if [ "$1" != "" ]; then
|
if [ -z "$title_text" ]; then
|
||||||
title_text=$1
|
|
||||||
else
|
|
||||||
title_text="OEM Factory Reset / Re-Ownership"
|
title_text="OEM Factory Reset / Re-Ownership"
|
||||||
fi
|
fi
|
||||||
if [ "$2" != "" ]; then
|
if [ "$2" != "" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user