Remove trailing whitespace
This commit is contained in:
parent
1dd42d66c2
commit
284d90ccc4
25 changed files with 115 additions and 124 deletions
|
@ -222,7 +222,7 @@
|
||||||
2009-04-28 Markus Gutschke <markus@shellinabox.com>
|
2009-04-28 Markus Gutschke <markus@shellinabox.com>
|
||||||
|
|
||||||
* Fixed variable expansion in service descriptions.
|
* Fixed variable expansion in service descriptions.
|
||||||
|
|
||||||
2009-04-27 Markus Gutschke <markus@shellinabox.com>
|
2009-04-27 Markus Gutschke <markus@shellinabox.com>
|
||||||
|
|
||||||
* Released version 2.7
|
* Released version 2.7
|
||||||
|
@ -268,7 +268,7 @@
|
||||||
cursor if the line ends in spaces.
|
cursor if the line ends in spaces.
|
||||||
|
|
||||||
* Work-around for an IE6 bug when doing HTTPS through proxies.
|
* Work-around for an IE6 bug when doing HTTPS through proxies.
|
||||||
|
|
||||||
2009-03-21 Markus Gutschke <markus@shellinabox.com>
|
2009-03-21 Markus Gutschke <markus@shellinabox.com>
|
||||||
|
|
||||||
* Released version 2.5
|
* Released version 2.5
|
||||||
|
@ -374,11 +374,11 @@
|
||||||
* Added CGI mode for demand-loading the shellinaboxd daemon
|
* Added CGI mode for demand-loading the shellinaboxd daemon
|
||||||
from a web server. This also allows for the web server to
|
from a web server. This also allows for the web server to
|
||||||
perform authentication, instead of having shellinaboxd do so.
|
perform authentication, instead of having shellinaboxd do so.
|
||||||
|
|
||||||
* Tightened setuid-root operation to no longer allow switching
|
* Tightened setuid-root operation to no longer allow switching
|
||||||
to arbitrary users/groups. As before, setuid-root remains a
|
to arbitrary users/groups. As before, setuid-root remains a
|
||||||
non-standard configuration that is not currently recommended.
|
non-standard configuration that is not currently recommended.
|
||||||
|
|
||||||
* Fixed session management to deal better with torn down
|
* Fixed session management to deal better with torn down
|
||||||
connections. Closed one bug that could have resulted in
|
connections. Closed one bug that could have resulted in
|
||||||
permanently orphaned connections, when the browser navigated
|
permanently orphaned connections, when the browser navigated
|
||||||
|
@ -389,4 +389,3 @@
|
||||||
* First public release of the version 2.0 rewrite. This is the
|
* First public release of the version 2.0 rewrite. This is the
|
||||||
first release of ShellInABox that supports an AJAX interface
|
first release of ShellInABox that supports an AJAX interface
|
||||||
instead of the original Java applet.
|
instead of the original Java applet.
|
||||||
|
|
||||||
|
|
1
INSTALL
1
INSTALL
|
@ -234,4 +234,3 @@ an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||||
|
|
||||||
`configure' also accepts some other, not widely useful, options. Run
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
`configure --help' for more details.
|
`configure --help' for more details.
|
||||||
|
|
||||||
|
|
|
@ -29,4 +29,3 @@ some tips on getting things working:
|
||||||
Make sure you assign the correct SELinux labels to this file when copying
|
Make sure you assign the correct SELinux labels to this file when copying
|
||||||
it into "/etc/pam.d":
|
it into "/etc/pam.d":
|
||||||
cp -Z system_u:object_r:etc_t:s0 etc-pam.d-shellinabox-example /etc/pam.d/
|
cp -Z system_u:object_r:etc_t:s0 etc-pam.d-shellinabox-example /etc/pam.d/
|
||||||
|
|
||||||
|
|
1
TODO
1
TODO
|
@ -1,4 +1,3 @@
|
||||||
- Check if there is any way that we could fall back on gnutls if openssl is
|
- Check if there is any way that we could fall back on gnutls if openssl is
|
||||||
unavailable
|
unavailable
|
||||||
- Package for distributions other than Debian
|
- Package for distributions other than Debian
|
||||||
|
|
||||||
|
|
2
debian/shellinabox.init
vendored
2
debian/shellinabox.init
vendored
|
@ -8,7 +8,7 @@
|
||||||
# Short-Description: Shell In A Box Daemon
|
# Short-Description: Shell In A Box Daemon
|
||||||
# Description: Daemon for publishing a login shell at
|
# Description: Daemon for publishing a login shell at
|
||||||
# http://localhost:SHELLINABOX_PORT
|
# http://localhost:SHELLINABOX_PORT
|
||||||
# where default port number is 4200.
|
# where default port number is 4200.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# Authors: Markus Gutschke <markus@shellinabox.com>, Marc Singer <elf@buici.com>
|
# Authors: Markus Gutschke <markus@shellinabox.com>, Marc Singer <elf@buici.com>
|
||||||
|
|
1
debian/source/options
vendored
1
debian/source/options
vendored
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -6,23 +6,23 @@
|
||||||
<!--
|
<!--
|
||||||
ShellInABox - Make command line applications available as AJAX web applications
|
ShellInABox - Make command line applications available as AJAX web applications
|
||||||
Copyright (C) 2008-2010 Markus Gutschke markus@shellinabox.com
|
Copyright (C) 2008-2010 Markus Gutschke markus@shellinabox.com
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License version 2 as
|
it under the terms of the GNU General Public License version 2 as
|
||||||
published by the Free Software Foundation.
|
published by the Free Software Foundation.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
You should have received a copy of the GNU General Public License along
|
||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
In addition to these license terms, the author grants the following
|
In addition to these license terms, the author grants the following
|
||||||
additional rights:
|
additional rights:
|
||||||
|
|
||||||
If you modify this program, or any covered work, by linking or
|
If you modify this program, or any covered work, by linking or
|
||||||
combining it with the OpenSSL project's OpenSSL library (or a
|
combining it with the OpenSSL project's OpenSSL library (or a
|
||||||
modified version of that library), containing parts covered by the
|
modified version of that library), containing parts covered by the
|
||||||
|
@ -31,20 +31,20 @@
|
||||||
Corresponding Source for a non-source form of such a combination
|
Corresponding Source for a non-source form of such a combination
|
||||||
shall include the source code for the parts of OpenSSL used as well
|
shall include the source code for the parts of OpenSSL used as well
|
||||||
as that of the covered work.
|
as that of the covered work.
|
||||||
|
|
||||||
You may at your option choose to remove this additional permission from
|
You may at your option choose to remove this additional permission from
|
||||||
the work, or from any part of it.
|
the work, or from any part of it.
|
||||||
|
|
||||||
It is possible to build this program in a way that it loads OpenSSL
|
It is possible to build this program in a way that it loads OpenSSL
|
||||||
libraries at run-time. If doing so, the following notices are required
|
libraries at run-time. If doing so, the following notices are required
|
||||||
by the OpenSSL and SSLeay licenses:
|
by the OpenSSL and SSLeay licenses:
|
||||||
|
|
||||||
This product includes software developed by the OpenSSL Project
|
This product includes software developed by the OpenSSL Project
|
||||||
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
|
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
|
||||||
|
|
||||||
This product includes cryptographic software written by Eric Young
|
This product includes cryptographic software written by Eric Young
|
||||||
(eay@cryptsoft.com)
|
(eay@cryptsoft.com)
|
||||||
|
|
||||||
The most up-to-date version of this program is always available from
|
The most up-to-date version of this program is always available from
|
||||||
http://shellinabox.com
|
http://shellinabox.com
|
||||||
-->
|
-->
|
||||||
|
|
|
@ -880,7 +880,7 @@ Demo.prototype.intrinsic = function() {
|
||||||
}
|
}
|
||||||
v = arg1.val().substr(arg1.val().length - v);
|
v = arg1.val().substr(arg1.val().length - v);
|
||||||
value = new this.Value(TYPE_STRING, v, v);
|
value = new this.Value(TYPE_STRING, v, v);
|
||||||
break;
|
break;
|
||||||
case 'STR$':
|
case 'STR$':
|
||||||
value = new this.Value(TYPE_STRING, arg1.toString(),
|
value = new this.Value(TYPE_STRING, arg1.toString(),
|
||||||
arg1.toString());
|
arg1.toString());
|
||||||
|
@ -909,7 +909,7 @@ Demo.prototype.intrinsic = function() {
|
||||||
v = String.fromCharCode(arg1.val());
|
v = String.fromCharCode(arg1.val());
|
||||||
value = new this.Value(TYPE_STRING, v, v);
|
value = new this.Value(TYPE_STRING, v, v);
|
||||||
break;
|
break;
|
||||||
case 'SPC':
|
case 'SPC':
|
||||||
if (arg1.val() < 0) {
|
if (arg1.val() < 0) {
|
||||||
return this.error('Range error');
|
return this.error('Range error');
|
||||||
}
|
}
|
||||||
|
@ -1183,4 +1183,3 @@ Demo.prototype.Value.prototype.val = function() {
|
||||||
Demo.prototype.Value.prototype.toString = function() {
|
Demo.prototype.Value.prototype.toString = function() {
|
||||||
return this.s;
|
return this.s;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<Module>
|
<Module>
|
||||||
<ModulePrefs title="ShellInABox Demo" />
|
<ModulePrefs title="ShellInABox Demo" />
|
||||||
<Content type="url" href="http://shellinabox.googlecode.com/git/demo/demo.html" />
|
<Content type="url" href="http://shellinabox.googlecode.com/git/demo/demo.html" />
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#print {
|
#print {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#vt100 a {
|
#vt100 a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 a:hover {
|
#vt100 a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #reconnect input {
|
#vt100 #reconnect input {
|
||||||
padding: 1ex;
|
padding: 1ex;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: x-large;
|
font-size: x-large;
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 pre {
|
#vt100 pre {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,11 +44,11 @@
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #console, #vt100 #alt_console, #vt100 #cursor, #vt100 #lineheight, #vt100 .hidden pre {
|
#vt100 #console, #vt100 #alt_console, #vt100 #cursor, #vt100 #lineheight, #vt100 .hidden pre {
|
||||||
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, "Andale Mono", monospace;
|
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, "Andale Mono", monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #lineheight {
|
#vt100 #lineheight {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
margin: -1px;
|
margin: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #padding {
|
#vt100 #padding {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
height: 0px;
|
height: 0px;
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
height: 0px;
|
height: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #menu {
|
#vt100 #menu {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
|
@ -103,14 +103,14 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #menu .popup ul {
|
#vt100 #menu .popup ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
min-width: 10em;
|
min-width: 10em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #menu .popup li {
|
#vt100 #menu .popup li {
|
||||||
padding: 3px 0.5ex 3px 0.5ex;
|
padding: 3px 0.5ex 3px 0.5ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,11 +123,11 @@
|
||||||
color: #AAAAAA;
|
color: #AAAAAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #menu .popup hr {
|
#vt100 #menu .popup hr {
|
||||||
margin: 0.5ex 0px 0.5ex 0px;
|
margin: 0.5ex 0px 0.5ex 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #menu img {
|
#vt100 #menu img {
|
||||||
margin-right: 0.5ex;
|
margin-right: 0.5ex;
|
||||||
width: 1ex;
|
width: 1ex;
|
||||||
height: 1ex;
|
height: 1ex;
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
#vt100 #scrollable.inverted { color: #ffffff;
|
#vt100 #scrollable.inverted { color: #ffffff;
|
||||||
background-color: #000000; }
|
background-color: #000000; }
|
||||||
|
|
||||||
#vt100 #kbd_button {
|
#vt100 #kbd_button {
|
||||||
float: left;
|
float: left;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #keyboard .shifted {
|
#vt100 #keyboard .shifted {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,15 +218,15 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #reconnect, #vt100 #cursor, #vt100 #menu, #vt100 #kbd_button, #vt100 #keyboard {
|
#vt100 #reconnect, #vt100 #cursor, #vt100 #menu, #vt100 #kbd_button, #vt100 #keyboard {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #scrollable {
|
#vt100 #scrollable {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #console, #vt100 #alt_console {
|
#vt100 #console, #vt100 #alt_console {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 1000000ex;
|
width: 1000000ex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1637,7 +1637,7 @@ int httpHandleConnection(struct ServerConnection *connection, void *http_,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the callback only provided partial data, refill the outgoing
|
// If the callback only provided partial data, refill the outgoing
|
||||||
// buffer whenever it runs low.
|
// buffer whenever it runs low.
|
||||||
if (http->isPartialReply && (!http->msg || http->msgLength <= 0)) {
|
if (http->isPartialReply && (!http->msg || http->msgLength <= 0)) {
|
||||||
|
@ -1664,7 +1664,7 @@ int httpHandleConnection(struct ServerConnection *connection, void *http_,
|
||||||
http->msg = NULL;
|
http->msg = NULL;
|
||||||
http->msgLength = 0;
|
http->msgLength = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!(*events || http->isSuspended) || timedOut) && http->sslHndl) {
|
if ((!(*events || http->isSuspended) || timedOut) && http->sslHndl) {
|
||||||
*events = 0;
|
*events = 0;
|
||||||
serverSetTimeout(connection, 1);
|
serverSetTimeout(connection, 1);
|
||||||
|
|
|
@ -115,7 +115,7 @@ struct HttpHandler {
|
||||||
int (*websocketHandler)(struct HttpConnection *, void *, int,
|
int (*websocketHandler)(struct HttpConnection *, void *, int,
|
||||||
const char *, int);
|
const char *, int);
|
||||||
void *arg, *streamingArg;
|
void *arg, *streamingArg;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HttpConnection *newHttpConnection(struct Server *server, int fd,
|
struct HttpConnection *newHttpConnection(struct Server *server, int fd,
|
||||||
|
|
|
@ -181,7 +181,7 @@ static int serverCollectFullPayload(struct HttpConnection *http,
|
||||||
free(payload);
|
free(payload);
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int serverCollectHandler(struct HttpConnection *http, void *handler_) {
|
static int serverCollectHandler(struct HttpConnection *http, void *handler_) {
|
||||||
|
|
|
@ -191,4 +191,3 @@ char *stringPrintfUnchecked(char *buf, const char *fmt, ...)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -6,23 +6,23 @@
|
||||||
<!--
|
<!--
|
||||||
ShellInABox - Make command line applications available as AJAX web applications
|
ShellInABox - Make command line applications available as AJAX web applications
|
||||||
Copyright (C) 2008-2009 Markus Gutschke markus@shellinabox.com
|
Copyright (C) 2008-2009 Markus Gutschke markus@shellinabox.com
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License version 2 as
|
it under the terms of the GNU General Public License version 2 as
|
||||||
published by the Free Software Foundation.
|
published by the Free Software Foundation.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
You should have received a copy of the GNU General Public License along
|
||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
In addition to these license terms, the author grants the following
|
In addition to these license terms, the author grants the following
|
||||||
additional rights:
|
additional rights:
|
||||||
|
|
||||||
If you modify this program, or any covered work, by linking or
|
If you modify this program, or any covered work, by linking or
|
||||||
combining it with the OpenSSL project's OpenSSL library (or a
|
combining it with the OpenSSL project's OpenSSL library (or a
|
||||||
modified version of that library), containing parts covered by the
|
modified version of that library), containing parts covered by the
|
||||||
|
@ -31,20 +31,20 @@
|
||||||
Corresponding Source for a non-source form of such a combination
|
Corresponding Source for a non-source form of such a combination
|
||||||
shall include the source code for the parts of OpenSSL used as well
|
shall include the source code for the parts of OpenSSL used as well
|
||||||
as that of the covered work.
|
as that of the covered work.
|
||||||
|
|
||||||
You may at your option choose to remove this additional permission from
|
You may at your option choose to remove this additional permission from
|
||||||
the work, or from any part of it.
|
the work, or from any part of it.
|
||||||
|
|
||||||
It is possible to build this program in a way that it loads OpenSSL
|
It is possible to build this program in a way that it loads OpenSSL
|
||||||
libraries at run-time. If doing so, the following notices are required
|
libraries at run-time. If doing so, the following notices are required
|
||||||
by the OpenSSL and SSLeay licenses:
|
by the OpenSSL and SSLeay licenses:
|
||||||
|
|
||||||
This product includes software developed by the OpenSSL Project
|
This product includes software developed by the OpenSSL Project
|
||||||
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
|
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
|
||||||
|
|
||||||
This product includes cryptographic software written by Eric Young
|
This product includes cryptographic software written by Eric Young
|
||||||
(eay@cryptsoft.com)
|
(eay@cryptsoft.com)
|
||||||
|
|
||||||
The most up-to-date version of this program is always available from
|
The most up-to-date version of this program is always available from
|
||||||
http://shellinabox.com
|
http://shellinabox.com
|
||||||
-->
|
-->
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
'<frame src="' + url + '#' +
|
'<frame src="' + url + '#' +
|
||||||
encodeURIComponent(document.location.href) +
|
encodeURIComponent(document.location.href) +
|
||||||
',%s' + '">\n' +
|
',%s' + '">\n' +
|
||||||
'</frameset>');
|
'</frameset>');
|
||||||
})();
|
})();
|
||||||
--></script>
|
--></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -75,7 +75,7 @@ static int externalFileHttpHandler(HttpConnection *http, void *arg,
|
||||||
while (*pathInfo == '/') {
|
while (*pathInfo == '/') {
|
||||||
pathInfo++;
|
pathInfo++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute file name of external file
|
// Compute file name of external file
|
||||||
char *fn;
|
char *fn;
|
||||||
int s_size = strlen((char *)arg) +
|
int s_size = strlen((char *)arg) +
|
||||||
|
@ -91,7 +91,7 @@ static int externalFileHttpHandler(HttpConnection *http, void *arg,
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
strncat(fn, ptr, s_size);
|
strncat(fn, ptr, s_size);
|
||||||
|
|
||||||
// Any files/directories starting with a dot are inaccessible to us
|
// Any files/directories starting with a dot are inaccessible to us
|
||||||
do {
|
do {
|
||||||
if (*ptr == '.') {
|
if (*ptr == '.') {
|
||||||
|
@ -103,7 +103,7 @@ static int externalFileHttpHandler(HttpConnection *http, void *arg,
|
||||||
ptr = strchr(ptr + 1, '/');
|
ptr = strchr(ptr + 1, '/');
|
||||||
} while (ptr);
|
} while (ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open file for reading
|
// Open file for reading
|
||||||
#ifndef O_LARGEFILE
|
#ifndef O_LARGEFILE
|
||||||
#define O_LARGEFILE 0
|
#define O_LARGEFILE 0
|
||||||
|
@ -147,7 +147,7 @@ static int externalFileHttpHandler(HttpConnection *http, void *arg,
|
||||||
httpSendReply(http, 404, "File not found", NO_MSG);
|
httpSendReply(http, 404, "File not found", NO_MSG);
|
||||||
return HTTP_DONE;
|
return HTTP_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We only serve regular files, and restrict the file size to 100MB.
|
// We only serve regular files, and restrict the file size to 100MB.
|
||||||
// As a special-case, we also allow access to /dev/null.
|
// As a special-case, we also allow access to /dev/null.
|
||||||
struct stat sb = { 0 };
|
struct stat sb = { 0 };
|
||||||
|
@ -161,7 +161,7 @@ static int externalFileHttpHandler(HttpConnection *http, void *arg,
|
||||||
return HTTP_DONE;
|
return HTTP_DONE;
|
||||||
}
|
}
|
||||||
free(fn);
|
free(fn);
|
||||||
|
|
||||||
// Set up response header
|
// Set up response header
|
||||||
char *response = stringPrintf(NULL,
|
char *response = stringPrintf(NULL,
|
||||||
"HTTP/1.1 200 OK\r\n"
|
"HTTP/1.1 200 OK\r\n"
|
||||||
|
@ -180,7 +180,7 @@ static int externalFileHttpHandler(HttpConnection *http, void *arg,
|
||||||
}
|
}
|
||||||
check(response = realloc(response, respLen + dataLen + 1));
|
check(response = realloc(response, respLen + dataLen + 1));
|
||||||
bytes = NOINTR(read(fd, response + respLen, dataLen));
|
bytes = NOINTR(read(fd, response + respLen, dataLen));
|
||||||
|
|
||||||
if (bytes < 0) {
|
if (bytes < 0) {
|
||||||
free(response);
|
free(response);
|
||||||
NOINTR(close(fd));
|
NOINTR(close(fd));
|
||||||
|
@ -188,7 +188,7 @@ static int externalFileHttpHandler(HttpConnection *http, void *arg,
|
||||||
return HTTP_DONE;
|
return HTTP_DONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bytes < 0 || bytes == sb.st_size) {
|
if (bytes < 0 || bytes == sb.st_size) {
|
||||||
// Read entire file. Transmit it in one go.
|
// Read entire file. Transmit it in one go.
|
||||||
httpTransfer(http, response,
|
httpTransfer(http, response,
|
||||||
|
@ -199,7 +199,7 @@ static int externalFileHttpHandler(HttpConnection *http, void *arg,
|
||||||
// Transmit partial reply and store state for future calls into the
|
// Transmit partial reply and store state for future calls into the
|
||||||
// handler.
|
// handler.
|
||||||
httpTransferPartialReply(http, response, respLen + bytes);
|
httpTransferPartialReply(http, response, respLen + bytes);
|
||||||
|
|
||||||
check(state = malloc(sizeof(struct ExternalFileState)));
|
check(state = malloc(sizeof(struct ExternalFileState)));
|
||||||
state->fd = fd;
|
state->fd = fd;
|
||||||
state->totalSize = sb.st_size;
|
state->totalSize = sb.st_size;
|
||||||
|
|
|
@ -676,7 +676,7 @@ void destroyUtmp(struct Utmp *utmp) {
|
||||||
updwtmpx("/var/log/wtmp", &utmp->utmpx);
|
updwtmpx("/var/log/wtmp", &utmp->utmpx);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Switch back to the lower privileges
|
// Switch back to the lower privileges
|
||||||
check(!setresgid(r_gid, e_gid, s_gid));
|
check(!setresgid(r_gid, e_gid, s_gid));
|
||||||
check(!setresuid(r_uid, e_uid, s_uid));
|
check(!setresuid(r_uid, e_uid, s_uid));
|
||||||
|
@ -1576,7 +1576,7 @@ static void childProcess(struct Service *service, int width, int height,
|
||||||
// Change user and group ids
|
// Change user and group ids
|
||||||
check(!setresgid(service->gid, service->gid, service->gid));
|
check(!setresgid(service->gid, service->gid, service->gid));
|
||||||
check(!setresuid(service->uid, service->uid, service->uid));
|
check(!setresuid(service->uid, service->uid, service->uid));
|
||||||
|
|
||||||
// Change working directory
|
// Change working directory
|
||||||
if (service->useHomeDir) {
|
if (service->useHomeDir) {
|
||||||
check(!service->useLogin);
|
check(!service->useLogin);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#print {
|
#print {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,23 +6,23 @@
|
||||||
<!--
|
<!--
|
||||||
ShellInABox - Make command line applications available as AJAX web applications
|
ShellInABox - Make command line applications available as AJAX web applications
|
||||||
Copyright (C) 2008-2010 Markus Gutschke markus@shellinabox.com
|
Copyright (C) 2008-2010 Markus Gutschke markus@shellinabox.com
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License version 2 as
|
it under the terms of the GNU General Public License version 2 as
|
||||||
published by the Free Software Foundation.
|
published by the Free Software Foundation.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
You should have received a copy of the GNU General Public License along
|
||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
In addition to these license terms, the author grants the following
|
In addition to these license terms, the author grants the following
|
||||||
additional rights:
|
additional rights:
|
||||||
|
|
||||||
If you modify this program, or any covered work, by linking or
|
If you modify this program, or any covered work, by linking or
|
||||||
combining it with the OpenSSL project's OpenSSL library (or a
|
combining it with the OpenSSL project's OpenSSL library (or a
|
||||||
modified version of that library), containing parts covered by the
|
modified version of that library), containing parts covered by the
|
||||||
|
@ -31,20 +31,20 @@
|
||||||
Corresponding Source for a non-source form of such a combination
|
Corresponding Source for a non-source form of such a combination
|
||||||
shall include the source code for the parts of OpenSSL used as well
|
shall include the source code for the parts of OpenSSL used as well
|
||||||
as that of the covered work.
|
as that of the covered work.
|
||||||
|
|
||||||
You may at your option choose to remove this additional permission from
|
You may at your option choose to remove this additional permission from
|
||||||
the work, or from any part of it.
|
the work, or from any part of it.
|
||||||
|
|
||||||
It is possible to build this program in a way that it loads OpenSSL
|
It is possible to build this program in a way that it loads OpenSSL
|
||||||
libraries at run-time. If doing so, the following notices are required
|
libraries at run-time. If doing so, the following notices are required
|
||||||
by the OpenSSL and SSLeay licenses:
|
by the OpenSSL and SSLeay licenses:
|
||||||
|
|
||||||
This product includes software developed by the OpenSSL Project
|
This product includes software developed by the OpenSSL Project
|
||||||
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
|
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
|
||||||
|
|
||||||
This product includes cryptographic software written by Eric Young
|
This product includes cryptographic software written by Eric Young
|
||||||
(eay@cryptsoft.com)
|
(eay@cryptsoft.com)
|
||||||
|
|
||||||
The most up-to-date version of this program is always available from
|
The most up-to-date version of this program is always available from
|
||||||
http://shellinabox.com
|
http://shellinabox.com
|
||||||
-->
|
-->
|
||||||
|
|
|
@ -357,7 +357,7 @@ ShellInABox.prototype.extendContextMenu = function(entries, actions) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ShellInABox.prototype.about = function() {
|
ShellInABox.prototype.about = function() {
|
||||||
|
@ -373,4 +373,3 @@ ShellInABox.prototype.about = function() {
|
||||||
"Eric Young\n(eay@cryptsoft.com)" :
|
"Eric Young\n(eay@cryptsoft.com)" :
|
||||||
""));
|
""));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ static int completePendingRequest(struct Session *session,
|
||||||
data = jsonEscape(buf, len);
|
data = jsonEscape(buf, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char *json = stringPrintf(NULL, "{"
|
char *json = stringPrintf(NULL, "{"
|
||||||
"\"session\":\"%s\","
|
"\"session\":\"%s\","
|
||||||
"\"data\":\"%s\""
|
"\"data\":\"%s\""
|
||||||
|
|
|
@ -199,7 +199,7 @@ In order to be useful as a CGI script, the
|
||||||
.B shellinaboxd
|
.B shellinaboxd
|
||||||
binary probably will have to be made
|
binary probably will have to be made
|
||||||
.BR setuid-root .
|
.BR setuid-root .
|
||||||
This is currently a discouraged configuration. Use with care.
|
This is currently a discouraged configuration. Use with care.
|
||||||
.TP
|
.TP
|
||||||
\fB-d\fP\ |\ \fB--debug\fP
|
\fB-d\fP\ |\ \fB--debug\fP
|
||||||
Enables debugging mode, resulting in lots of log messages on
|
Enables debugging mode, resulting in lots of log messages on
|
||||||
|
@ -292,7 +292,7 @@ mode, anything that looks like a hostname, URL or e-mail address is
|
||||||
recognized, even if not preceded by a protocol.
|
recognized, even if not preceded by a protocol.
|
||||||
.TP
|
.TP
|
||||||
\fB--localhost-only\fP
|
\fB--localhost-only\fP
|
||||||
Normally,
|
Normally,
|
||||||
.B shellinaboxd
|
.B shellinaboxd
|
||||||
listens on all available network interfaces. When operating behind a
|
listens on all available network interfaces. When operating behind a
|
||||||
reverse-proxy that is not always desirable. This command line option
|
reverse-proxy that is not always desirable. This command line option
|
||||||
|
@ -756,7 +756,7 @@ the daemon with \fBsudo service shellinabox restart\fP.
|
||||||
.TP
|
.TP
|
||||||
.I /etc/shellinabox
|
.I /etc/shellinabox
|
||||||
This directory contains style sheets that will be used for the
|
This directory contains style sheets that will be used for the
|
||||||
.B --user-css
|
.B --user-css
|
||||||
command line option, when running
|
command line option, when running
|
||||||
.B shellinaboxd
|
.B shellinaboxd
|
||||||
as a system-wide service.
|
as a system-wide service.
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#vt100 a {
|
#vt100 a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 a:hover {
|
#vt100 a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #reconnect input {
|
#vt100 #reconnect input {
|
||||||
padding: 1ex;
|
padding: 1ex;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: x-large;
|
font-size: x-large;
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 pre {
|
#vt100 pre {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,11 +44,11 @@
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #console, #vt100 #alt_console, #vt100 #cursor, #vt100 #lineheight, #vt100 .hidden pre {
|
#vt100 #console, #vt100 #alt_console, #vt100 #cursor, #vt100 #lineheight, #vt100 .hidden pre {
|
||||||
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, "Andale Mono", monospace;
|
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, "Andale Mono", monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #lineheight {
|
#vt100 #lineheight {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
margin: -1px;
|
margin: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #padding {
|
#vt100 #padding {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
height: 0px;
|
height: 0px;
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
height: 0px;
|
height: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #menu {
|
#vt100 #menu {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
|
@ -103,14 +103,14 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #menu .popup ul {
|
#vt100 #menu .popup ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
min-width: 10em;
|
min-width: 10em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #menu .popup li {
|
#vt100 #menu .popup li {
|
||||||
padding: 3px 0.5ex 3px 0.5ex;
|
padding: 3px 0.5ex 3px 0.5ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,11 +123,11 @@
|
||||||
color: #AAAAAA;
|
color: #AAAAAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #menu .popup hr {
|
#vt100 #menu .popup hr {
|
||||||
margin: 0.5ex 0px 0.5ex 0px;
|
margin: 0.5ex 0px 0.5ex 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #menu img {
|
#vt100 #menu img {
|
||||||
margin-right: 0.5ex;
|
margin-right: 0.5ex;
|
||||||
width: 1ex;
|
width: 1ex;
|
||||||
height: 1ex;
|
height: 1ex;
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
#vt100 #scrollable.inverted { color: #ffffff;
|
#vt100 #scrollable.inverted { color: #ffffff;
|
||||||
background-color: #000000; }
|
background-color: #000000; }
|
||||||
|
|
||||||
#vt100 #kbd_button {
|
#vt100 #kbd_button {
|
||||||
float: left;
|
float: left;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #keyboard .shifted {
|
#vt100 #keyboard .shifted {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,15 +257,15 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #reconnect, #vt100 #cursor, #vt100 #menu, #vt100 #kbd_button, #vt100 #keyboard {
|
#vt100 #reconnect, #vt100 #cursor, #vt100 #menu, #vt100 #kbd_button, #vt100 #keyboard {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #scrollable {
|
#vt100 #scrollable {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vt100 #console, #vt100 #alt_console {
|
#vt100 #console, #vt100 #alt_console {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 1000000ex;
|
width: 1000000ex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -363,7 +363,7 @@ VT100.prototype.initializeUserCSSStyles = function() {
|
||||||
var label = userCSSList[i][0];
|
var label = userCSSList[i][0];
|
||||||
var newGroup = userCSSList[i][1];
|
var newGroup = userCSSList[i][1];
|
||||||
var enabled = userCSSList[i][2];
|
var enabled = userCSSList[i][2];
|
||||||
|
|
||||||
// Add user style sheet to document
|
// Add user style sheet to document
|
||||||
var style = document.createElement('link');
|
var style = document.createElement('link');
|
||||||
var id = document.createAttribute('id');
|
var id = document.createAttribute('id');
|
||||||
|
@ -381,7 +381,7 @@ VT100.prototype.initializeUserCSSStyles = function() {
|
||||||
document.getElementsByTagName('head')[0].appendChild(style);
|
document.getElementsByTagName('head')[0].appendChild(style);
|
||||||
style.disabled = !enabled;
|
style.disabled = !enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add entry to menu
|
// Add entry to menu
|
||||||
if (newGroup || i == userCSSList.length) {
|
if (newGroup || i == userCSSList.length) {
|
||||||
if (beginOfGroup != 0 && (i - beginOfGroup > 1 || !wasSingleSel)) {
|
if (beginOfGroup != 0 && (i - beginOfGroup > 1 || !wasSingleSel)) {
|
||||||
|
@ -588,7 +588,7 @@ VT100.prototype.addKeyBinding = function(elem, ch, key, CH, KEY) {
|
||||||
this.addListener(elem, 'mousedown',
|
this.addListener(elem, 'mousedown',
|
||||||
function(vt100, elem, key) { return function(e) {
|
function(vt100, elem, key) { return function(e) {
|
||||||
if ((e.which || e.button) == 1) {
|
if ((e.which || e.button) == 1) {
|
||||||
if (vt100.lastSelectedKey) {
|
if (vt100.lastSelectedKey) {
|
||||||
vt100.lastSelectedKey.className= '';
|
vt100.lastSelectedKey.className= '';
|
||||||
}
|
}
|
||||||
// Highlight the key while the mouse button is held down.
|
// Highlight the key while the mouse button is held down.
|
||||||
|
@ -989,7 +989,7 @@ VT100.prototype.initializeElements = function(container) {
|
||||||
vt100.indicateSize = true;
|
vt100.indicateSize = true;
|
||||||
};
|
};
|
||||||
}(this), 100);
|
}(this), 100);
|
||||||
this.addListener(window, 'resize',
|
this.addListener(window, 'resize',
|
||||||
function(vt100) {
|
function(vt100) {
|
||||||
return function() {
|
return function() {
|
||||||
vt100.hideContextMenu();
|
vt100.hideContextMenu();
|
||||||
|
@ -997,7 +997,7 @@ VT100.prototype.initializeElements = function(container) {
|
||||||
vt100.showCurrentSize();
|
vt100.showCurrentSize();
|
||||||
}
|
}
|
||||||
}(this));
|
}(this));
|
||||||
|
|
||||||
// Hide extra scrollbars attached to window
|
// Hide extra scrollbars attached to window
|
||||||
document.body.style.margin = '0px';
|
document.body.style.margin = '0px';
|
||||||
try { document.body.style.overflow ='hidden'; } catch (e) { }
|
try { document.body.style.overflow ='hidden'; } catch (e) { }
|
||||||
|
@ -1684,7 +1684,7 @@ VT100.prototype.putString = function(x, y, text, color, style) {
|
||||||
this.insertBlankLine(yIdx);
|
this.insertBlankLine(yIdx);
|
||||||
}
|
}
|
||||||
line = console.childNodes[yIdx];
|
line = console.childNodes[yIdx];
|
||||||
|
|
||||||
// If necessary, promote blank '\n' line to a <div> tag
|
// If necessary, promote blank '\n' line to a <div> tag
|
||||||
if (line.tagName != 'DIV') {
|
if (line.tagName != 'DIV') {
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
|
@ -1728,7 +1728,7 @@ VT100.prototype.putString = function(x, y, text, color, style) {
|
||||||
s += ' ';
|
s += ' ';
|
||||||
} while (xPos + s.length < x);
|
} while (xPos + s.length < x);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If styles do not match, create a new <span>
|
// If styles do not match, create a new <span>
|
||||||
var del = text.length - s.length + x - xPos;
|
var del = text.length - s.length + x - xPos;
|
||||||
if (oldColor != color ||
|
if (oldColor != color ||
|
||||||
|
@ -1787,7 +1787,7 @@ VT100.prototype.putString = function(x, y, text, color, style) {
|
||||||
}
|
}
|
||||||
this.setTextContent(span, s);
|
this.setTextContent(span, s);
|
||||||
|
|
||||||
|
|
||||||
// Delete all subsequent <span>'s that have just been overwritten
|
// Delete all subsequent <span>'s that have just been overwritten
|
||||||
sibling = span.nextSibling;
|
sibling = span.nextSibling;
|
||||||
while (del > 0 && sibling) {
|
while (del > 0 && sibling) {
|
||||||
|
@ -1802,7 +1802,7 @@ VT100.prototype.putString = function(x, y, text, color, style) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Merge <span> with next sibling, if styles are identical
|
// Merge <span> with next sibling, if styles are identical
|
||||||
if (sibling && span.className == sibling.className &&
|
if (sibling && span.className == sibling.className &&
|
||||||
span.style.cssText == sibling.style.cssText) {
|
span.style.cssText == sibling.style.cssText) {
|
||||||
|
@ -1883,7 +1883,7 @@ VT100.prototype.putString = function(x, y, text, color, style) {
|
||||||
this.getTextContent(span));
|
this.getTextContent(span));
|
||||||
line.removeChild(sibling);
|
line.removeChild(sibling);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prune white space from the end of the current line
|
// Prune white space from the end of the current line
|
||||||
span = line.lastChild;
|
span = line.lastChild;
|
||||||
while (span &&
|
while (span &&
|
||||||
|
@ -1964,7 +1964,7 @@ VT100.prototype.enableAlternateScreen = function(state) {
|
||||||
this.resizer();
|
this.resizer();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We save the full state of the normal screen, when we switch away from it.
|
// We save the full state of the normal screen, when we switch away from it.
|
||||||
// But for the alternate screen, no saving is necessary. We always reset
|
// But for the alternate screen, no saving is necessary. We always reset
|
||||||
// it when we switch to it.
|
// it when we switch to it.
|
||||||
|
@ -2210,7 +2210,7 @@ VT100.prototype.scrollRegion = function(x, y, w, h, incX, incY,
|
||||||
while (console.childNodes.length < this.terminalHeight) {
|
while (console.childNodes.length < this.terminalHeight) {
|
||||||
this.insertBlankLine(this.terminalHeight);
|
this.insertBlankLine(this.terminalHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add new lines at bottom in order to force scrolling
|
// Add new lines at bottom in order to force scrolling
|
||||||
for (var i = 0; i < y; i++) {
|
for (var i = 0; i < y; i++) {
|
||||||
this.insertBlankLine(console.childNodes.length, color, style);
|
this.insertBlankLine(console.childNodes.length, color, style);
|
||||||
|
@ -2577,7 +2577,7 @@ VT100.prototype.showContextMenu = function(x, y) {
|
||||||
this.menu.style.height = this.container.offsetHeight + 'px';
|
this.menu.style.height = this.container.offsetHeight + 'px';
|
||||||
popup.style.left = '0px';
|
popup.style.left = '0px';
|
||||||
popup.style.top = '0px';
|
popup.style.top = '0px';
|
||||||
|
|
||||||
var margin = 2;
|
var margin = 2;
|
||||||
if (x + popup.clientWidth >= this.container.offsetWidth - margin) {
|
if (x + popup.clientWidth >= this.container.offsetWidth - margin) {
|
||||||
x = this.container.offsetWidth-popup.clientWidth - margin - 1;
|
x = this.container.offsetWidth-popup.clientWidth - margin - 1;
|
||||||
|
@ -2665,7 +2665,7 @@ VT100.prototype.handleKey = function(event) {
|
||||||
ch = this.applyModifiers(ch, event);
|
ch = this.applyModifiers(ch, event);
|
||||||
|
|
||||||
// By this point, "ch" is either defined and contains the character code, or
|
// By this point, "ch" is either defined and contains the character code, or
|
||||||
// it is undefined and "key" defines the code of a function key
|
// it is undefined and "key" defines the code of a function key
|
||||||
if (ch != undefined) {
|
if (ch != undefined) {
|
||||||
this.scrollable.scrollTop = this.numScrollbackLines *
|
this.scrollable.scrollTop = this.numScrollbackLines *
|
||||||
this.cursorHeight + 1;
|
this.cursorHeight + 1;
|
||||||
|
@ -2889,7 +2889,7 @@ VT100.prototype.fixEvent = function(event) {
|
||||||
case 61: /* = -> + */ u = 61; s = 43; break;
|
case 61: /* = -> + */ u = 61; s = 43; break;
|
||||||
case 91: /* [ -> { */ u = 91; s = 123; break;
|
case 91: /* [ -> { */ u = 91; s = 123; break;
|
||||||
case 92: /* \ -> | */ u = 92; s = 124; break;
|
case 92: /* \ -> | */ u = 92; s = 124; break;
|
||||||
case 93: /* ] -> } */ u = 93; s = 125; break;
|
case 93: /* ] -> } */ u = 93; s = 125; break;
|
||||||
case 96: /* ` -> ~ */ u = 96; s = 126; break;
|
case 96: /* ` -> ~ */ u = 96; s = 126; break;
|
||||||
|
|
||||||
case 109: /* - -> _ */ u = 45; s = 95; break;
|
case 109: /* - -> _ */ u = 45; s = 95; break;
|
||||||
|
@ -2904,7 +2904,7 @@ VT100.prototype.fixEvent = function(event) {
|
||||||
case 192: /* ` -> ~ */ u = 96; s = 126; break;
|
case 192: /* ` -> ~ */ u = 96; s = 126; break;
|
||||||
case 219: /* [ -> { */ u = 91; s = 123; break;
|
case 219: /* [ -> { */ u = 91; s = 123; break;
|
||||||
case 220: /* \ -> | */ u = 92; s = 124; break;
|
case 220: /* \ -> | */ u = 92; s = 124; break;
|
||||||
case 221: /* ] -> } */ u = 93; s = 125; break;
|
case 221: /* ] -> } */ u = 93; s = 125; break;
|
||||||
case 222: /* ' -> " */ u = 39; s = 34; break;
|
case 222: /* ' -> " */ u = 39; s = 34; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
@ -3623,7 +3623,7 @@ VT100.prototype.sendControlToPrinter = function(ch) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Fall through
|
// Fall through
|
||||||
case ESgetpars:
|
case ESgetpars:
|
||||||
if (ch == 0x3B /*;*/) {
|
if (ch == 0x3B /*;*/) {
|
||||||
this.npar++;
|
this.npar++;
|
||||||
break;
|
break;
|
||||||
|
@ -3985,7 +3985,7 @@ VT100.prototype.doControl = function(ch) {
|
||||||
}
|
}
|
||||||
// Fall through
|
// Fall through
|
||||||
case ESdeviceattr:
|
case ESdeviceattr:
|
||||||
case ESgetpars:
|
case ESgetpars:
|
||||||
/*;*/ if (ch == 0x3B) {
|
/*;*/ if (ch == 0x3B) {
|
||||||
this.npar++;
|
this.npar++;
|
||||||
break;
|
break;
|
||||||
|
@ -4260,7 +4260,7 @@ VT100.prototype.vt100 = function(s) {
|
||||||
this.utfEnabled && ch >= 128 ||
|
this.utfEnabled && ch >= 128 ||
|
||||||
!(this.dispCtrl ? this.ctrlAlways : this.ctrlAction)[ch & 0x1F]) &&
|
!(this.dispCtrl ? this.ctrlAlways : this.ctrlAction)[ch & 0x1F]) &&
|
||||||
(ch != 0x7F || this.dispCtrl);
|
(ch != 0x7F || this.dispCtrl);
|
||||||
|
|
||||||
if (isNormalCharacter && this.isEsc == ESnormal) {
|
if (isNormalCharacter && this.isEsc == ESnormal) {
|
||||||
if (ch < 256) {
|
if (ch < 256) {
|
||||||
ch = this.translate[this.toggleMeta ? (ch | 0x80) : ch];
|
ch = this.translate[this.toggleMeta ? (ch | 0x80) : ch];
|
||||||
|
@ -4465,4 +4465,3 @@ VT100.prototype.ctrlAlways = [
|
||||||
false, false, false, false, false, false, false, false,
|
false, false, false, false, false, false, false, false,
|
||||||
false, false, false, true, false, false, false, false
|
false, false, false, true, false, false, false, false
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue