Commit 954fa99f authored by Robert Ricci's avatar Robert Ricci

Add a variable, $allow_interactive, that specificies whether an

interactive shell is allowed or not - paperpag will just exit
silently if interactive shells are not allowed, but no command was
given on the command line.

This variable is now off to prevent interactive shells, but all the
interactive code is still in place, in case we ever have a reason to
want it.
parent 5a758271
......@@ -54,9 +54,16 @@ $message = "This is a restricted shell, and will only allow you to run
a limited set of commands. For an unrestrictive shell, log into
ops.emulab.net\n";
# Whether or not to allow interactive sessions
$allow_interactive = 0;
$debug = 0;
$| = 1; # No line buffering, so that we can see the prompt
$interactive = 1;
if ($allow_interactive) {
$interactive = 1;
} else {
$interactive = 0;
}
if (@ARGV && ($ARGV[0] eq "-c")) { # We were called by sshd - transform args into a useful form
my $bigarg = pop @ARGV;
......
......@@ -54,9 +54,16 @@ $message = "This is a restricted shell, and will only allow you to run
a limited set of commands. For an unrestrictive shell, log into
ops.emulab.net\n";
# Whether or not to allow interactive sessions
$allow_interactive = 0;
$debug = 0;
$| = 1; # No line buffering, so that we can see the prompt
$interactive = 1;
if ($allow_interactive) {
$interactive = 1;
} else {
$interactive = 0;
}
if (@ARGV && ($ARGV[0] eq "-c")) { # We were called by sshd - transform args into a useful form
my $bigarg = pop @ARGV;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment