From 17b3f98cb6fab06e038ef4c90084a05bcc713d9d Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 16 May 2007 03:48:13 +0000 Subject: [PATCH] Straighten out -e and appropriate priv -- take 3 git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6370 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/shorewall | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Shorewall-common/shorewall b/Shorewall-common/shorewall index b92164621..444df613c 100755 --- a/Shorewall-common/shorewall +++ b/Shorewall-common/shorewall @@ -261,8 +261,10 @@ compiler() { shift - if [ -z "$EXPORT" -a $(id -u) -ne 0 -a -z "$SHOREWALL_DIR" ]; then - startup_error "Ordinary users may only comple for export (-e option) or from a specified directory" + if [ $(id -u) -ne 0 ]; then + if [ -z "$SHOREWALL_DIR" -o "$SHOREWALL_DIR" = /etc/shorewall ]; then + startup_error "Ordinary users may not compile the /etc/shorewall configuration" + fi fi # # We've now set SHOREWALL_DIR so recalculate CONFIG_PATH