kexec-run: Get pubkeys for DOAS_USER.

doas is a smaller replacement for sudo, used by some
distributions (such as Alpine).
This commit is contained in:
Shea Levy 2024-02-28 06:38:09 -05:00 committed by mergify[bot]
parent 84ee92b81f
commit c090b94b08

View file

@ -27,6 +27,10 @@ extractPubKeys() {
}
extractPubKeys /root
if test -n "${DOAS_USER-}"; then
SUDO_USER="$DOAS_USER"
fi
if test -n "${SUDO_USER-}"; then
sudo_home=$(sh -c "echo ~$SUDO_USER")
extractPubKeys "$sudo_home"