]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: add a check that the vmlinuz arg is sane
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Apr 2019 12:54:42 +0000 (14:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 3 Apr 2019 09:25:40 +0000 (11:25 +0200)
src/kernel-install/kernel-install

index 610959ba9fc16575b2c06723c70a594ce0eaf5d7..e7f2beb570792a00088d458f043d736553f47a68 100644 (file)
@@ -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 ] && \