summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/draksec
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
committerMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
commitd5c526273db473a7d87a26000585900fc10dda7d (patch)
tree0fdaabe7a00921b6cc556601b103d344fc7ac781 /perl-install/standalone/draksec
parent9c164312d4bfff6d93e1c4529de6b992f2bebc44 (diff)
downloaddrakx-d5c526273db473a7d87a26000585900fc10dda7d.tar
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.gz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.bz2
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.xz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.zip
This commit was manufactured by cvs2svn to create branch
'unlabeled-1.1.1'.
Diffstat (limited to 'perl-install/standalone/draksec')
-rwxr-xr-xperl-install/standalone/draksec34
1 files changed, 5 insertions, 29 deletions
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index 8ca34947d..8877501b5 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -2,7 +2,7 @@
use lib qw(/usr/lib/libDrakX);
-use common qw(:system :file);
+use common qw(:system);
use interactive;
use mouse;
use c;
@@ -11,48 +11,24 @@ local $_ = join '', @ARGV;
/-h/ and die "usage: draksec [--expert]\n";
-$::expert = /-expert/ || cat_("/etc/sysconfig/system") =~ /^TYPE="?expert/m; #"
+$::expert = /--expert/;
$::isStandalone = 1;
my $in = vnew interactive('su');
my %m = reverse (my %l = (
- 0 => _("Welcome To Crackers"),
+ 0 => _("Windows(TM)"),
1 => _("Poor"),
2 => _("Low"),
3 => _("Medium"),
4 => _("High"),
5 => _("Paranoid"),
));
-my %help = (
- 0 => _("This level is to be used with care. It makes your system more easy to use,
-but very sensitive: it must not be used for a machine connected to others
-or to the Internet. There is no password access."),
- 1 => _("Password are now enabled, but use as a networked computer is still not recommended."),
- 2 => _("Few improvements for this security level, the main one is that there are
-more security warnings and checks."),
- 3 => _("This is the standard security recommended for a computer that will be used
-to connect to the Internet as a client. There are now security checks. "),
- 4 => _("With this security level, the use of this system as a server becomes possible.
-The security is now high enough to use the system as a server which accept
-connections from many clients. "),
- 5 => _("We take level 4 features, but now the system is entirely closed.
-Security features are at their maximum."),
-);
-
delete @l{0,1,5} unless $::expert;
-delete @help{0,1,5} unless $::expert;
-if (my $level = $in->ask_from_list('', _("Choose security level") . "\n\n" .
- join('', map { "$l{$_}: $help{$_}\n\n" } keys %l),
- [ values %l ], $l{$ENV{SECURE_LEVEL}})) {
+if (my $level = $in->ask_from_list('', _("Choose security level"), [ values %l ], $l{$ENV{SECURE_LEVEL}})) {
my $w = $in->wait_message('', _("Setting security level"));
- $in->suspend;
-
- $ENV{LILO_PASSWORD} = ''; # make it non interactive
- system "/usr/sbin/msec", $m{$level};
-
- $in->resume;
+ system("/etc/security/msec/init.sh ". $m{$level});
}
$in->exit(0);