diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-12-03 12:05:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-12-03 12:05:29 +0000 |
commit | 5b45d3c5a8c61f076370b6ca3d14abeeceed5009 (patch) | |
tree | 0ba04d3e637894fdaefd4cea9139eb1c9e86eb7c /perl-install/security | |
parent | eb025622c6e08ab766935e837849a2eb5afa5595 (diff) | |
download | drakx-5b45d3c5a8c61f076370b6ca3d14abeeceed5009.tar drakx-5b45d3c5a8c61f076370b6ca3d14abeeceed5009.tar.gz drakx-5b45d3c5a8c61f076370b6ca3d14abeeceed5009.tar.bz2 drakx-5b45d3c5a8c61f076370b6ca3d14abeeceed5009.tar.xz drakx-5b45d3c5a8c61f076370b6ca3d14abeeceed5009.zip |
simplify (esp. use cat_)
Diffstat (limited to 'perl-install/security')
-rw-r--r-- | perl-install/security/msec.pm | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/perl-install/security/msec.pm b/perl-install/security/msec.pm index 16774228b..bba1bc78b 100644 --- a/perl-install/security/msec.pm +++ b/perl-install/security/msec.pm @@ -157,10 +157,7 @@ sub get_functions { # read mseclib.py to get each function's name and if it's # not in the ignore list, add it to the returned list. - local *F; - open F, $file; - local $_; - while (<F>) { + foreach (cat_($file)) { if (/^def/) { (undef, $function) = split(/ /, $_); ($function, undef) = split(/\(/, $function); @@ -169,7 +166,6 @@ sub get_functions { } } } - close F; @functions; } @@ -207,21 +203,7 @@ sub config_function { # get_default_checks() - # return a list of periodic checks handled by security.conf sub get_default_checks { - my ($check, @checks); - - my $check_file = "$::prefix/var/lib/msec/security.conf"; - - if (-e $check_file) { - local *F; - open F, $check_file; - local $_; - while (<F>) { - ($check, undef) = split(/=/, $_); - push @checks, $check unless member($check, qw(MAIL_USER)) - } - close F; - } - @checks; + map { if(/(.*?)=/, $1) } cat_("$::prefix/var/lib/msec/security.conf"); } # get_check_value(check) |