From 01e6f3c9de8a2c43c95ce80a5b1f37fc8fb7f765 Mon Sep 17 00:00:00 2001 From: zodiac Date: Wed, 29 Jul 2009 21:08:06 +0000 Subject: [PATCH] Updated manual page to show new SSH service. git-svn-id: https://shellinabox.googlecode.com/svn/trunk@155 0da03de8-d603-11dd-86c2-0f8696b7b6f9 --- Makefile.am | 15 +++++---- Makefile.in | 15 +++++---- config.h | 2 +- configure | 2 +- configure.ac | 2 +- demo/vt100.js | 2 +- shellinabox/shell_in_a_box.js | 2 +- shellinabox/shellinaboxd.man.in | 54 ++++++++++++++++++++++++++------- shellinabox/vt100.js | 2 +- 9 files changed, 63 insertions(+), 33 deletions(-) diff --git a/Makefile.am b/Makefile.am index e185878..45fa351 100644 --- a/Makefile.am +++ b/Makefile.am @@ -143,18 +143,17 @@ shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \ egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\ wc -l` -eq 3 ]; then \ - sed -e '/^#ifdef *HAVE_OPENSSL$$/d' \ - -e '/^#endif$$/d' "$$src" >"$@"; \ + sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \ else \ - sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src" >"$@"; \ - fi; \ + sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \ + fi | \ if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \ grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \ - sed -e '/^#ifdef *HAVE_PAM$$/d' \ - -e '/^#endif$$/d' "$$src" >"$@"; \ + sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \ else \ - sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d' "$$src" >"$@"; \ - fi + sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \ + fi | \ + sed -e '/^#/d' >"$@" @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \ man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}" diff --git a/Makefile.in b/Makefile.in index f19a145..2ae69fc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1057,18 +1057,17 @@ shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h if [ `sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \ egrep 'HAVE_OPENSSL_BIO_H|HAVE_OPENSSL_ERR_H|HAVE_OPENSSL_SSL_H'|\ wc -l` -eq 3 ]; then \ - sed -e '/^#ifdef *HAVE_OPENSSL$$/d' \ - -e '/^#endif$$/d' "$$src" >"$@"; \ + sed -e '/^#ifndef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \ else \ - sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src" >"$@"; \ - fi; \ + sed -e '/^#ifdef *HAVE_OPENSSL$$/,/^#endif$$/d' "$$src"; \ + fi | \ if sed -e 's/^#define \([^ ]*\).*/\1/' -e t -e d config.h | \ grep 'HAVE_SECURITY_PAM_APPL_H' >/dev/null 2>&1; then \ - sed -e '/^#ifdef *HAVE_PAM$$/d' \ - -e '/^#endif$$/d' "$$src" >"$@"; \ + sed -e '/^#ifndef *HAVE_PAM$$/,/^#endif$$/d'; \ else \ - sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d' "$$src" >"$@"; \ - fi + sed -e '/^#ifdef *HAVE_PAM$$/,/^#endif$$/d'; \ + fi | \ + sed -e '/^#/d' >"$@" @out=`echo "$@" 2>/dev/null|sed -e 's/\.[^.]*$$/.ps/'`; \ man -Tps "./$@" >"$${out}" 2>/dev/null || rm -f "$${out}" diff --git a/config.h b/config.h index a8f03a6..3d42eef 100644 --- a/config.h +++ b/config.h @@ -135,7 +135,7 @@ #define STDC_HEADERS 1 /* Most recent revision number in the version control system */ -#define VCS_REVISION "153" +#define VCS_REVISION "155" /* Version number of package */ #define VERSION "2.9" diff --git a/configure b/configure index 3b0e1af..9e607aa 100755 --- a/configure +++ b/configure @@ -2037,7 +2037,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -VCS_REVISION=153 +VCS_REVISION=155 cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index 6bba2ac..6a35dbb 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ(2.57) dnl This is the one location where the authoritative version number is stored AC_INIT(shellinabox, 2.9, markus@shellinabox.com) -VCS_REVISION=153 +VCS_REVISION=155 AC_SUBST(VCS_REVISION) AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}", [Most recent revision number in the version control system]) diff --git a/demo/vt100.js b/demo/vt100.js index 5c825b0..3c755a8 100644 --- a/demo/vt100.js +++ b/demo/vt100.js @@ -1693,7 +1693,7 @@ VT100.prototype.toggleBell = function() { }; VT100.prototype.about = function() { - alert("VT100 Terminal Emulator " + "2.9 (revision 153)" + + alert("VT100 Terminal Emulator " + "2.9 (revision 155)" + "\nCopyright 2008-2009 by Markus Gutschke\n" + "For more information check http://shellinabox.com"); }; diff --git a/shellinabox/shell_in_a_box.js b/shellinabox/shell_in_a_box.js index 372f635..439443f 100644 --- a/shellinabox/shell_in_a_box.js +++ b/shellinabox/shell_in_a_box.js @@ -355,7 +355,7 @@ ShellInABox.prototype.extendContextMenu = function(entries, actions) { }; ShellInABox.prototype.about = function() { - alert("Shell In A Box version " + "2.9 (revision 153)" + + alert("Shell In A Box version " + "2.9 (revision 155)" + "\nCopyright 2008-2009 by Markus Gutschke\n" + "For more information check http://shellinabox.com" + (typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ? diff --git a/shellinabox/shellinaboxd.man.in b/shellinabox/shellinaboxd.man.in index 4f01c58..f45a4f4 100644 --- a/shellinabox/shellinaboxd.man.in +++ b/shellinabox/shellinaboxd.man.in @@ -51,7 +51,9 @@ shellinaboxd \- publish command line shell through AJAX interface .TP .B shellinaboxd [\ \fB-b\fP\ | \fB--background\fP[\fB=\fP\fIpidfile\fP]\ ] +#ifdef HAVE_OPENSSL [\ \fB-c\fP\ | \fB--cert=\fP\fIcertdir\fP\ ] +#endif [\ \fB--cert-fd=\fP\fIfd\fP\ ] [\ \fB--cgi\fP[\fB=\fP\fIportrange\fP]\ ] [\ \fB-d\fP\ | \fB--debug\fP\ ] @@ -64,7 +66,9 @@ shellinaboxd \- publish command line shell through AJAX interface [\ \fB-n\fP\ | \fB--numeric\fP\ ] [\ \fB-p\fP\ | \fB--port=\fP\fIport\fP\ ] [\ \fB-s\fP\ | \fB--service=\fP\fIservice\fP\ ] +#ifdef HAVE_OPENSSL [\ \fB-t\fP\ | \fB--disable-ssl\fP\ ] +#endif [\ \fB--disable-ssl-menu\fP\ ] [\ \fB-q\fP\ | \fB--quiet\fP\ ] [\ \fB-u\fP\ | \fB--user=\fP\fIuid\fP\ ] @@ -100,6 +104,7 @@ Launch .B shellinaboxd as a background daemon process. Optionally, write the process id to .IR pidfile . +#ifdef HAVE_OPENSSL .TP \fB-c\fP\ |\ \fB--cert=\fP\fIcertdir\fP If built with SSL/TLS support enabled, the daemon will look in @@ -151,6 +156,7 @@ where the certificate and key can be retrieved. While this option disables .B SNI support, it does offer an alternative solution for securely providing the private key data to the daemon. +#endif .TP \fB--cgi\fP[\fB=\fP\fIportrange\fP] Instead of running @@ -302,13 +308,16 @@ virtual hosting. \fB-s\fP\ |\ \fB--service=\fP\fIservice\fP One or more services can be registered on different URL paths: .in +4 -\fISERVICE\fP := ':' \fIAPPLICATON\fP +\fISERVICE\fP := ':' \fIAPPLICATION\fP .in -There is one pre-defined \fIapplication\fP, 'LOGIN'. It causes the + +There is a pre-defined \fIapplication\fP, 'LOGIN', which causes the daemon to invoke .B /bin/login -to request the user's name and password, and to start his -login shell. This is the default option, if no +requesting the user's name and password, and starting his +login shell. This is the default option for the +.B root +user, if no .B --service was defined. Starting .B /bin/login @@ -316,10 +325,22 @@ requires .B root privileges. +There is another pre-defined \fIapplication\fP, 'SSH'. Instead of invoking +.BR /bin/login , +it calls +.BR ssh . +This is the default option for unprivileged users, if no +.B --service +was defined. This operation is available to both privileged and regular +users. If the optional \fIhost\fP parameter is omitted, +.B shellinaboxd +connects to +.BR localhost . + Alternatively, an \fIapplication\fP can be specified by providing a \fIuser\fP description, a working directory, and a command line: .in +4 -\fIAPPLICATION\fP := 'LOGIN' | \fIUSER\fP ':' \fICWD\fP ':' +\fIAPPLICATION\fP := 'LOGIN' | 'SSH' [ ':' ] | \fIUSER\fP ':' \fICWD\fP ':' #ifdef HAVE_PAM .in @@ -328,9 +349,11 @@ be requested interactively, instead of being provided as part of the \fIservice\fP description: .in +4 #endif -\fIUSER\fP := #ifdef HAVE_PAM -'AUTH' | +\fIUSER\fP := 'AUTH' | +#endif +#ifndef HAVE_PAM +\fIUSER\fP := #endif ':' .in @@ -391,11 +414,19 @@ If no explicit .B --service has been requested, .B shellinaboxd -defaults to attaching -.B /bin/login -to the root directory of the web server. This is equivalent to saying -.BR --service=/:LOGIN . +defaults to attaching the default service to the root directory of the web +server. For +.BR root , +this is +.BR /bin/login , +and for unprivileged users, this is \fBssh localhost\fP. This is equivalent +to saying +.BR --service=/:LOGIN , +or +.BR --service=/:SSH , +respectively. .RE +#ifdef HAVE_OPENSSL .TP \fB-t\fP\ |\ \fB--disable-ssl\fP By default, @@ -406,6 +437,7 @@ undesired, this behavior can be disabled. This option is also useful during testing or for deployment in trusted intranets, if SSL certificates are unavailable. +#endif .TP \fB--disable-ssl-menu\fP If the user should not be able to switch between HTTP and HTTPS modes, this diff --git a/shellinabox/vt100.js b/shellinabox/vt100.js index 5c825b0..3c755a8 100644 --- a/shellinabox/vt100.js +++ b/shellinabox/vt100.js @@ -1693,7 +1693,7 @@ VT100.prototype.toggleBell = function() { }; VT100.prototype.about = function() { - alert("VT100 Terminal Emulator " + "2.9 (revision 153)" + + alert("VT100 Terminal Emulator " + "2.9 (revision 155)" + "\nCopyright 2008-2009 by Markus Gutschke\n" + "For more information check http://shellinabox.com"); };