From a50c10d13e1a9e0eee061b0f40bcbbf568ceb07d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 18 Sep 2002 08:00:26 +0000 Subject: remove brackets on function values loading --- perl-install/security/msec.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'perl-install/security/msec.pm') 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() { 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 }); } -- cgit v1.2.1