firstboot: fix root params with creds and prompting disabled
authorDan Nicholson <dbn@endlessos.org>
Tue, 30 Jul 2024 13:37:40 +0000 (07:37 -0600)
committerLuca Boccassi <bluca@debian.org>
Thu, 15 Aug 2024 13:04:41 +0000 (14:04 +0100)
commitb5448c16f8f7a67da5266bec7d5c6677cc34ab24
tree36c2a1daca7e9a26917fddb92a01b1b65d2d5a46
parent847dd914d0ee0e6f3ca576891b82896ee3e68d99
firstboot: fix root params with creds and prompting disabled

Remove an early return that prevents --prompt-root-password or
--prompt-root-shell and systemd.firstboot=off using credentials. In that case,
arg_prompt_root_password and arg_prompt_root_shell will be false, but the
prompt helpers still need to be called to read the credentials. Furthermore, if
only the root shell has been set, don't overwrite the root password.

(cherry picked from commit 35bc4c34240afdd55e117b909f26fa9a5dc54f3b)
src/firstboot/firstboot.c
test/units/TEST-74-AUX-UTILS.firstboot.sh