Alex Chernyakhovsky
adb62e97ff
Add fuzzer for the terminal
...
This commit adds a fuzzer for more of the terminal pipeline, adding
coverage for the input and output portions of the terminal
framebuffer.
2022-05-30 20:23:21 -04:00
Alex Chernyakhovsky
0c6e034459
Add fuzzing infrastructure
...
This commit adds the --enable-fuzzing (and --enable-asan, to make
fuzzing more useful) options and a sample fuzzer for the terminal
parser. At this time only libfuzzer is supported. Future changes to
add AFL to get more fuzzing capability should be possible with the
addition of the afl_driver.cc from Chromium.
2022-05-30 20:23:21 -04:00
Alex Chernyakhovsky
70a02d1e83
Add support for generating coverage reports
...
This change adds autoconf/automake support for building all of mosh
with gcov, and generates an lcov html report. This allows seeing which
parts ofthe source tree have good test coverage, and which can be
shored up. Eventually, it would be good to hook this up to Github
Actions to be generated automatically.
2022-05-30 19:38:10 -04:00
Andrew Chin
378dfa6aa5
Merge pull request #1150 from ncfavier/patch-1
...
Add tmux and alacritty to title_term_types
2021-12-10 16:07:48 -05:00
Harry Sintonen
87fd565268
Only use CLOCK_MONOTONIC_RAW with __APPLE__ systems.
2021-10-21 16:43:41 +03:00
Naïm Favier
bb34ce585e
Add tmux and alacritty to title_term_types
...
Resolves #1130
2021-08-26 19:55:08 +02:00
Harry Sintonen
57b97a4c91
Use CLOCK_MONOTONIC_RAW when available
2020-12-05 21:21:14 +02:00
John Hood
03087e7a76
If exec()ing the remote command fails, pause briefly
...
This makes the resulting error from mosh-server visible in ordinary usage.
2020-05-18 00:01:05 -04:00
John Hood
12199114fe
Move generated includes to their own directory to avoid conflicts.
...
Fixes #1051 , mosh fails to build on case-insensitive filesystems.
XXX This isn't perfect because autoconf/automake drop several extra
files in the directory anyway.
2020-05-17 23:55:09 -04:00
Peter Edwards
c3a2756065
Apply latest consecutive resize, not earliest.
...
If there are consecutive resize events in the userstream to be applied in
"serve", we should apply the last/latest one in the sequence, not the
first/earliest one.
This fixes a problem where a flurry of resize events (eg, generated
by a window manager resizing the client), can cause mosh to have an
out-of-date idea as to what the physical geometry of the window is.
2019-01-04 04:06:30 -08:00
John Hood
71829ff631
unicode-later-combining.test: Document slightly.
2018-08-29 22:44:04 -04:00
John Hood
fecd4ee29b
Some more namespace hygiene for "using decl;".
2018-08-15 19:28:38 -04:00
John Hood
756f4f8e98
Remove "using namespace std;".
2018-08-15 19:27:23 -04:00
John Hood
fb23168ed9
Always use std::min, std::max.
2018-08-15 19:26:27 -04:00
John Hood
e5f8a826ef
Fix bind(2) being misinterpreted as std::bind() with libc++7 on FreeBSD.
...
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230624
2018-08-15 01:11:48 -04:00
John Hood
4aff80b872
Fix more inappropriate const_iterator usage.
2018-08-03 19:39:08 -04:00
John Hood
9a606c2f3d
src/statesync/completeterminal.cc: fix bad iterator type
2018-08-03 17:32:07 -04:00
John Hood
8ac80db419
C++03 bound functions are not available in C++17; remove
...
This makes me a little sad, it's time to move to C++11 or greater.
2018-08-03 16:13:47 -04:00
John Hood
5cdbad68b8
Ignore select() errors on Travis/MacOS.
2018-08-03 15:16:55 -04:00
John Hood
3ea9e3e5a4
mosh-server: improve error logging
...
Also stop using _exit(), believed unnecessary now with proper stdio
flushing.
2018-08-03 15:16:55 -04:00
John Hood
2a5b5410b2
Fix gcc8 snprintf truncation warning.
2018-04-11 18:10:59 -04:00
Anders Kaseorg
10dca75fb2
Type Select::got_signal as volatile sig_atomic_t
...
Fixes #634 .
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2018-01-18 19:25:05 -05:00
Michael Jarvis
21d5dca682
Use HAVE_UTEMPTER instead of HAVE_UPTEMPTER
...
Fix typo for issue #942 :
- mosh-server incorrectly reports detached session in utmp/wtmp
2017-11-21 06:05:33 -06:00
John Hood
7cd4312dae
Construct socket name correctly for tmux_check()
...
In moving this function from e2e-test, I forgot that it depends on a
variable set there.
2017-11-08 19:50:35 -05:00
John Hood
cbca234b38
Add a separate test for BCE
...
This test is properly gated on tmux 2.4.
2017-11-08 19:50:35 -05:00
John Hood
968d56f885
Revert "Extend true color test to include background color erase."
...
This reverts commit aa96fc867f .
tmux doesn't support BCE until 2.4, so this change fails on 2.3.
2017-11-07 23:14:42 -05:00
John Hood
aa96fc867f
Extend true color test to include background color erase.
2017-11-06 18:38:54 -05:00
John Hood
fa9335f737
Fix issue with incorrect true-color background erase colors.
2017-11-06 18:07:54 -05:00
John Hood
88bb01a50a
Make Renditions::sgr() more compact in both code and output.
2017-11-06 10:28:10 -05:00
John Hood
ce7ba37ad4
Overlays were getting set to the wrong colors. Fix.
2017-11-06 09:30:57 -05:00
Tom Judge
ab31b0f271
Add syslog logging of connections
...
Log connection change events to syslog in the auth log, logging the PID,
username and remote host.
Also log session begin and end.
Co-Authored-By: John Hood <cgull@glup.org >
2017-11-05 11:54:43 -05:00
John Hood
e8331437d3
Minor SGR printf type signedness fixes.
2017-11-04 14:37:11 -04:00
John Hood
cf493da7b4
Make Terminal::Renditions smaller, and its members private.
2017-11-04 14:37:11 -04:00
John Hood
0ec85b508e
Check tmux version for truecolor test.
2017-11-04 14:37:11 -04:00
Kang.Jianbin
96b5027d9e
Add emulation-attributes test for true color.
2017-10-29 20:20:03 -04:00
Kang.Jianbin
6cfa4aef59
Add true color support.
...
Implement true color support define in:
https://en.wikipedia.org/wiki/ANSI_escape_code
The sequence is:
ESC[ … 38;2;;; … m Select RGB foreground color
ESC[ … 48;2;;; … m Select RGB background color
2017-10-29 20:20:03 -04:00
John Hood
befdb96ad1
Fix a minor uninitialized-variable warning.
2017-08-23 16:21:53 -04:00
John Hood
f3fa4211a2
Always use non-blocking sockets for recvmsg()
2017-08-23 15:09:43 -04:00
John Hood
b11d524bb7
Restore asserts and error handling
...
A couple of them got improved out of existence.
2017-08-23 15:09:43 -04:00
Keith Winstein
790b479f8a
terminalframebuffer.cc: ignore unknown renditions
...
(revert assert(false) added by 4835dcf )
(fixes #918 )
2017-08-17 13:14:52 -07:00
John Hood
6f9de49c27
Safeguard tmux sanity check.
2017-08-11 12:59:39 -04:00
John Hood
a40b67691a
Remove various assert(constant) calls
...
These cause warnings from static checkers, and seem to lead to spurious
GCC7 -Wmaybe-uninitialized.
2017-08-06 23:12:05 -04:00
John Hood
93daa5ac3b
Fix Debian GCC7 FTBFS: remove default constructors
2017-08-06 23:09:07 -04:00
John Hood
6ebc795124
Remove an unnecessary conditional.
2017-08-06 22:22:35 -04:00
John Hood
9663edb7c7
Do not set function parameters.
2017-08-06 22:22:32 -04:00
John Hood
2b3034b320
Remove private static class methods.
2017-08-06 22:22:29 -04:00
John Hood
4835dcf5ee
Various switch statement fixes.
2017-08-06 22:22:25 -04:00
John Hood
3346419724
Remove excessive parentheses
...
There are many more.
2017-08-06 22:22:20 -04:00
John Hood
1ae23b4dcc
Prefer early exit/break to large conditional blocks.
...
Some of these are large and contain smaller unrelated refactors.
2017-08-06 22:22:09 -04:00
John Hood
b1a6f7c144
Eliminate unnecessary, trailing else conditional blocks.
2017-08-06 22:22:05 -04:00