summaryrefslogtreecommitdiffstats
path: root/perl-install/security/main.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-11-19 13:37:21 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-11-19 13:37:21 +0000
commit7d9973538da0ffaf2c95412393f072c330bd2c5e (patch)
tree7932f10f636c0ea4b89e9b2968e62985136db3ee /perl-install/security/main.pm
parentc77b3d5c4e8832b4bc3ca66c0ef23c1427b046bd (diff)
downloaddrakx-backup-do-not-use-7d9973538da0ffaf2c95412393f072c330bd2c5e.tar
drakx-backup-do-not-use-7d9973538da0ffaf2c95412393f072c330bd2c5e.tar.gz
drakx-backup-do-not-use-7d9973538da0ffaf2c95412393f072c330bd2c5e.tar.bz2
drakx-backup-do-not-use-7d9973538da0ffaf2c95412393f072c330bd2c5e.tar.xz
drakx-backup-do-not-use-7d9973538da0ffaf2c95412393f072c330bd2c5e.zip
- fix duplication of sec level setting:
merge any::get_secure_level() with secure::msec::get_secure_level() - move security level functions from secure::msec to secure::level - uses secure::level in install_steps - fix duplication of security level labels - draksec: use same strings in drakx, got nice translations - get_default_checks(): make it more readable
Diffstat (limited to 'perl-install/security/main.pm')
-rw-r--r--perl-install/security/main.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/security/main.pm b/perl-install/security/main.pm
index 7b3f5f0df..370295b7f 100644
--- a/perl-install/security/main.pm
+++ b/perl-install/security/main.pm
@@ -7,6 +7,7 @@ use common;
use my_gtk qw(:helpers :wrappers :ask);
use run_program;
+use security::level;
use security::msec;
# factorize this with rpmdrake and harddrake2
@@ -51,10 +52,10 @@ Security Administrator:
sub basic_seclevel_option {
my ($seclevel_entry, $msec) = @_;
- my @sec_levels = $msec->get_seclevel_list();
- my $current_level = $msec->get_secure_level();
+ my @sec_levels = security::level::get_common_list();
+ my $current_level = security::level::get_string();
- push(@sec_levels, $current_level) if $current_level eq "Dangerous" || $current_level eq "Poor";
+ push(@sec_levels, $current_level) unless member($current_level, @sec_levels);
$$seclevel_entry->entry->set_editable(0);
$$seclevel_entry->set_popdown_strings(@sec_levels);
@@ -182,10 +183,10 @@ sub draksec_main {
standalone::explanations("Configuring msec");
- if ($seclevel_value ne $msec->get_secure_level()) {
+ if ($seclevel_value ne security::level::get_string()) {
$w = wait_msg(N("Please wait, setting security level..."));
standalone::explanations("Setting security level");
- $msec->set_secure_level($seclevel_value);
+ security::level::set($seclevel_value);
remove_wait_msg($w);
}
@@ -213,7 +214,7 @@ sub draksec_main {
}
}
standalone::explanations("Applying msec changes");
- run_program::run($::prefix, "/usr/sbin/msec");
+ run_program::rooted($::prefix, "/usr/sbin/msec");
remove_wait_msg($w);