summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/draksec
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-14 17:53:21 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-14 17:53:21 +0000
commit5bdd01f0daf81cf97a5d04004adb55a75c58ef6c (patch)
tree0730d1598c7012ae871f146af6fa8ad2df3b4115 /perl-install/standalone/draksec
parentea1c93402dfa2aba19ab3dbc3551cd21572affb9 (diff)
downloaddrakx-backup-do-not-use-5bdd01f0daf81cf97a5d04004adb55a75c58ef6c.tar
drakx-backup-do-not-use-5bdd01f0daf81cf97a5d04004adb55a75c58ef6c.tar.gz
drakx-backup-do-not-use-5bdd01f0daf81cf97a5d04004adb55a75c58ef6c.tar.bz2
drakx-backup-do-not-use-5bdd01f0daf81cf97a5d04004adb55a75c58ef6c.tar.xz
drakx-backup-do-not-use-5bdd01f0daf81cf97a5d04004adb55a75c58ef6c.zip
no_comment
Diffstat (limited to 'perl-install/standalone/draksec')
-rwxr-xr-xperl-install/standalone/draksec34
1 files changed, 34 insertions, 0 deletions
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
new file mode 100755
index 000000000..8877501b5
--- /dev/null
+++ b/perl-install/standalone/draksec
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+
+use lib qw(/usr/lib/libDrakX);
+
+use common qw(:system);
+use interactive;
+use mouse;
+use c;
+
+local $_ = join '', @ARGV;
+
+/-h/ and die "usage: draksec [--expert]\n";
+
+$::expert = /--expert/;
+$::isStandalone = 1;
+
+my $in = vnew interactive('su');
+
+my %m = reverse (my %l = (
+ 0 => _("Windows(TM)"),
+ 1 => _("Poor"),
+ 2 => _("Low"),
+ 3 => _("Medium"),
+ 4 => _("High"),
+ 5 => _("Paranoid"),
+));
+delete @l{0,1,5} unless $::expert;
+
+if (my $level = $in->ask_from_list('', _("Choose security level"), [ values %l ], $l{$ENV{SECURE_LEVEL}})) {
+ my $w = $in->wait_message('', _("Setting security level"));
+ system("/etc/security/msec/init.sh ". $m{$level});
+}
+
+$in->exit(0);