* Added more checks for return values and null pointers.
* Removed some dead code and unused variables.
* Fixed handling of calls to exec() family functions. If this functions
fail we need to cleanup resources.
* Recogniton of HTTP header field 'X-Real-IP' was added. Value
is used in LOGIN service with peer name as remote host identifier.
This was we are able to see real IP in login related log files
such as /var/log/auth.log, etc...
* Real IP, peer name and URL are also passed to launched service
as environment variables (SHELLINABOX_PEERNAME, SHELLINABOX_REALIP
and SHELLINABOX_URL). This can be used by custom user service shell
scripts or programs.
* Real IP can also be passed to custom user service as command line
parameter ${realip}.
When new process is launched default terminal speed is correctly set to 38400.
This improves usage of Emacs editor and perhaps some other applications.
This is also partial fix for issue #58
When browser tab/window is closed during active session, child process
stays alive forever (even if shellinaboxd is terminated).
This fix works only if shellinaboxd is started without root privileges.
Droping them at runtime doesn't help either. Issue is related to PAM
session management process.
If we start shellinaboxd with root priviliges this fix will not affect
anything.
* When session timeouts cleanup procedure is triggered. Procedure is executed
in launcher process, because this is parent of child (service) process.
There we execute checks, if we have correct child pid (stored in session) and
than we can terminate process.
* Added debug information about cleaning up child process
https://code.google.com/p/shellinabox/issues/detail?id=103https://code.google.com/p/shellinabox/issues/detail?id=203
* Added debug information when child process exits
- pid of child process (service)
- exit code (this should help for debuging issues related to "Session closed")
* Fixed status checking from waitpid() when child process exits
- before we were checking wrong variable (checks were allways true)
- now we use correct status variable
o Hurd doesn't support PATH_MAX, so we elide it from the forkPty
function. Code will work on non-hurd systems as well.
o In case ptsname_r isn't available, it is provided even when openpty
*is* available.
o From a poster:
Just looking at this error a little more, the fix is easy for lion.
Change line 1664 to:
char cmsg_buf[CMSG_SPACE(sizeof(int))];
And you should be able to get it to compile.
o Made a compatible change even though the original code was valid.
Probably a compiler version issue.
problems. Unfortunately, without access to a MacOS X build environment, some
of these have to be mere educated guesses...
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@232 0da03de8-d603-11dd-86c2-0f8696b7b6f9
compatibility with systems that implement updwtmp() but not updwtmpx().
Also, changed Makefile rules in an attempt to improve compatibility with BSD
make utilities.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@208 0da03de8-d603-11dd-86c2-0f8696b7b6f9
Fixed some compiler warnings when compiling with -Wextra
Thanks to Jan Jaeger's excellent bug report, made some changes
that should make it easier to build ShellInABox for OpenWRT.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@202 0da03de8-d603-11dd-86c2-0f8696b7b6f9
Allow the code to be built without support for the LOGIN service, as
calling /bin/login does not work well on Fedora.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@198 0da03de8-d603-11dd-86c2-0f8696b7b6f9
monochrome mode from the right click context menu. This required a couple of
architectural changes to the JavaScript code.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@167 0da03de8-d603-11dd-86c2-0f8696b7b6f9
Show the real host name in the SSH password prompt, if available.
Add some commented-out debugging helpers for tracking down problems with non-US keyboards.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@164 0da03de8-d603-11dd-86c2-0f8696b7b6f9
work reliably on some platforms. So, avoid doing so on anything other
than Linux/i386. For all other platforms, assume that the code is not
linked against libpthread. For ShellInABox, this is always the correct
assumption. But if the code gets embedded into other projects, this
might have to be changed.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@141 0da03de8-d603-11dd-86c2-0f8696b7b6f9
management, if we don't have the privileges to do so, anyway)
- Make ssl.h compile again, even if OpenSSL is not found at compile time.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@115 0da03de8-d603-11dd-86c2-0f8696b7b6f9
- A couple of changes to avoid false error messages in valgrind.
- Fixed a bug that could potentially lead to a double-free()
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@114 0da03de8-d603-11dd-86c2-0f8696b7b6f9
OpenSSL and PAM libraries to be optionally linked as regular shared libraries
instead of being searched for and loaded at run-time.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@65 0da03de8-d603-11dd-86c2-0f8696b7b6f9
provide our own conversation function, if PAM misc is not available. We
rely on login_tty to set up the terminal for us. And we avoid a few other
API uses that turned out to be Linux specific extensions.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@63 0da03de8-d603-11dd-86c2-0f8696b7b6f9
In particular, work around a problem with gcc complaining about NULL format
strings. And added additional system header files that might be required on
some platforms.
This should fix some of the problems reported when compiling on BSD-style
systems. But we are still using SysV style session management code. This
probably needs to be rewritten before ShellInABox can be run on BSD-style
system.
In particular, we rely on grantpt(), we use the utmpx API, and we access
/dev/urandom.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@55 0da03de8-d603-11dd-86c2-0f8696b7b6f9