import-creds: add support for binary credentials specified on the kernel cmdline
This commit is contained in:
@@ -25,6 +25,7 @@ KERNEL_CREDS=(
|
||||
"systemd.set_credential=sysctl.extra:kernel.domainname=sysctltest"
|
||||
"systemd.set_credential=login.motd:hello"
|
||||
"systemd.set_credential=login.issue:welcome"
|
||||
"systemd.set_credential_binary=waldi:d29vb29mZmZ3dWZmZnd1ZmYK"
|
||||
"rd.systemd.import_credentials=no"
|
||||
)
|
||||
KERNEL_APPEND="${KERNEL_APPEND:-} ${KERNEL_CREDS[*]}"
|
||||
|
||||
@@ -176,6 +176,7 @@ if systemd-detect-virt -q -c ; then
|
||||
elif [ -d /sys/firmware/qemu_fw_cfg/by_name ]; then
|
||||
# Verify that passing creds through kernel cmdline works
|
||||
[ "$(systemd-creds --system cat kernelcmdlinecred)" = "uff" ]
|
||||
[ "$(systemd-creds --system cat waldi)" = "woooofffwufffwuff" ]
|
||||
|
||||
# And that it also works via SMBIOS
|
||||
[ "$(systemd-creds --system cat smbioscredential)" = "magicdata" ]
|
||||
|
||||
Reference in New Issue
Block a user