From 9ea3a5b939bcfbda0640d893bb7e2d18a73f6370 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 24 Nov 2010 11:14:33 +0000 Subject: - improve error message when trying to get a interactive shell --- modules/restrictshell/templates/sv_membersh.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/restrictshell') 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"); -- cgit v1.2.1