diff options
author | Mystery Man <unknown@mandriva.org> | 2001-09-05 12:55:06 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2001-09-05 12:55:06 +0000 |
commit | ec7d8bfda214073d222fcadfa1ac9d3ed884ea87 (patch) | |
tree | d17c669ffaea9eae8bbc6b1b82b6164e75c6c42d /perl-install/standalone/draksec | |
parent | d2428470c34f096821615c7f119775b03aa86253 (diff) | |
download | drakx-V_9mdk.tar drakx-V_9mdk.tar.gz drakx-V_9mdk.tar.bz2 drakx-V_9mdk.tar.xz drakx-V_9mdk.zip |
This commit was manufactured by cvs2svn to create tag 'V_9mdk'.V_9mdk
Diffstat (limited to 'perl-install/standalone/draksec')
-rwxr-xr-x | perl-install/standalone/draksec | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec deleted file mode 100755 index 231b19a82..000000000 --- a/perl-install/standalone/draksec +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/perl - -use lib qw(/usr/lib/libDrakX); - -use common; -use interactive; -use standalone; -use mouse; -use c; - -local $_ = join '', @ARGV; - -/-h/ and die "usage: draksec [--expert]\n"; - -$::expert = /-expert/ || cat_("/etc/sysconfig/system") =~ /^CLASS="?expert/m; #" -$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; - -my $in = 'interactive'->vnew('su', 'security'); - -my %m = reverse (my %l = ( - 0 => _("Welcome To Crackers"), - 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; - -begin: -$::isEmbedded and kill USR2, $::CCPID; - -$secure_level = ${{ getVarsFromSh("/etc/profile") }}{SECURE_LEVEL} || $ENV{SECURE_LEVEL} || 2; - -#$in->ask_from('', -# _("Choose security level") . "\n\n" . join('', map { "$l{$_}: $help{$_}\n\n" } keys %l), -# { label => _($st->{$f}{text}), val => \$def_choice, list => [ 'replay', 'manual' ] }, -# { label => _($st->{$f}{text}), val => \$def_choice, list => [ 'replay', 'manual' ] } -# ) - -my ($level, $libsafe); -my %h = getVarsFromSh("$prefix/etc/sysconfig/system"); -$libsafe = $h{LIBSAFE} =~ /yes/i; - -if ($in->ask_from('', _("Choose security level") . "\n\n" . - join('', map { "$l{$_}: $help{$_}\n\n" } keys %l), - [ - { label => _('Security level'), val => \$level, list => [ (values %l) ] }, - if_(pkgs_interactive::is_installed('libsafe') && arch() =~ /^i.86/, - { label => _('Use libsafe for servers'), val => \$libsafe, type => 'bool', text => - _('A library which defends against buffer overflow and format string attacks.') } - ) - ] - )) { - my $w = $in->wait_message('', _("Setting security level")); - $in->suspend; - - $ENV{LILO_PASSWORD} = ''; # make it non interactive - system "/usr/sbin/msec", $m{$level}; - my %t = getVarsFromSh("$prefix/etc/sysconfig/system"); - - $t{LIBSAFE} = bool2yesno($libsafe); - setVarsInSh("$prefix/etc/sysconfig/system", \%t); - $in->resume; -} - -!$::isEmbedded ? $in->exit(0) : kill(USR1, $::CCPID); -goto begin; |