Commit 620694f6 authored by David Johnson's avatar David Johnson

Docker clientside: sanity-check ssh exec shell if specified.

parent 0c0a2f26
......@@ -3116,7 +3116,15 @@ sub vnodePreConfigControlNetwork($$$$$$$$$$$$)
my $attributes = $vnconfig->{'attributes'};
my $emulabization = $attributes->{DOCKER_EMULABIZATION};
my $ssh_style = $attributes->{DOCKER_SSH_STYLE};
my $exec_shell = $attributes->{DOCKER_EXEC_SHELL} || "/bin/sh";
my $exec_shell = $attributes->{DOCKER_EXEC_SHELL};
if (defined($exec_shell) && $exec_shell =~ /^[\/\w\d\-_]+$/) {
$exec_shell = $1;
}
else {
warn("malformed shell: $exec_shell ; defaulting to /bin/sh");
$exec_shell = '/bin/sh';
}
if (($emulabization ne DOCKER_EMULABIZE_NONE()
&& (!defined($ssh_style) || $ssh_style eq ''
......
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