summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorChristian Belisle <cbelisle@mandriva.com>2002-07-16 17:41:42 +0000
committerChristian Belisle <cbelisle@mandriva.com>2002-07-16 17:41:42 +0000
commit48d5904b7a039000f90dad4dee27f85ddd4b3c69 (patch)
treed6789896094c09583262e0ec7a4f1835d4deca2b /perl-install/any.pm
parentb8be6027d2ebde3cfb7229d3efa11db317ed86e4 (diff)
downloaddrakx-48d5904b7a039000f90dad4dee27f85ddd4b3c69.tar
drakx-48d5904b7a039000f90dad4dee27f85ddd4b3c69.tar.gz
drakx-48d5904b7a039000f90dad4dee27f85ddd4b3c69.tar.bz2
drakx-48d5904b7a039000f90dad4dee27f85ddd4b3c69.tar.xz
drakx-48d5904b7a039000f90dad4dee27f85ddd4b3c69.zip
draksec:
- rewrite the function to set the security admin - remove ugly buttons, 'advanced' button will come later
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm48
1 files changed, 9 insertions, 39 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 02b884ada..ce092155d 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -1034,44 +1034,20 @@ sub config_libsafe {
text2bool($t{LIBSAFE});
}
-sub choose_security_options {
- my ($in, $security, $libsafe, $email, $options) = @_;
- my $expert_file = "/etc/security/msec/expert_mode";
-
- my @shown_options = ();
- my $key = "";
- my $i=0;
- my $title;
-
- my $expert_section = cat_($expert_file);
-
- if ($expert_section == 0) { $title = _("DrakSec - Network Advanced Options"); }
- elsif ($expert_section == 1) { $title = _("DrakSec - User Advanced Options"); }
- elsif ($expert_section == 2) { $title = _("DrakSec - Server Advanced Options"); }
-
- for $key (keys %$options) {
- $shown_options[$i]->{label} = "$options->{$key}{label}";
- $shown_options[$i]->{val} = $options->{$key}{val};
- $shown_options[$i]->{list} = $options->{$key}{list};
- $shown_options[$i]->{type} = $options->{$key}{type};
- $i++;
+sub config_security_user {
+ my ($prefix, $sec_user) = @_;
+ my %t = getVarsFromSh("$prefix/etc/security/msec/security.conf");
+ if (@_ > 1) {
+ $t{MAIL_USER} = $sec_user;
+ setVarsInSh("$prefix/etc/security/msec/security.conf", \%t);
}
-
- $in->ask_from(
- $title,
- _("Choose advanced security options\n\n"),
- [
- @shown_options
- ]
- );
+ $t{MAIL_USER};
}
sub choose_security_level {
- my ($in, $security, $libsafe) = @_;
+ my ($in, $security, $libsafe, $email) = @_;
my $expert_file = "/etc/security/msec/expert_mode";
- my $email;
-
my %l = (
0 => _("Welcome To Crackers"),
1 => _("Poor"),
@@ -1104,13 +1080,7 @@ connections from many clients. Note: if your machine is only a client on the Int
if_($in->do_pkgs->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.") } ),
- { label => _("Security user (login or email)"), val => $email, },
- { clicked_may_quit => sub { open(EXPERT, '>'.$expert_file); print EXPERT "0"; close EXPERT; },
- val => _("NETWORK-RELATED SECURITY OPTIONS") },
- { clicked_may_quit => sub { open(EXPERT, '>'.$expert_file); print EXPERT "1"; close EXPERT; },
- val => _("USER-RELATED SECURITY OPTIONS") },
- { clicked_may_quit => sub { open(EXPERT, '>'.$expert_file); print EXPERT "2"; close EXPERT; },
- val => _("SERVER-RELATED SECURITY OPTIONS") }
+ { label => _("Security Administrator (login or email)"), val => $email, },
],
);
}