summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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]);
}