summaryrefslogtreecommitdiffstats
path: root/perl-install/security/main.pm
diff options
context:
space:
mode:
authorChristian Belisle <cbelisle@mandriva.com>2002-08-19 02:57:26 +0000
committerChristian Belisle <cbelisle@mandriva.com>2002-08-19 02:57:26 +0000
commit6fa33f4f548dd2d6f9e231ffe4bfdb3eff89e1ba (patch)
tree0308940c3ed9418b1a08bd783d10487902029e89 /perl-install/security/main.pm
parent7188d307af0b1797af5b11d4b1c7863481d54490 (diff)
downloaddrakx-backup-do-not-use-6fa33f4f548dd2d6f9e231ffe4bfdb3eff89e1ba.tar
drakx-backup-do-not-use-6fa33f4f548dd2d6f9e231ffe4bfdb3eff89e1ba.tar.gz
drakx-backup-do-not-use-6fa33f4f548dd2d6f9e231ffe4bfdb3eff89e1ba.tar.bz2
drakx-backup-do-not-use-6fa33f4f548dd2d6f9e231ffe4bfdb3eff89e1ba.tar.xz
drakx-backup-do-not-use-6fa33f4f548dd2d6f9e231ffe4bfdb3eff89e1ba.zip
- draksec is in his own package now
Diffstat (limited to 'perl-install/security/main.pm')
-rw-r--r--perl-install/security/main.pm66
1 files changed, 0 insertions, 66 deletions
diff --git a/perl-install/security/main.pm b/perl-install/security/main.pm
deleted file mode 100644
index 3702b9636..000000000
--- a/perl-install/security/main.pm
+++ /dev/null
@@ -1,66 +0,0 @@
-package security::main;
-
-use diagnostics;
-use strict;
-
-use common;
-use log;
-
-use security::msec;
-use security::libsafe;
-
-sub show_page {
- my ($prefix, $in, $page) = @_;
- my $signal = 9;
- my $security = security::msec::get_secure_level('');
- my $key = '';
- my %options = ();
- my ($sec_user, $libsafe) = '';
-
- if($page == 0) {
- $libsafe = security::libsafe::config_libsafe('');
- $sec_user = security::msec::config_security_user('');
- }
- elsif($page == 1) { %options = security::msec::get_options('', "functions"); }
- elsif($page == 2) { %options = security::msec::get_options('', "checks"); }
-
- if ($page == 2) {
- if(security::msec::choose_checks($in, \%options, \$signal, $security)) {
- foreach $key (keys %options) {
- security::msec::config_option('', $key, $options{$key}, "checks");
- } } }
- elsif ($page == 1) {
- if(security::msec::choose_functions($in, \%options, \$signal, $security)) {
- foreach $key (keys %options) {
- security::msec::config_option('', $key, $options{$key}, "functions");
- } } }
- elsif ($page == 0) {
- if(security::msec::choose_security_level($in, \$security, \$libsafe, \$sec_user, \$signal)) {
- security::libsafe::config_libsafe('', $libsafe);
- security::msec::config_security_user('', $sec_user);
- $ENV{LILO_PASSWORD} = ''; # make it non interactive
- log::l("[draksec] Setting security level to $security");
- system "/usr/sbin/msec", $security;
- } }
-
- $signal;
-}
-
-sub main {
- my ($prefix, $in) = @_;
- my $signal = 0;
-
- while ($signal != 9) {
- # signal 0 = basic page
- # signal 1 = first advanced page (functions)
- # signal 2 = checks page
- # signal 3 = permissions page
- # signal 4 = firewall page
- # signal 5 = users page
- # signal 9 = quit
-
- $signal = show_page($prefix, $in, $signal);
- }
-}
-
-1;