forked from extern/shorewall_code
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;
|
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;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2188,6 +2188,8 @@ sub validate_level( $ ) {
|
|||||||
|
|
||||||
} elsif ( $qualifier =~ /^ --/ ) {
|
} elsif ( $qualifier =~ /^ --/ ) {
|
||||||
return $rawlevel;
|
return $rawlevel;
|
||||||
|
} else {
|
||||||
|
level_error( $rawlevel ) if $qualifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $olevel;
|
return $olevel;
|
||||||
@ -2196,9 +2198,7 @@ sub validate_level( $ ) {
|
|||||||
#
|
#
|
||||||
# Must be LOGMARK
|
# Must be LOGMARK
|
||||||
#
|
#
|
||||||
if ( $qualifier =~ /^ --/ ) {
|
return $rawlevel if $qualifier =~ /^ --/;
|
||||||
return $rawlevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $sublevel;
|
my $sublevel;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user