summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Belisle <cbelisle@mandriva.com>2002-07-16 17:42:16 +0000
committerChristian Belisle <cbelisle@mandriva.com>2002-07-16 17:42:16 +0000
commitd1eed8f504b2b83b129e8e8295df7e8a471bb682 (patch)
treefe3a226e45fd54e1f3a2eeb514c8c14f689aec4f
parent5c58e4920c3b4fbf154cfcdf002f5b1347b2a7dd (diff)
downloaddrakx-backup-do-not-use-d1eed8f504b2b83b129e8e8295df7e8a471bb682.tar
drakx-backup-do-not-use-d1eed8f504b2b83b129e8e8295df7e8a471bb682.tar.gz
drakx-backup-do-not-use-d1eed8f504b2b83b129e8e8295df7e8a471bb682.tar.bz2
drakx-backup-do-not-use-d1eed8f504b2b83b129e8e8295df7e8a471bb682.tar.xz
drakx-backup-do-not-use-d1eed8f504b2b83b129e8e8295df7e8a471bb682.zip
re-write the part setting the security admin
-rwxr-xr-xperl-install/standalone/draksec45
1 files changed, 7 insertions, 38 deletions
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index 8c1e4d876..eb62520b3 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -26,6 +26,7 @@ use common;
use interactive;
use any;
use c;
+use log;
use security::msec;
local $_ = join '', @ARGV;
@@ -43,53 +44,21 @@ $::isEmbedded and kill USR2, $::CCPID;
my $security = any::get_secure_level('');
my $libsafe = any::config_libsafe('');
-my @logins = security::msec::get_user_list('');
-my $email = "put.your\@email.here";
+my $sec_user = any::config_security_user('');
my $w;
-my (@options) = security::msec::get_config('', $security);
-my $expert_file = "/etc/security/msec/expert_mode";
-my $expert_section = "";
-
-#for $href (@options) {
-# for $href2 (keys %$href) {
-# %noref = %$href;
-# print "$href2 = $noref{$href2}{description}\n";
-# }
-#}
-
-if (any::choose_security_level($in, \$security, \$libsafe, \$email)) {
+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;
-
- $w = $in->wait_message('', _("Setting security user"));
- $in->suspend;
- security::msec::add_config('', "set_security_conf", "MAIL_USER", $email);
- security::msec::commit_changes('');
- $in->resume;
-}
-
-while (-f $expert_file) {
- $expert_section = cat_($expert_file);
-
- %config_hash = %{ $options[$expert_section] };
-
-# foreach $key (keys %config_hash) {
-# print "$key = $config_hash{$key}{val}\n";
-# }
-
- if(any::choose_security_options($in, $security, $libsafe, \$email, \%config_hash)) {
- $w = $in->wait_message('', _("Setting security options"));
- $in->suspend;
- $in->resume;
- }
-
- rm_rf($expert_file);
}
!$::isEmbedded ? $in->exit(0) : kill(USR1, $::CCPID);