mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-25 15:48:56 +01:00
Cleanup of rewritten validate_level()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
73ed66b9b9
commit
28a1087cd4
@ -2159,7 +2159,7 @@ sub validate_level( $ ) {
|
||||
#
|
||||
level_error( $rawlevel ) if supplied $qualifier;
|
||||
|
||||
require_capability ( 'LOG_TARGET' , "Log level $level", 's' ) unless $value eq '';
|
||||
require_capability ( 'LOG_TARGET' , "Log level $level", 's' );
|
||||
return $value;
|
||||
}
|
||||
|
||||
@ -2188,6 +2188,8 @@ sub validate_level( $ ) {
|
||||
|
||||
} elsif ( $qualifier =~ /^ --/ ) {
|
||||
return $rawlevel;
|
||||
} else {
|
||||
level_error( $rawlevel ) if $qualifier;
|
||||
}
|
||||
|
||||
return $olevel;
|
||||
@ -2196,9 +2198,7 @@ sub validate_level( $ ) {
|
||||
#
|
||||
# Must be LOGMARK
|
||||
#
|
||||
if ( $qualifier =~ /^ --/ ) {
|
||||
return $rawlevel;
|
||||
}
|
||||
return $rawlevel if $qualifier =~ /^ --/;
|
||||
|
||||
my $sublevel;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user