From 92a4483f883a2b8b34b1b662f344fe3aaa24c074 Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 23 Apr 2007 20:44:24 +0000 Subject: [PATCH] Make missing capabilties file error messages friendlier git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6091 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Config.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm index 7319021d3..73940ba31 100644 --- a/Shorewall-perl/Shorewall/Config.pm +++ b/Shorewall-perl/Shorewall/Config.pm @@ -64,6 +64,7 @@ our %globals = ( SHAREDIR => '/usr/share/shorewall' , CONFDIR => '/etc/shorewall', SHAREDIRPL => '/usr/share/shorewall-perl/', LOGPARMS => '', + TC_SCRIPT => '', VERSION => '3.9.4', ); @@ -778,8 +779,10 @@ sub get_configuration( $ ) { unless ( open_file 'capabilities' ) { determine_capabilities; } - } else { + } elsif ( $export ) { fatal_error "The -e flag requires a capabilities file" unless open_file 'capabilities'; + } else { + fatal_error "Compiling under an ordinary user id requires a capabilities file" unless open_file 'capabilities'; } $globals{ORIGINAL_POLICY_MATCH} = $capabilities{POLICY_MATCH}; @@ -910,8 +913,6 @@ sub get_configuration( $ ) { $config{TCP_FLAGS_DISPOSITION} = 'DROP'; } - $globals{TC_SCRIPT} = ''; - default 'TC_ENABLED' , 'Internal'; if ( $val = "\L$config{TC_ENABLED}" ) {