summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-10-08 12:49:06 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-10-08 12:49:06 +0000
commit1f0f9b2752ce3950249eeb3119056c1425b00e2f (patch)
tree3886e77840deff46f8aa20953dc12e432413f84d /perl-install
parentd18281fdff869ba6f4b006c47905283120ccc449 (diff)
downloaddrakx-1f0f9b2752ce3950249eeb3119056c1425b00e2f.tar
drakx-1f0f9b2752ce3950249eeb3119056c1425b00e2f.tar.gz
drakx-1f0f9b2752ce3950249eeb3119056c1425b00e2f.tar.bz2
drakx-1f0f9b2752ce3950249eeb3119056c1425b00e2f.tar.xz
drakx-1f0f9b2752ce3950249eeb3119056c1425b00e2f.zip
forward #6103 fix:
- 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
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/security/msec.pm11
1 files changed, 8 insertions, 3 deletions
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) {