Merge branch 'master' of github.com:webmin/webmin

This commit is contained in:
Jamie Cameron
2022-10-26 09:06:58 -07:00
2 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
index_title=Interactive Shell
index_cpan=The Perl module <tt>$1</tt> needed to accept Websockets connections is not available, but you can install it automatically using Webmin's <a href='$2'>Perl Modules</a> module.
index_cpan=The Perl module <tt>$1</tt> needed to accept WebSockets connections is not available, but you can install it automatically using Webmin's <a href='$2'>Perl Modules</a> module.
index_euser=User $1 to run the shell as does not exist!
acl_user=Run shell as Unix user

View File

@@ -38,7 +38,7 @@ Net::WebSocket::Server->new(
print STDERR "got websockets connection\n";
if ($wsconn) {
print STDERR "Too many connections to the same port!\n";
&cleanup_miniserv();
&cleanup_miniserv();
kill('KILL', $pid) if ($pid);
exit(1);
}
@@ -69,7 +69,7 @@ Net::WebSocket::Server->new(
},
disconnect => sub {
print STDERR "websocket connection closed\n";
&cleanup_miniserv();
&cleanup_miniserv();
kill('KILL', $pid) if ($pid);
exit(0);
}
@@ -80,10 +80,10 @@ Net::WebSocket::Server->new(
# Got something from the shell
my $buf;
my $ok = sysread($shellfh, $buf, 1);
if ($ok <= 0) {
&cleanup_miniserv();
exit(0);
}
if ($ok <= 0) {
&cleanup_miniserv();
exit(0);
}
if ($wsconn) {
$wsconn->send_binary($buf);
}