1465 Commits

Author SHA1 Message Date
john hood 11190526ad Fix Configure failure on FreeBSD with only base OpenSSL.
Search for OpenSSL libraries both with pkg-config and directly.

Fixes #763.
2016-11-19 15:02:06 -05:00
John Hood 302c7deb41 Describe Cell width as a narrow/wide boolean.
A character cell can only be either narrow or wide.  It's more
convenient to represent that as an int containing 1 or 2, but slightly
more correct to represent it as a "boolean" single-bit integer.
2016-11-17 00:56:31 -05:00
John Hood 71fe4441ef Shrink Cell to its prior size by using bitfields. 2016-11-17 00:56:05 -05:00
John Hood e4aed30d30 Fix broken wrap behavior causing broken copy/paste.
The terminal framebuffer was not resetting the wrap state of a row
when a previously-wrapping line was overwritten by a non-wrapping
line.  Restore previous, subtle behavior of line wrap.  Fix wrap
verification bug now exposed by emulation-wrap-across-frames.test.

Also hoist some getters, mostly for clarity.

Fixes #820.
2016-11-17 00:50:46 -05:00
Anders Kaseorg f7f741dab4 src/tests/inpty.cc: Skip the test on forkpty failures
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-13 16:13:25 -05:00
john hood 74469a7592 inpty.cc: Align configuration to be like mosh-server.cc.
This fixes a FreeBSD 11.0 build failure.
2016-11-12 23:25:56 -05:00
Anders Kaseorg 43251ea8db Add a trivial test that the mosh script works without needing tmux
None of the previous tests even ran the mosh script unless tmux ≥ 1.8 is
installed.  Thus ‘make check’ was “passing” on, e.g., RHEL 6 even though
its Perl is too old (5.10.1).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-12 23:25:35 -05:00
John Hood 417907c71d Add ZERO_AR_DATE
This doesn't help that much, Apple's linker is apparently hopelessly
nondeterministic
2016-11-12 19:57:50 -05:00
John Hood 73b4ab21ad OS X package build on Travis
This builds an OS X package and deploys it to a GitHub release when a
tag is pushed.  It also generates a tarball reporting the build
environment and configuration.  The build log is still separate.

This is not yet final, it deploys to cgull/mosh and not
mobile-shell/mosh.

It should not affect Linux or OS X CI builds (other than the change to
the Travis Xcode 7.1 image).

Included changes:

The Travis Xcode 7 image seems to have added tmux while we were gone,
breaking our Homebrew setup.

There seems to be no clean reliable way to determine whether a
Homebrew package is installed or needs updating.  Reinstalling is less
efficient but seems to work reliably.

The OS X build is now split between four files:

.travis.yml contains Travis-specific CI/release build configuration.

macosx/brew.sh contains Homebrew-specific package manager installs and
reporting.

macosx/osx-xcode.sh contains Apple-specific OS/X and Xcode reporting.

macosx/build.sh does the actual package build.
2016-11-12 19:57:50 -05:00
John Hood c9d0c9c0c5 tests/prediction-unicode.test: env -u is not POSIX
Seen to fail on OpenBSD 5.2.
2016-11-12 15:33:07 -05:00
Anders Kaseorg df085e02dc Restore Perl 5.10 support
On Perl < 5.14, we can use Socket::GetAddrInfo from CPAN to replace the
missing getaddrinfo functionality of Socket.

Socket::GetAddrInfo < 0.22 requires :newapi in the import list, but 0.22
forbids it and enables the new API by default.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-12 01:43:08 -05:00
John Hood 04b03b41f6 Revert "Do not close stdin on ssh session."
This reverts commit 45c521d632.
2016-11-11 23:31:11 -05:00
John Hood 52d10cf211 Add a test for spinning on no-change screen updates 2016-11-06 06:15:42 -05:00
John Hood dc292dcdaa Test for spinning Mosh 2016-11-06 06:15:42 -05:00
John Hood 9c55198635 Fix off-by-one error on timeouts for input history echo updates 2016-11-06 06:15:42 -05:00
John Hood 3e414c46b3 Update send/ack timers on empty diff
The root problem here is that writes to the frame buffer may alter it,
but leave it with the same contents as before, and the diff between
the two states is the empty string.  With the dirty-rows,
smart-pointer changes to Framebuffer, it is easy to run into this
situation.  This got Network::TransportSender confused about timeouts,
and mosh-server would spin.

The theoretically correct fix would be to have operator==() exactly
correspond to diff(otherstate).empty().  I have partly implemented
this (and may yet finish) but it's not trivial to get right.

This is a much simpler fix that simply attempts to correctly update
timers when two framebuffers are different and an empty diff is
generated.
2016-11-06 06:15:41 -05:00
John Hood 9ffbeddbc8 Put spin debug under -vv flag, and add to mosh-client 2016-11-06 06:15:41 -05:00
John Hood f89f1da0b5 Log/limit pselect() with timeout of 0
This is not a fix for bad timeouts, but rather a band-aid
to keep Mosh from consuming large amounts of CPU time.
2016-11-06 06:15:41 -05:00
John Hood 45c521d632 Do not close stdin on ssh session.
This helps with #819.
2016-11-06 06:15:41 -05:00
John Hood 444eae1fc4 Add tests to run Mosh repeatedly. 2016-11-06 06:15:41 -05:00
John Hood 22f5d58144 Exit gracefully on pty write or ioctl failure.
Fixes #821, OS X abnormal exit on client input at mosh-server
shutdown.  On OpenIndiana, TIOCG[GS]WINSZ also fail in this situation.
2016-11-06 06:14:02 -05:00
John Hood 4bc9e5c6ab Handle printing to closed pipes better in tests.
Some systems do not deliver SIGPIPE to shell pipeline writers when the
downstream reader has exited.  So, also check for errors from
/bin/printf.  I fixed this for OpenBSD 6.0 but I think it will also
fix posh on Linux.
2016-11-06 06:09:49 -05:00
John Hood 795549aafb OpenIndiana pid_t is long int 2016-11-06 06:09:49 -05:00
John Hood dd9ee1c4b7 Remove unused include 2016-11-06 02:47:20 -05:00
Anders Kaseorg b76d1bd526 e2e-test: Add newline to “unknown test type argument” error
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-04 03:15:03 -04:00
Anders Kaseorg 8a8f2b29ca Fix most shell hygiene issues found by shellcheck
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-04 03:15:03 -04:00
John Hood 3b21cd2425 make V=1
Resolves #786.
2016-10-31 00:53:50 -04:00
John Hood 723e7858bc Cleanup AppVeyor Git checkout more safely. 2016-10-29 21:13:53 -04:00
John Hood 9005ea6cf3 Use a table lookup for base64 decode 2016-10-29 20:50:33 -04:00
John Hood f728456898 Handle more warnings from protobuf on OS X compile 2016-10-29 20:48:48 -04:00
Jakub Wilk 42d686882f Fix typos 2016-10-09 16:04:42 +02:00
John Hood dcd7866d84 Try the Xcode 8 image. 2016-10-01 00:48:43 -04:00
John Hood b0facb55c4 Test carefully for clock_gettime() and CLOCK_MONOTONIC 2016-09-29 01:10:23 -04:00
John Hood f429fd38b0 Use old AppleCommonCrypto name for AES 2016-09-25 22:24:03 -04:00
John Hood 477729b315 tests: improve robustness
Replace some blind timeouts with actual synchronization.
Improve performance on some slow tests.
Tweak some of the remaining timeouts.

This still isn't good enough to get 'make -j9 check'
working reliably on Cygwin for me; I think some Cygwin/
Windows scheduling issues remain.
2016-09-20 06:25:43 -04:00
John Hood e494025b24 Work around "make distcheck" fail on OS X with protobuf 3.02. 2016-09-19 13:56:47 -04:00
John Hood e734d5e41a tests: Work around tmux display corruption bug on OpenBSD.
See https://github.com/tmux/tmux/issues/539
2016-09-19 13:23:16 -04:00
John Hood 46b30e6851 AppVeyor CI configuration using Cygwin.
This also serves nicely as documentation of the Cygwin build
requirements.
2016-09-19 13:23:16 -04:00
John Hood 1077db41b6 Support OpenBSD 6.0 pledge() syscall for sandboxing. 2016-09-19 13:23:16 -04:00
John Hood 5619dd47bb tests: fix incorrect usage of "trap ... SIGHUP"
Discovered with OpenBSD 6.0 /bin/sh
2016-09-19 13:23:16 -04:00
John Hood 39ea3d9512 Fix excess newlines on mosh startup/shutdown.
Fixes #788.

This also works around issues with remote pty typeahead echo corrupting output
from mosh-server.
2016-09-19 13:23:16 -04:00
John Hood 70d48fbcc0 Add --no-ssh-pty option.
This eliminates issues with typeahead being echoed by the remote pty
and corrupting remote output from mosh-server to the mosh script, but
cannot be made default because older mosh-servers require a pty.
2016-09-19 13:23:15 -04:00
John Hood 8945efeb82 Allow server to bind an OS-selected UDP port with -p 0.
It looks like Mosh used to be able to do this but the capability was
lost when port ranges were added in 141ec23.
2016-09-19 13:23:15 -04:00
John Hood c599987ff8 Fix object sizing for PMTUD setsockopt() and recvmsg().
Also cleans up other setsockopt() calls, and buffer sizing/handling
for recvmsg().

These are minor errors and no actual misbehavior was observed.
Discovered while working Windows Subsystem for Linux compatibility
issues.
2016-09-19 13:23:15 -04:00
John Hood 4ad131a55d Fix lost MOSH CONNECT on FreeBSD 11
This moves all routine stdout/stderr output into the parent
server, and adds tcdrain(), even though this may be a
FreeBSD pty bug.
2016-09-18 01:53:36 -04:00
john hood b7d081056b Fix CPPFLAGS handling possibly causing curses detection failure
This is an old, old bug.
2016-09-18 01:52:50 -04:00
Andrew Chin c8aa151685 Travis-ci bot doesn't need to join #mosh to send notifications
If #mosh ever sets the +n channel mode, we'll need to remove the
`skip_join: true` part
2016-08-16 07:50:41 -04:00
Keith Winstein ddb5fd9d7a README.md: More http -> https for links 2016-08-12 00:13:22 -07:00
Keith Winstein a09381d161 http -> https links for mosh.org 2016-08-12 00:11:47 -07:00
Keith Winstein ca2750dd03 Update website location (mosh.mit.edu -> mosh.org) 2016-08-12 00:10:53 -07:00