mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 04:11:22 +01:00
Correct helper validation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
769125903d
commit
5848d7cab7
@ -4467,14 +4467,14 @@ sub validate_helper( $;$ ) {
|
||||
#
|
||||
# Recognized helper
|
||||
#
|
||||
my $capability = $helpers_map{$helper};
|
||||
my $capability = $helpers_map{defined $proto ? $helper : $helper_base};
|
||||
my $external_helper = lc $capability;
|
||||
|
||||
$external_helper =~ s/_helper//;
|
||||
$external_helper =~ s/_/-/;
|
||||
|
||||
fatal_error "The $external_helper helper is not enabled" unless $helpers_enabled{$external_helper};
|
||||
|
||||
|
||||
if ( supplied $proto ) {
|
||||
require_capability $helpers_map{$helper}, "Helper $helper", 's';
|
||||
|
||||
@ -4501,7 +4501,10 @@ sub do_helper( $ ) {
|
||||
|
||||
validate_helper( $helper );
|
||||
|
||||
qq(-m helper --helper "$helpers_aliases{$helper}" ) if defined wantarray;
|
||||
if ( defiend wantarray ) {
|
||||
$helper = $helpers_aliases{$helper} || $helper;
|
||||
qq(-m helper --helper $helper );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user