Revision
452
Author
misc
Date
2010-11-24 12:14:33 +0100 (Wed, 24 Nov 2010)

Log Message

- improve error message when trying to get a interactive shell

Modified Paths

Modified: puppet/modules/restrictshell/templates/sv_membersh.pl
===================================================================
--- puppet/modules/restrictshell/templates/sv_membersh.pl	2010-11-24 02:50:45 UTC (rev 451)
+++ puppet/modules/restrictshell/templates/sv_membersh.pl	2010-11-24 11:14:33 UTC (rev 452)
@@ -149,7 +149,11 @@
 }
 
 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");