summaryrefslogtreecommitdiffstats
path: root/perl-install/security/msec.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-10-08 11:57:33 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-10-08 11:57:33 +0000
commit430b3f8d262d71b9f4c0408e59898e13df214e01 (patch)
treefd7f226620e1b9161854b652db3402cde19c8c93 /perl-install/security/msec.pm
parentb0f92097037e2ba999600a6f48361f4b6c781203 (diff)
downloaddrakx-backup-do-not-use-430b3f8d262d71b9f4c0408e59898e13df214e01.tar
drakx-backup-do-not-use-430b3f8d262d71b9f4c0408e59898e13df214e01.tar.gz
drakx-backup-do-not-use-430b3f8d262d71b9f4c0408e59898e13df214e01.tar.bz2
drakx-backup-do-not-use-430b3f8d262d71b9f4c0408e59898e13df214e01.tar.xz
drakx-backup-do-not-use-430b3f8d262d71b9f4c0408e59898e13df214e01.zip
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
Diffstat (limited to 'perl-install/security/msec.pm')
-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) {