[Mageia-sysadm] [452] - improve error message when trying to get a interactive shell

root at mageia.org root at mageia.org
Wed Nov 24 12:14:33 CET 2010


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:
--------------
    puppet/modules/restrictshell/templates/sv_membersh.pl

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");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101124/d2c67679/attachment.html>


More information about the Mageia-sysadm mailing list