summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-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, },
],
);
}