dracut
dracut copied to clipboard
improvement: Add support for single password boot on non-systemd setups.
ask_for_password() in the crypt module (modules.d/90crypt/crypt-lib.sh) can now store passwords in the kernel keyring via keyctl, mimicing the behavior of systemd-ask-password. This allows pam_gdm.so (a standalone PAM module from GDM) to work on non-systemd setups and unlock a GNOME keyring when autologin is enabled without asking for a password. (given that the keyring password is the same as the disk encryption password)
Changes
keyctl(andtee) added as an optional includes in the crypt module. (detected withfind_binary()ininstall())ask_for_password()will pipe passwords tokeyctl(via a helper script) if it's available and the--key-nameoption is used.- The helper script (
modules.d/90crypt/password-helper.sh) is required due to the way plymouth handles the--commandparameter. modules.d/90crypt/cryptroot-ask.shwill now try to store the result ofask_for_password()in the kernel keyring with the name "cryptsetup", allowingpam_gdm.soto work.
Checklist
- [x] I have tested it locally
- [ ] I have reviewed and updated any documentation if relevant
- [ ] I am providing new code and test(s) for it
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.
This should now pass all the required checks.
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.