summaryrefslogtreecommitdiffstats
path: root/perl-install/security
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-09-18 08:00:26 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-09-18 08:00:26 +0000
commita50c10d13e1a9e0eee061b0f40bcbbf568ceb07d (patch)
tree7aa2e4a7507fb0629ba033ab83415b83c02f025e /perl-install/security
parent04addcac3471647d18df7d2440810857a4a9d5d0 (diff)
downloaddrakx-backup-do-not-use-a50c10d13e1a9e0eee061b0f40bcbbf568ceb07d.tar
drakx-backup-do-not-use-a50c10d13e1a9e0eee061b0f40bcbbf568ceb07d.tar.gz
drakx-backup-do-not-use-a50c10d13e1a9e0eee061b0f40bcbbf568ceb07d.tar.bz2
drakx-backup-do-not-use-a50c10d13e1a9e0eee061b0f40bcbbf568ceb07d.tar.xz
drakx-backup-do-not-use-a50c10d13e1a9e0eee061b0f40bcbbf568ceb07d.zip
remove brackets on function values loading
Diffstat (limited to 'perl-install/security')
-rw-r--r--perl-install/security/msec.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/security/msec.pm b/perl-install/security/msec.pm
index 7ba49dbaa..59fff91da 100644
--- a/perl-install/security/msec.pm
+++ b/perl-install/security/msec.pm
@@ -105,7 +105,11 @@ sub get_value {
while(<F>) {
if($_ =~ /^$item/) {
if ($category eq 'functions') {
- (undef, $value) = split(/ /, $_);
+ my $i = $_;
+ (undef, $_) = split / /;
+ tr /()//d;
+ $value = $_;
+ $_ = $i;
} elsif ($category eq 'checks') {
(undef, $value) = split(/=/, $_);
}
@@ -224,9 +228,9 @@ sub config_function {
my $options_file = "$::prefix/etc/security/msec/level.local";
if ($value eq 'default') {
- substInFile { s/^$function.*// } $options_file;
+ substInFile { s/^$function.*\n// } $options_file;
} else {
- substInFile { s/^$function.*// } $options_file;
+ substInFile { s/^$function.*\n// } $options_file;
append_to_file($options_file, "$function ($value)")
}
}
@@ -275,7 +279,7 @@ sub config_check {
shift;
my ($check, $value) = @_;
if ($value eq 'default') {
- substInFile { s/^$check.*// } $check_file;
+ substInFile { s/^$check.*\n// } $check_file;
} else {
setVarsInSh($check_file, { $check => $value });
}