summaryrefslogtreecommitdiffstats
path: root/perl-install/security/level.pm
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-04-14 16:30:32 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-04-14 16:30:32 +0000
commit56dc5fc618a352aa34d3742da327c98546221d59 (patch)
tree7e583d1cd3a0f0774edfa55965fd42e1c257b398 /perl-install/security/level.pm
parent5510055af8bca3dac0df8490b0337fab5af43e84 (diff)
downloaddrakx-56dc5fc618a352aa34d3742da327c98546221d59.tar
drakx-56dc5fc618a352aa34d3742da327c98546221d59.tar.gz
drakx-56dc5fc618a352aa34d3742da327c98546221d59.tar.bz2
drakx-56dc5fc618a352aa34d3742da327c98546221d59.tar.xz
drakx-56dc5fc618a352aa34d3742da327c98546221d59.zip
Using Standard security level if specified level is out of range.
Diffstat (limited to 'perl-install/security/level.pm')
-rw-r--r--perl-install/security/level.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl-install/security/level.pm b/perl-install/security/level.pm
index c0f76e049..79879336d 100644
--- a/perl-install/security/level.pm
+++ b/perl-install/security/level.pm
@@ -27,6 +27,8 @@ sub get() {
sub set {
my ($security) = @_;
my @levelnames = ( 'none', 'standard', 'secure' );
+ # use Standard level if specified level is out of range
+ $security = 1 if $security > $#levelnames;
run_program::rooted($::prefix, 'msec', '-q', '-f', @levelnames[$security]);
run_program::rooted($::prefix, 'msecperms', '-q', '-e', '-f', @levelnames[$security]);
}