summaryrefslogtreecommitdiffstats
path: root/perl-install/security
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-11-19 07:08:04 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-11-19 07:08:04 +0000
commitc77b3d5c4e8832b4bc3ca66c0ef23c1427b046bd (patch)
tree871368c02fa543b775b7cc0d63fdd70da3f37478 /perl-install/security
parent28d4ca95eaa3eeed3ec04652fe8a89f99be0fe45 (diff)
downloaddrakx-backup-do-not-use-c77b3d5c4e8832b4bc3ca66c0ef23c1427b046bd.tar
drakx-backup-do-not-use-c77b3d5c4e8832b4bc3ca66c0ef23c1427b046bd.tar.gz
drakx-backup-do-not-use-c77b3d5c4e8832b4bc3ca66c0ef23c1427b046bd.tar.bz2
drakx-backup-do-not-use-c77b3d5c4e8832b4bc3ca66c0ef23c1427b046bd.tar.xz
drakx-backup-do-not-use-c77b3d5c4e8832b4bc3ca66c0ef23c1427b046bd.zip
previous example in perldoc was buggy;
put one that really works
Diffstat (limited to 'perl-install/security')
-rw-r--r--perl-install/security/msec.pm35
1 files changed, 21 insertions, 14 deletions
diff --git a/perl-install/security/msec.pm b/perl-install/security/msec.pm
index 2c56197e9..347976406 100644
--- a/perl-install/security/msec.pm
+++ b/perl-install/security/msec.pm
@@ -12,21 +12,28 @@ msec - Perl functions to handle msec configuration files
=head1 SYNOPSYS
+ #!/usr/bin/perl
+
+ use strict;
+ use lib qw(/usr/lib/libDrakX);
require security::msec;
-
- my $msec = new msec;
-
- $secure_level = get_secure_level;
-
- @functions = $msec->get_functions;
- foreach @functions { %options{$_} = $msec->get_function_value($_) }
- foreach @functions { %defaults{$_} = $msec->get_function_default($_) }
- foreach @functions { $msec->config_function($_, %options{$_}) }
-
- @checks = $msec->get_default_checks;
- foreach @checks { %options{$_} = $msec->get_check_value($_) }
- foreach @checks { %defaults{$_} = $msec->get_check_default($_) }
- foreach @checks { $msec->config_check($_, %options{$_}) }
+
+ my $msec = new security::msec;
+
+ my $secure_level = $msec->get_secure_level;
+
+ my (%options, %defaults);
+
+ my @functions = $msec->get_functions();
+
+ foreach (@functions) { $options{$_} = $msec->get_function_value($_) }
+ foreach (@functions) { $defaults{$_} = $msec->get_function_default($_) }
+ foreach (@functions) { $msec->config_function($_, $options{$_}) }
+
+ my @checks = $msec->get_default_checks;
+ foreach (@checks) { $options{$_} = $msec->get_check_value($_) }
+ foreach (@checks) { $defaults{$_} = $msec->get_check_default($_) }
+ foreach (@checks) { $msec->config_check($_, $options{$_}) }
=head1 DESCRIPTION