Commit Graph

632 Commits

Author SHA1 Message Date
Amadeusz Sławiński
067c3ebca4 Release v.4.8.0
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
v.4.8.0
2020-02-05 21:23:48 +01:00
Amadeusz Sławiński
0dd53533e2 Increase permitted length of OSC
hyperlink feature used by some terminals requires lots of characters
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#length-limits
mentions around 2083 characters, set it to a bit more.

Bug: 57718

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2020-02-05 21:05:28 +01:00
Amadeusz Sławiński
68386dfb1f Fix out of bounds access when setting w_xtermosc after OSC 49
echo -e "\e]49\e;                                    \n\ec"
crashes screen.

This happens because 49 is divided by 10 and used as table index
resulting in access to w_xtermosc[4], which is out of bounds with table
itself being size 4. Increase size of table by 1 to 5, which is enough
for all current uses.

As this overwrites memory based on user input it is potential security
issue.

Reported-by: pippin@gimp.org
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2020-02-05 21:02:01 +01:00
Scott Shambarger
de672dcdaf Fix configure check for SELECT_BROKEN
Fixes broken ifdef nesting in confgure.ac when checking for SELECT_BROKEN

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2020-01-31 00:22:09 +01:00
Alexander Naumov
353ca2cd11 Code reformating - tty.sh
Signed-off-by: Alexander Naumov <alexander_naumov@opensuse.org>
2020-01-10 23:23:45 +01:00
Stuart Henderson
3d60ad42ea Adding OpenBSD to the BSD list 2020-01-10 21:59:18 +01:00
Alexander Naumov
1e1a5e9e2d Copyright update for 2020 2020-01-10 21:17:10 +01:00
Alexander Naumov
ef151b339e Typo DEBUG 2020-01-10 21:08:45 +01:00
Alexander Naumov
71c14f2345 Fix return code of '--version' and '-v'
Bug #57571
2020-01-10 20:58:39 +01:00
Scott Shambarger
241553f21c Create TERMCAP entries limited to 1023 bytes by default.
TERMCAP_BUF defaults to 1023 to create TERMCAP entries that work on
most systems.  To save space, TERMCAP is unwrapped, and vt220 extra
keys are skipped (unless TERMCAP_BUF > 1023); navigation keys are
still included.  Entries larger than TERMCAP_BUF are now truncated,
and no longer Panic screen.

Termcap entries are still wrapped when saved to a file.

Signed-off-by: Scott Shambarger <devel@shambarger.net>
2019-12-28 13:45:24 +01:00
Christoph Moench-Tegeder
c4a059f117 Fix coredump on xterm and rxvt
Here's the rub: with TERM=xterm (or rxvt, for that matter), Km
("key_mouse", "Mouse event has occured") is not set (and therefore
NULL), but InitTermcap() (termcap.c:230) happily tries to strdup() that,
which gets us that segfault.

As a band-aid, catch that NULL and don't strdup().

Signed-off-by: Marcin Cieślak <saper@saper.info>
2019-12-28 13:43:34 +01:00
Amadeusz Sławiński
09bbd3eff3 Make closeallfiles() faster
Optimize startup time, making closeallfiles() faster, by doing less
system calls. Instead of calling close for each possible file, use
poll() to check if file exist at all. On linux with open file limit set
to 1048576, it should do 1024 poll() calls instead of 1048576 close().

Bug: 55618

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-12-28 13:41:29 +01:00
Alexander Naumov
b7a7615084 Using 'https' instead of 'http' 2019-11-09 17:54:26 +01:00
Amadeusz Sławiński
1ca2816117 Release v.4.7.0
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
v.4.7.0
2019-10-02 00:02:48 +02:00
Amadeusz Sławiński
c0349fd511 Update ambiguous and wide characters tables to Unicode 12.1.0
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-10-01 23:55:20 +02:00
Amadeusz Sławiński
fad4c29fd9 Fix broken mouse after ncurses 6.1
ncurses 6.1 changed kmous capability from "\e[M" to "\e[<". It seems to
be done to signal that terminal supports sgr mouse mode. screen assumed
that if kmous is set to "\e[M" it is on xterm compatible terminal
anyway, so just dynamically detect which one is used and override
relevant kmapdef.

InitKeytab() is moved, so kmapdef[] can be overriden before
initialization, as InitTermcap() needs to run first, as far as I can
tell this should have no consequences.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-09-07 18:38:55 +02:00
Amadeusz Sławiński
d6e9a6a693 Clean whole buffer if we don't want to parse it
Fixes problem when pressing arrows in some prompts causes arrows to stop
in other places.

For example pressing up arrow in 'kill --confirm' prompt stops up arrow
from working on 'windowlist'

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-04-17 20:58:05 +02:00
Alexander Naumov
1e5db24077 Copyright update for 2019 2019-03-29 20:35:44 +01:00
Alexander Naumov
ee2e2254bf Typo in man page
bug #56027
2019-03-29 20:33:09 +01:00
Scott Shambarger
498e53ff09 Fix blanker to work when screen is suid root
* Change RunBlanker to call OpenDevice so permissions on slave
  PTY are correctly set.
* Update handling of file descriptors after fork to be similar to
  ForkWindow on at pty (fixes debug and leaked descriptors)
* DEBUG now creates screen.blanker to debug blanker fork
* Allow display of error message when display blocked by blanker
  (because message is probably from blanker failing to start)

Bug: 55512

Signed-off-by: Scott Shambarger <devel@shambarger.net>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-01-27 16:07:57 +01:00
Scott Shambarger
96718a2146 Prevent Panic causing Panic, and children removing sockets
* Set eff_uid/eff_gid after setuid/setgid to prevent nested Panic
  MakeClientSocket calls xseteuid(eff_uid=0) - results in nested
  Panic and SendErrorMsg not getting sent.
* Set ServerSocket to -1 after fork so that child Panic doesn't
  remove socket in eexit.

Bug: 55511

Applied with some modifications

Signed-off-by: Scott Shambarger <devel@shambarger.net>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2019-01-27 16:07:36 +01:00
Václav Doležal
d51308fbff Fix confusing indentation on several places
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2018-11-18 16:01:04 +01:00
Václav Doležal
26e61437ef Fix possible unterminated string
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:01:00 +01:00
Václav Doležal
61d6955517 Fix for nomem handling in resize.c:ChangeWindowSize()
Move `nomem' label of ChangeWindowSize() to the end of function and
add test for value of `nhlines'

Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:00:56 +01:00
Václav Doležal
10ddd81e20 Revert "those 0 assignment made rest of code totally not working"
This reverts commit ff98d7ff58.

This can potentially cause double-free. `nmlines' and `nhlines'
should be freed in preceding lines.

`nmlines' and `nhlines' are not used in the rest of the function
except in `nomem' label and their valuse are copied into `p', so
their value should be zeroed.

Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:00:51 +01:00
Václav Doležal
14db9f00d3 Fix file descriptor leak
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:00:47 +01:00
Václav Doležal
bea9483c35 Use memcpy(3) in string substitution
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:00:42 +01:00
Lubomir Rintel
908458c7c3 ansi: terminate xterm OSC response the same way as the request
There's two way to terinate an OSC: ST (\033\\) or BEL (\a). Use
whatever the original request used instead of always forcing a BEL.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
(cherry picked from commit 11a74b8382)
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:00:33 +01:00
Lubomir Rintel
c5db181b6e ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.

Tested with gnome-terminal and xterm. When called with "?" argument the
current background color is returned:

  $ echo -ne "\e]11;?\e\\"
  $ 11;rgb:2323/2727/2929

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
(cherry picked from commit 7059bff20a)
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net
2018-11-18 16:00:25 +01:00
Therese Godefroy
ee12d36719 apply patch by Therese fixing some doc issues
This fixes some issues when documentation is generated for online
viewing.
2018-10-12 00:48:30 +02:00
Svyatoslav Mishyn
f96263221b doc: fix typos
Hi there,

just found a few typos, see attachment.

(please, CC me)

Thanks.

--
https://www.juef.space/

From 745ba353867142d3e00f4d2ab06962ba0d3aaaab Mon Sep 17 00:00:00 2001
From: Svyatoslav Mishyn <svyatoslav.mishyn@gmail.com>
Date: Wed, 4 Jul 2018 21:40:48 +0300
Subject: [PATCH] doc: fix typos
2018-07-24 23:19:31 +02:00
Amadeusz Sławiński
26b4c2d790 remove character substitution
it may be not compatible with some man page viewers
2018-06-21 21:47:03 +02:00
Eric S. Raymond
123f7cbbf4 fix man page 2018-06-21 21:41:12 +02:00
Marcin Cieślak
6c880e68a3 manpage: Explain window permissions in a table 2018-05-31 14:38:42 +02:00
Marcin Cieślak
0d9858e71d manpage: Use monospaced font to render example of "displays" 2018-05-31 14:38:34 +02:00
Marcin Cieślak
f891379e02 manpage: Indent both examples for readreg 2018-05-31 14:38:28 +02:00
Marcin Cieślak
a2669fdfa5 manpage: keep nonblock and status parameters on the same line 2018-05-31 14:38:21 +02:00
Marcin Cieślak
e3a4818f6e manpage: explain flow control state indicators with a table 2018-05-31 14:38:15 +02:00
Marcin Cieślak
94b07411c9 manpage: Remove horizontal lines on large tables
Remove "allbox" tbl option from large keybinding table.
When formatting for print, large tbl tables need to be handled
specially to split nicely across the pages; instead we
just add horizontal lines and we let them overflow the pages.

The input translation table seems to fit nicely on one page
and is left as is with the "allbox" option.
2018-05-31 14:38:07 +02:00
Marcin Cieślak
f1935c872e manpage: add vertical space after bindkey examples
bindkey examples seem to be glued to their following descriptions.
This looks bad in the printable versions, so give it some space.

Alternatively we could possibly reverse the indentation and use
something like this:

bindkey -d

      Show all of the default key bindings.

but this is inconsistent with other examples.
2018-05-31 14:38:01 +02:00
Marcin Cieślak
e6d02361b1 manpage: Print = instead of double horizontal line
"Keypad =" table entry had a double horizontal line instead of a single "="
when printed with troff.

From "Tbl -- A Program to Format Tables" by M. E. Lesk:

Single column horizontal lines
    -- An input table entry containing only the character (...) = is
    taken to be a single or double line extending the full width of the
    column. Such lines are extended to meet horizontal or vertical
    lines adjoining this column. To obtain these characters explicitly
    in a column, either precede them by \& or follow them by a space
    before the usual tab or newline.
2018-05-31 14:37:53 +02:00
Amadeusz Sławiński
3f8777e6cf this actually should be 3 dots
they are part of syntax
2018-05-15 21:21:17 +02:00
Marcin Cieślak
9be818e155 Fix [bug #53552] wording in the manpage 2018-05-07 22:46:30 +02:00
Marcin Cieślak
75667719b7 groff warning: can't find font "p" 2018-05-07 22:46:24 +02:00
Marcin Cieślak
0fb08f4477 Fix (login) entry in the default bindings
nroff warning:

tbl:src/doc/screen.1:551: excess data entry `(lastmsg)' discarded
tbl:src/doc/screen.1:553: excess data entry `Repeat the last message displayed in the message line.
' discarded
2018-05-07 22:46:17 +02:00
Marcin Cieślak
97f004299a Provide fallback for Unicode ellipsis 2018-05-07 22:46:10 +02:00
Marcin Cieślak
35c9247dc2 Fix intendation around "displays"
Remove UTF-8 quotes
2018-05-07 22:45:58 +02:00
Amadeusz Sławiński
c91ab990a0 screen v4 has no truecolor support, so remove it from manpage 2018-04-04 23:00:47 +02:00
Alexander Naumov
bcd7cab017 Update Changelog (applying patches - bug#43223)
Cross-compilation support

Thanks for patches to Maarten ter Huurne <maarten@treewalker.org>
and Jussi Kukkonen <jussi.kukkonen@intel.com>

Thanks for testing these (4.6.2) on ARM (Xilinx Zynq) to
Ben Kamen <ben@benkamen.net>
2018-02-24 15:47:20 +01:00
Jussi Kukkonen
ec90292592 [PATCH 4/4] Avoid mis-identifying systems as SVR4
Linux can be misdetected as SVR4 because it has
libelf installed. This leads to linking with libelf, even though no
symbols from that library were actually used, and to a workaround for
a buggy getlogin() being enabled.

It is not documented which exact SVR4 system had the bug that the
workaround was added for, so all I could do is make an educated guess
at the #defines its compiler would be likely to set.

Modified from patch by Maarten ter Huurne.

Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
2018-02-24 15:22:05 +01:00