From 5bdd01f0daf81cf97a5d04004adb55a75c58ef6c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 14 Dec 1999 17:53:21 +0000 Subject: no_comment --- perl-install/Xconfigurator.pm | 3 +-- perl-install/standalone/adduserdrake | 5 ++++- perl-install/standalone/draksec | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100755 perl-install/standalone/draksec (limited to 'perl-install') diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index b34cdeb50..0327b4728 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -105,8 +105,7 @@ sub readMonitorsDB { $monitors{$l{type}} = \%l; } while (my ($k, $v) = each %standard_monitors) { - $monitors{$k} = - $monitors{$v->[0]} = + $monitors{" " . translate($k)} = { hsyncrange => $v->[1], vsyncrange => $v->[2] }; } } diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake index 52fbdfd68..8c3b3c477 100755 --- a/perl-install/standalone/adduserdrake +++ b/perl-install/standalone/adduserdrake @@ -18,6 +18,7 @@ my $in = vnew interactive('su'); my @etc_pass_fields = qw(name pw uid gid realname home shell); my @shells = map { "/bin/$_" } qw(bash tcsh zsh ash ksh); my $isMD5 = cat_("/etc/pam.d/passwd") =~ /md5/; +my $isShadow = cat_("/etc/pam.d/passwd") =~ /shadow/; my $security = $ENV{SECURITY_LEVEL}; new: @@ -59,7 +60,9 @@ if ($in->ask_from_entries_refH( $_ = join(':', @$u{@etc_pass_fields}) . "\n"; } } "/etc/passwd"; - + + system("pwconv") if $isShadow; + $u = {}; goto new; } 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); -- cgit v1.2.1