From: Zbigniew Jędrzejewski-Szmek Date: Tue, 2 Apr 2019 12:54:42 +0000 (+0200) Subject: kernel-install: add a check that the vmlinuz arg is sane X-Git-Tag: v242-rc3~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51be9a8c41e1d6e6a15bf90c60318611edbaab14;p=thirdparty%2Fsystemd.git kernel-install: add a check that the vmlinuz arg is sane --- diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install index 610959ba9fc..e7f2beb5707 100644 --- a/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install @@ -125,6 +125,11 @@ case $COMMAND in exit 1 fi + if [[ ! -f "$KERNEL_IMAGE" ]]; then + echo "Kernel image argument ${KERNEL_IMAGE} not a file" >&2 + exit 1 + fi + for f in "${PLUGINS[@]}"; do if [[ -x $f ]]; then [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \