Commit Graph

52 Commits

Author SHA1 Message Date
Keith Winstein 597756b846 Document new -v (verbose) server switch. 2012-04-14 13:56:46 -04:00
Keith Winstein 0e9be1b471 Close terminal fd's to properly detach on old sshd (e.g. RHEL/CentOS 5.0).
May help some sufferers of #114 github issue.
2012-04-14 12:37:28 -04:00
Keith Winstein 1823f7e860 Provide more helpful error message on lack of -t argument. 2012-04-14 12:29:05 -04:00
Keith Winstein 7be90ae244 Close server-related file descriptors before executing child process
Closes #170 github issue.
2012-04-13 13:48:56 -04:00
Keegan McAllister 0eec0b60f0 Linux: Use our own signalfd wrapper, rather than libstddjb
selfpipe already does a fine job of interfacing to signalfd.  But Debian and
Ubuntu want us to depend on the skalibs-dev package rather than build libstddjb
ourselves.  That would be fine except that skalibs-dev has static libraries
only, and they aren't built with -fPIC.  This interferes with building
mosh-{client,server} as position-independent executables, which is a desirable
security measure.

So we have our own wrapper, which invokes either signalfd or selfpipe.  And we
build it ourselves with our own flags, because it's part of the Mosh project
proper.

(closes #108)
2012-04-13 12:33:21 -04:00
Daniel O'Connor 3d76ec8208 Skip 'new' otherwise BSD getopt will think there are no options.
IMO 'new' should be dropped entirely since it's not optional and 'new' is the only choice.

If it were to change in future then it should go after all the options.

(closes #111)
2012-04-13 12:07:49 -04:00
Keith Winstein 4d9483bc83 Fix build when libutil.h exists but is deprecated 2012-04-07 20:23:59 -04:00
Benjamin Kaduk 29539516e5 FreeBSD needs libutil.h for forkpty()
The header is not available everywhere, so only include it if it
is present.  (The extra include should be harmless on Linux by
inspection.)
2012-04-05 18:19:37 -04:00
Keegan McAllister ba6387f36c Allow CryptoExceptions to be fatal 2012-03-31 16:19:33 -04:00
Keegan McAllister ba9b16aafa Fully initialize the argument to TIOCSWINSZ
struct winsize contains fields other than ws_col and ws_row.  To avoid passing
uninitialized data to TIOCSWINSZ, initialize it first using TIOCGWINSZ.

Found by Valgrind.

(closes #85 github issue)
2012-03-31 15:41:34 -04:00
Keith Winstein 9a7f3ad33d Print warnings when IUTF8 missing 2012-03-31 15:20:30 -04:00
Quentin Smith 44ab7360bc Fix poll.h location 2012-03-28 14:32:32 +02:00
Keegan McAllister 7ed5174aa7 Move some locale handling into one place 2012-03-26 20:08:55 -04:00
Keith Winstein 26fc88634d Update documentation to version 1.1 2012-03-22 19:09:40 -04:00
Keith Winstein ab94397726 Fix copy-paste error in port argument check 2012-03-21 22:45:58 -04:00
Keegan McAllister 9f38c76699 Explicitly disable dumping core (closes #72)
This is a precaution to avoid saving sensitive data to disk, e.g. session keys.
We expect that corefiles are not world readable, but they're still sitting on
the physical disk and it's safer just to disable creating them.

GitHub issue #71 deals with a similar concern.
2012-03-21 18:41:51 -04:00
Keith Winstein ec0c8c8984 Allow immediate return on initial spins 2012-03-21 18:00:36 -04:00
Keith Winstein ad3877626d Use _exit() for hygiene (per Anders Kaseorg) 2012-03-21 17:32:46 -04:00
Keith Winstein 6842dbf066 Startup script quoting cleanups per Anders Kaseorg 2012-03-21 17:19:12 -04:00
Keith Winstein 9d7d47c57d Count colors locally. Server advertises xterm-256color only when necessary. 2012-03-18 05:47:26 -04:00
Keith Winstein cbeda2d2fe Don't die immediately on broken command 2012-03-18 03:53:01 -04:00
Keith Winstein 89d1c88bcf More robust option parsing and redo wrapper 2012-03-18 03:23:58 -04:00
Keith Winstein 0e5fd920b1 New option-parsing for mosh-server 2012-03-18 03:13:50 -04:00
Keith Winstein cf017cd99c Don't try to parse single -- as IP address 2012-03-18 02:38:45 -04:00
Keith Winstein 452ff9f992 Require at least one element of command 2012-03-18 02:31:40 -04:00
Keith Winstein e582b27b83 Allow arguments to command (after --) 2012-03-18 01:35:31 -04:00
Keith Winstein b497cf42ef mosh-server now takes command argument 2012-03-17 15:21:33 -04:00
Keith Winstein a07fb0d542 Fix build on Mac OS X 2012-03-16 18:03:17 -04:00
Keith Winstein 0f011b030c Start login shell (fixes #59 github issue) (per Austin Clements) 2012-03-16 15:36:13 -04:00
Keith Winstein 57d97209c0 Support 256color (and assume 256color terminal). Closes #3 github issue. 2012-03-16 13:46:55 -04:00
Keegan McAllister 2d58630d0d Only define saved_addr if HAVE_UTEMPTER
Otherwise the variable is unused, causing a compiler warning
2012-03-14 03:12:30 -04:00
Keith Winstein ef0bf90221 Rearrange mosh-server startup message 2012-03-12 05:15:41 -04:00
Keith Winstein 4f8f938369 Add versions and no-warranty msg to mosh, mosh-client, mosh-server 2012-03-12 04:49:00 -04:00
Keith Winstein df3eec1397 Allow explicit UDP port option, confine ports to range 60000..61000 2012-03-10 03:34:47 -05:00
Keith Winstein df5d163f9c Fix asserts with side-effects (per Keegan McAllister) 2012-03-08 10:50:19 -05:00
Keegan McAllister 4a29ab9d70 Fix comments, formatting, error message around use of selfpipe 2012-03-07 18:38:18 -08:00
Keith Winstein 4e158a22e5 Fix bug affecting clean shutdown on OS X 2012-03-07 03:21:33 -05:00
Keith Winstein 875e17e966 skalibs without HAS_SIGNALFD will not work if we block these signals 2012-03-07 03:10:19 -05:00
Quentin Smith 9a3ab83783 Use libstddjb's selfpipe instead of signalfd
Use selfpipe in our client, server, and examples.
2012-03-07 03:05:37 -05:00
Anders Kaseorg b275571b8f Remove redundant uses of environ
environ doesn’t work on OS X.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-03-07 03:05:36 -05:00
Quentin Smith b03d53d421 Make libutempter optional 2012-03-07 03:05:36 -05:00
Keegan McAllister b59f0f1482 Make mosh-server exit if there's no connection within 60 seconds
Fixes #30 github issue.
2012-03-06 12:17:48 -08:00
Keegan McAllister 69b7c5cf44 Save calculated time since latest remote state
This avoids duplicating a long expression in a future commit.
2012-03-06 11:58:30 -08:00
Keegan McAllister e35733a2c1 Rename 'attached' to 'has_remote_addr'
Even with future support for detaching and reattaching, this variable will keep
its original meaning.
2012-03-06 11:54:56 -08:00
Keith Winstein e5c8c33f4f Fix timing of echo acks 2012-02-26 02:49:53 -05:00
Keith Winstein 3a92cd1393 Explicit echo ack protobuf with reliable semantics 2012-02-25 14:34:39 -05:00
Keith Winstein cdbdcbb224 Print newline before MOSH CONNECT string (fixes #22 github issue) 2012-02-25 12:17:09 -05:00
Keith Winstein feb64eec52 Make utmp entries using utempter 2012-02-13 05:43:07 -05:00
Keith Winstein 20f03791a3 Detach from terminal before forkpty(). fixes #8 (github issue) 2012-02-13 02:17:09 -05:00
Keith Winstein 354dff39c8 Catch and prettyprint exceptions even in setup phase 2012-02-09 01:45:03 -05:00