]> granicus.if.org Git - icinga2/commitdiff
Validate agent bundle files.
authorGunnar Beutner <gunnar.beutner@netways.de>
Sun, 13 Apr 2014 10:44:18 +0000 (12:44 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Sun, 13 Apr 2014 10:44:18 +0000 (12:44 +0200)
Refs #6002

pki/icinga2-setup-agent.cmake

index ff9b04b8c12e4b7a9d739bc2b8e6a9c84596ff95..ed4aa2876fa83058c82ed60d07b17598ce37a69b 100644 (file)
@@ -14,6 +14,11 @@ if [ -n "$1" ]; then
                exit 1
        fi
 
+       if ! base64 -d $1 2>/dev/null; then
+               echo "The bundle file is invalid or corrupted."
+               exit 1
+       fi
+
        while true; do
                echo -n "Are you setting up a new master instance? [n] "
                if ! read master; then