-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No way to set KBUILD_SIGN_PIN to unlock module signing key #289
Comments
You can set it in a script: #273 (comment) |
In a text console:
|
Furthermore, one has to manually define the Can't the passphrase be simply stored in a root only accessible configuration snippet under |
That script is just an example for the OP of #273. You don't really need |
Yeah, that was a script I personally use (linked in the issue), hence xuzhen's comment there. You can either configure it for headless use, or just get passphrase through standard ways like [...]
MOK_PASS_FILE="/tmp/mok_pass_file"
if [[ ! -f "$MOK_PASS_FILE" ]]; then
# R/W on tty get around DKMS' possible redirection to /dev/null.
# Idea from: https://gist.github.com/sbueringer/bd8cec239c44d66967cf307d808f10c4#file-sign-modules-L14
echo -n "Enter MOK passphrase: " > /dev/tty
read -s KBUILD_SIGN_PIN < /dev/tty
# Create file which can be read only by root.
touch "$MOK_PASS_FILE"
chmod 600 "$MOK_PASS_FILE"
sudo chown root:root "$MOK_PASS_FILE"
# Save passphrase in the file.
echo "$KBUILD_SIGN_PIN" | sudo tee "$MOK_PASS_FILE" > /dev/null
else
KBUILD_SIGN_PIN="$(sudo cat $MOK_PASS_FILE)"
fi
[...] (I happened to lurk just by chance, checking if there was a new release.) |
Until v3.0.8 dkms simply sourced configuration files and it was possible to store the key passphrase there in the KBUILD_SIGN_PIN environment variable. Since v3.0.9 the
safe_source()
function has been introduced which prevents this.How are we supposed to pass the key passphrase to
sign-file
?Thanks
The text was updated successfully, but these errors were encountered: