From 7e46c3cafcbd817d048bfd76ab0a0cf8b6826841 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 4 Jul 2023 09:42:24 +0200 Subject: [PATCH] minifirewall must be run as root --- minifirewall | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/minifirewall b/minifirewall index a09b722..34f3000 100755 --- a/minifirewall +++ b/minifirewall @@ -37,6 +37,11 @@ DESC="Firewall designed for standalone server" set -u +if [ "$(id -u)" -ne "0" ] ; then + echo "${PROGNAME} must be run as root." >&2 + exit 1 +fi + # Variables configuration #########################