mirror of
https://gitlab.com/shorewall/code.git
synced 2025-03-07 19:11:51 +01:00
Move get_action_logging() to the Config Module
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
8ccd1ab52b
commit
4587430e4a
@ -75,7 +75,6 @@ our @EXPORT = ( qw(
|
|||||||
dont_optimize
|
dont_optimize
|
||||||
dont_delete
|
dont_delete
|
||||||
dont_move
|
dont_move
|
||||||
get_action_logging
|
|
||||||
add_interface_options
|
add_interface_options
|
||||||
|
|
||||||
%chain_table
|
%chain_table
|
||||||
@ -2459,24 +2458,6 @@ sub require_audit($$;$) {
|
|||||||
return ensure_audit_chain $target, $action, $tgt;
|
return ensure_audit_chain $target, $action, $tgt;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
# Returns the Level and Tag for the current action chain
|
|
||||||
#
|
|
||||||
sub get_action_logging() {
|
|
||||||
my $chainref = get_action_chain;
|
|
||||||
my $wholeaction = $chainref->{action};
|
|
||||||
|
|
||||||
if ( $wholeaction ) {
|
|
||||||
my ( undef, $level, $tag, undef ) = split ':', $wholeaction;
|
|
||||||
|
|
||||||
$level = '' if $level =~ /^none/;
|
|
||||||
|
|
||||||
( $level, $tag );
|
|
||||||
} else {
|
|
||||||
( '' , '' );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add all builtin chains to the chain table -- it is separate from initialize() because it depends on capabilities and configuration.
|
# Add all builtin chains to the chain table -- it is separate from initialize() because it depends on capabilities and configuration.
|
||||||
# The function also initializes the target table with the pre-defined targets available for the specfied address family.
|
# The function also initializes the target table with the pre-defined targets available for the specfied address family.
|
||||||
|
@ -59,6 +59,7 @@ our @EXPORT = qw(
|
|||||||
|
|
||||||
get_action_params
|
get_action_params
|
||||||
get_action_chain
|
get_action_chain
|
||||||
|
get_action_logging
|
||||||
set_action_param
|
set_action_param
|
||||||
|
|
||||||
have_capability
|
have_capability
|
||||||
@ -936,7 +937,7 @@ sub initialize( $;$$) {
|
|||||||
|
|
||||||
%compiler_params = ();
|
%compiler_params = ();
|
||||||
|
|
||||||
%actparms = ( );
|
%actparms = ( 0 => 0, loglevel => '', logtag => '', chain => '' );
|
||||||
|
|
||||||
%helpers_enabled = (
|
%helpers_enabled = (
|
||||||
amanda => 1,
|
amanda => 1,
|
||||||
@ -2817,6 +2818,13 @@ sub get_action_params( $ ) {
|
|||||||
@return;
|
@return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Returns the Level and Tag for the current action chain
|
||||||
|
#
|
||||||
|
sub get_action_logging() {
|
||||||
|
@actparms{ 'loglevel', 'logtag' };
|
||||||
|
}
|
||||||
|
|
||||||
sub get_action_chain() {
|
sub get_action_chain() {
|
||||||
$actparms{0};
|
$actparms{0};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user