aboutsummaryrefslogtreecommitdiffstats
path: root/modules/restrictshell
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-11-24 11:14:33 +0000
committerMichael Scherer <misc@mageia.org>2010-11-24 11:14:33 +0000
commit9ea3a5b939bcfbda0640d893bb7e2d18a73f6370 (patch)
tree63fdd847361bc1e3c2514fabc4eaff1de2c873bf /modules/restrictshell
parentae6ba130344466d36dac9988bb9bcbbd0256fb80 (diff)
downloadpuppet-9ea3a5b939bcfbda0640d893bb7e2d18a73f6370.tar
puppet-9ea3a5b939bcfbda0640d893bb7e2d18a73f6370.tar.gz
puppet-9ea3a5b939bcfbda0640d893bb7e2d18a73f6370.tar.bz2
puppet-9ea3a5b939bcfbda0640d893bb7e2d18a73f6370.tar.xz
puppet-9ea3a5b939bcfbda0640d893bb7e2d18a73f6370.zip
- improve error message when trying to get a interactive shell
Diffstat (limited to 'modules/restrictshell')
-rw-r--r--modules/restrictshell/templates/sv_membersh.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/restrictshell/templates/sv_membersh.pl b/modules/restrictshell/templates/sv_membersh.pl
index 521587d0..3adc19f8 100644
--- a/modules/restrictshell/templates/sv_membersh.pl
+++ b/modules/restrictshell/templates/sv_membersh.pl
@@ -149,7 +149,11 @@ if ($#ARGV == 1 and $ARGV[0] eq "-c") {
}
unless (-e "/etc/membersh-errormsg") {
- print STDERR "You tried to execute: @ARGV[1..$#ARGV]\n";
+ if ($ARGV) {
+ print STDERR "You tried to execute: @ARGV[1..$#ARGV]\n";
+ } else {
+ print STDERR "You tried to run a interactive shell.\n"
+ }
print STDERR "Sorry, you are not allowed to execute that command.\n";
} else {
open(ERRORMSG, "< /etc/membersh-errormsg");