summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorChristian Belisle <cbelisle@mandriva.com>2002-07-18 17:05:32 +0000
committerChristian Belisle <cbelisle@mandriva.com>2002-07-18 17:05:32 +0000
commitdf0029f41bed41a290533b4e4507f899798d958b (patch)
treeef05b8860c838dad1209cc592cd62752b0819229 /perl-install/standalone
parent53b3ee0964e09fa0a1ebf1f721485388afd8fa20 (diff)
downloaddrakx-backup-do-not-use-df0029f41bed41a290533b4e4507f899798d958b.tar
drakx-backup-do-not-use-df0029f41bed41a290533b4e4507f899798d958b.tar.gz
drakx-backup-do-not-use-df0029f41bed41a290533b4e4507f899798d958b.tar.bz2
drakx-backup-do-not-use-df0029f41bed41a290533b4e4507f899798d958b.tar.xz
drakx-backup-do-not-use-df0029f41bed41a290533b4e4507f899798d958b.zip
create the main() function in security.pm
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/draksec40
1 files changed, 4 insertions, 36 deletions
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index eb62520b3..6af60a0b1 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -1,31 +1,11 @@
#!/usr/bin/perl
-# DrakSec
-
-# Copyright (C) 2002 MandrakeSoft (cbelisle@mandrakesoft.com)
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
use lib qw(/usr/lib/libDrakX);
use standalone; #- warning, standalone must be loaded very first, for 'explanations'
use common;
use interactive;
-use any;
-use c;
use log;
use security::msec;
@@ -42,24 +22,12 @@ my $in = 'interactive'->vnew('su', 'security');
begin:
$::isEmbedded and kill USR2, $::CCPID;
-my $security = any::get_secure_level('');
-my $libsafe = any::config_libsafe('');
-my $sec_user = any::config_security_user('');
+my $security = security::msec::get_secure_level('');
+my $libsafe = security::msec::config_libsafe('');
+my $sec_user = security::msec::config_security_user('');
my $w;
-if (any::choose_security_level($in, \$security, \$libsafe, \$sec_user)) {
- log::l("[draksec] Setting libsafe activation variable to $libsafe");
- any::config_libsafe('', $libsafe);
- log::l("[draksec] Setting security administrator contact to $sec_user");
- any::config_security_user('', $sec_user);
-
- $w = $in->wait_message('', _("Setting security level"));
- $in->suspend;
- $ENV{LILO_PASSWORD} = ''; # make it non interactive
- log::l("[draksec] Setting security level to $security");
- system "/usr/sbin/msec", $security;
- $in->resume;
-}
+security::main($in, $security, $sec_user);
!$::isEmbedded ? $in->exit(0) : kill(USR1, $::CCPID);
goto begin;