From 273a42b068ad84dd9ff3b928fca65bb7fc0a8c85 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 26 Jun 2015 11:35:11 -0700 Subject: [PATCH] Correct the check for ordinary user attempting to access the default config Signed-off-by: Tom Eastep --- Shorewall/lib.cli-std | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/lib.cli-std b/Shorewall/lib.cli-std index 1f6c595ad..ac56ab075 100644 --- a/Shorewall/lib.cli-std +++ b/Shorewall/lib.cli-std @@ -389,7 +389,7 @@ compiler() { pc=${LIBEXECDIR}/shorewall/compiler.pl if [ $(id -u) -ne 0 ]; then - if [ -z "$g_shorewalldir" -o "$g_shorewalldir" = /etc/$g_program ]; then + if [ -z "$g_shorewalldir" -o "$g_shorewalldir" = $CONFDIR/$g_program ]; then startup_error "Ordinary users may not $COMMAND the $CONFDIR/$g_program configuration" fi fi @@ -417,7 +417,7 @@ compiler() { # Perl compiler only takes the output file as a argument - [ "$1" = debug -o "$1" = trace ] && shift; + [ "$1" = debug -o "$1" = trace ] && shift; [ "$1" = nolock ] && shift; shift