From 430b3f8d262d71b9f4c0408e59898e13df214e01 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 8 Oct 2003 11:57:33 +0000 Subject: fix #6103: - workaround buggy msec not listing MAIL_USER in its defaults whereas it does list MAIL_WARN - while keeping "prevent including MAIL_* in check list" behavior, we still have to load them in order to be able to save them back --- perl-install/security/msec.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'perl-install/security') diff --git a/perl-install/security/msec.pm b/perl-install/security/msec.pm index 706daf5b7..3a705b89e 100644 --- a/perl-install/security/msec.pm +++ b/perl-install/security/msec.pm @@ -19,7 +19,7 @@ sub load_defaults { my ($opt, $val) = split /$separator/; chop $val; if_($opt ne 'set_security_conf', $opt => $val); - } cat_($msec->{$category}{defaults_file}); + } cat_($msec->{$category}{defaults_file}), if_($category eq "checks", 'MAIL_USER'); } @@ -76,9 +76,14 @@ sub get_check_value { # list_(functions|checks) - # return a list of functions|checks handled by level.local|security.conf +sub raw_checks_list { + my ($msec) = @_; + keys %{$msec->{checks}{default}}; +} + sub list_checks { my ($msec) = @_; - grep { !member($_, qw(MAIL_WARN MAIL_USER)) } keys %{$msec->{checks}{default}}; + grep { !member($_, qw(MAIL_WARN MAIL_USER)) } $msec->raw_checks_list; } sub list_functions { @@ -141,7 +146,7 @@ sub apply_functions { sub apply_checks { my ($msec) = @_; - my @list = sort $msec->list_checks; + my @list = sort $msec->raw_checks_list; substInFile { foreach my $check (@list) { s/^$check.*\n// } if (eof) { -- cgit v1.2.1