summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Missing signal sending permission check on failed query messagesHEADmasterAlexander Naumov2023-02-011-3/+7
| | | | | | | | | | When run as setuid root, one can send a query message to the privileged screen process via its unix socket in order to force it to send SIGHUP to a PID that can be freely specified in the query packet. Processes that do not explicitly handle SIGHUP will simply terminate. Signed-off-by: Alexander Naumov <alexander_naumov@opensuse.org>
* httpss->httpsAlexander Naumov2023-01-131-1/+1
|
* http => httpsAlexander Naumov2022-05-291-1/+1
|
* http => httpsAlexander Naumov2022-05-291-1/+1
|
* Avoid zombies after shell exitVincent Lefevre2022-02-171-0/+10
| | | | | | | | | | | As documented in libutempter: "During execution of the privileged process spawned by these functions, SIGCHLD signal handler will be temporarily set to the default action." Thus in case a SIGCHLD has been lost, we send a SIGCHLD to oneself in order to avoid zombies: https://savannah.gnu.org/bugs/?25089
* bugfix CVE-2021-26937Michael Schröder2022-02-021-5/+8
| | | | | | | | | | | It allows remote attackers to cause a denial of service (invalid write access and application crash) or possibly have unspecified other impact via a crafted UTF-8 character sequence. bugfix: https://savannah.gnu.org/bugs/?60030 Signed-off-by: Alexander Naumov <alexander_naumov@opensuse.org>
* man page: copyright updateAlexander Naumov2022-01-041-5/+5
|
* [PATCH 2/2] trivial: docs: Add missing ')'.Michael Witten2020-12-171-1/+1
| | | | | | A cross-reference was intended to be placed inside parentheses, but the closing parenthesis was forgotten; this commit inserts that missing closing parenthesis.
* [PATCH 1/2] trivial: docs: Fix typo (s/paramter/parameter)Michael Witten2020-12-171-1/+1
| | | | | | In the description of the 'stuff' command, there was the typo "paramter"; this commit makes that word "parameter".
* bugfix: option -X ignores specified user in multiuser envTaj Morton2020-10-201-0/+4
| | | | | | bug #37437 Thanks to Taj Morton
* TERMCAP_BUF is used in place of TERMCAP_BUFSIZEVictor Dmitriev2020-04-271-1/+1
|
* Expand d_xtermosc array in struct DisplayVáclav Doležal2020-02-221-1/+1
| | | | | | | | | | | | Commit 7059bff expands index range of "typ2" by one without expanding affected arrays. d_xtermosc in struct display is one of these. Related: 7059bff20a28778f9d3acf81cad07b1388d02309 (ansi: add support for xterm OSC 11) Related: eb2be1adf92d58bd8f4ca3458eb04da38bf33c2b (Fix out of bounds access when setting w_xtermosc after OSC 49) Signed-off-by: Václav Doležal <vdolezal@redhat.com>
* Increase permitted length of OSCAmadeusz Sławiński2020-02-051-1/+1
| | | | | | | | | | 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>
* Fix out of bounds access when setting w_xtermosc after OSC 49Amadeusz Sławiński2020-02-051-1/+1
| | | | | | | | | | | | | | | | 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>
* Add escape to show number of currently open windows in hardstatused@s5h.net2020-02-033-0/+32
| | | | | | | | | String escape format of %C for number of windows with - prefix for group window count. Bug: 14484 Signed-off-by: Ed Neville <ed@s5h.net>
* Fix 100% cpu use on one core with pollAmadeusz Sławiński2020-02-031-1/+1
| | | | | | | | | If there is no event timeout set just wait for 1 second instead of setting poll timeout to 0. Bug: 57697 Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Haiku port: Check for some librariesFrançois Revol2020-02-031-1/+6
| | | | | * libnetwork for sockets, * libbsd for openpty.
* fix mismatched types in prototypeFrançois Revol2020-02-032-2/+2
| | | | not everyone defines pid_t as int...
* remove hardcoded -lutilFrançois Revol2020-02-031-1/+0
| | | | AC_SEARCH_LIBS prepends the found library already.
* add dirent.h test back to configureFrançois Revol2020-02-031-0/+3
| | | | | Haiku doesn't have sys/dir.h which is deprecated anyway, so it's better to actually use dirent.h if found.
* build: acls.c: mark unused parametersChris Meyering2020-02-021-0/+4
| | | | * src/acls.c (DoSu): avoid four unused-variable warnings
* build: tests/test-winmsgbuf.c: avoid GCC 10 alloca warningChris Meyering2020-02-021-1/+2
| | | | | | | * src/tests/test-winmsgbuf.c (main): Replace alloca with malloc/free to prevent the following warning: tests/test-winmsgbuf.c:298:19:\ warning: implicit declaration of function ‘alloca’; did you mean \ ‘calloc’?
* build: test-winmsgbuf.c: add const to avoid GCC 10 warningChris Meyering2020-02-021-1/+1
| | | | | | | * src/tests/test-winmsgbuf.c:45: make char * const This avoids the following warning: tests/test-winmsgbuf.c:45:17: warning: initialization of\ ‘char *[...]'from incompatible pointer type ‘const char *[...]'
* cleanup: acls.c: move unused variables into #if-0 blockChris Meyering2020-02-021-2/+2
| | | | * src/acls.c (DoSu): avoid two unused-variable warnings
* build: cast NULL to (char *) to prevent GCC 10 warningChris Meyering2020-02-021-1/+1
| | | | | | * src/acls.c (GrowBitfield): replace NULL by (char *)NULL. This avoids the following warning: acls.h:44:35: warning: dereferencing ‘void *’ pointer
* Refactor condition handling to use offset instead of pointerAmadeusz Sławiński2020-01-313-27/+30
| | | | | | | | | If wmc_else() is called after wmb_expand() it can overwrite pointer to old value. To avoid this issue refactor condition code to use offset into parsed string instead. Reported-by: pippin@gimp.org Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Copyright update for 2020Alexander Naumov2020-01-101-1/+1
|
* Fix return code of '--version' and '-v'Alexander Naumov2020-01-101-4/+6
| | | | Bug #57571
* Fix code formattingAmadeusz Sławiński2019-12-312-12/+12
| | | | Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Fix variable typeAmadeusz Sławiński2019-12-281-2/+2
| | | | | | | | ParseAttrColor returns uint64_t and ApplyAttrColor takes uint64_t as argument, int was used instead, which may cause vertical bar to not have color applied on split. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Disable exclusive mode on TTY device when closingDavid Dorfman2019-12-283-3/+20
| | | | | | | | | | | | | When opening a TTY we enable exclusive mode to prevent other tools messing with our connection. When we are done using the TTY the exclusive mode must be disabled so the TTY can be reconnected to later. We remember to do this when a break is sent to the device, but not on window close. This change ensures we disable exclusive mode on the TTY device whenever the window is closed. bug #52248
* Create TERMCAP entries limited to 1023 bytes by default.Scott Shambarger2019-12-285-17/+49
| | | | | | | | | | | | 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>
* Fix coredump on xterm and rxvtChristoph Moench-Tegeder2019-12-281-1/+1
| | | | | | | | | | | 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>
* Count timeout in milliseconds instead of using struct timevalAmadeusz Sławiński2019-12-284-31/+20
| | | | | | | poll() accepts timeout in milliseconds, so there is no need to keep timeout in struct timeval. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Convert select() to poll() in sched.cAmadeusz Sławiński2019-12-281-22/+67
| | | | | | | | | | | | select() limits number of file descriptors that can be used by screen. Migrate to poll() to avoid this limitation. As can be seen in case of scheduler it requires quite some changes, care must be taken to count poll() events properly. Bug: 55697 Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Convert select() to poll() in screen.cAmadeusz Sławiński2019-12-281-5/+6
| | | | | | | | | select() limits number of file descriptors that can be used by screen. Migrate to poll() to avoid this limitation. Bug: 55697 Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Convert select() to poll() in display.cAmadeusz Sławiński2019-12-281-14/+14
| | | | | | | | | select() limits number of file descriptors that can be used by screen. Migrate to poll() to avoid this limitation. Bug: 55697 Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Make closeallfiles() fasterAmadeusz Sławiński2019-12-281-5/+25
| | | | | | | | | | | 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>
* Using 'https' instead of 'http'Alexander Naumov2019-11-0957-61/+61
|
* Update ambiguous and wide characters tables to Unicode 12.1.0Amadeusz Sławiński2019-10-021-15/+22
| | | | Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Get rid of externs in telnet.cAmadeusz Sławiński2019-09-192-6/+3
| | | | | | | Just include correct headers. We need to expose af properly in screen.h for this to work. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Fix broken mouse after ncurses 6.1Amadeusz Sławiński2019-09-072-2/+6
| | | | | | | | | | | | | | 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>
* Fix some gcc-9 warning in utmpAmadeusz Sławiński2019-05-181-11/+9
| | | | | | | Shouldn't have really used strncpy, for something that is effectively binary data. Also cleanup structs when defining instead of adding memsets everywhere.
* Revert "Remove unnecessary condition check"Amadeusz Sławiński2019-05-131-0/+2
| | | | | | | | | | | This reverts commit ceb9b1f6ec6378c83566af0029ddefcc825ba6d4. I need to look at this again, there is a report that commit in question may cause problems and apparently logic may have failed me when I removed this code, as it probably should stay and everything after it is unreacheable. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Clean whole buffer if we don't want to parse itAmadeusz Sławiński2019-04-172-5/+5
| | | | | | | | | | 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>
* Remove unnecessary condition checkAmadeusz Sławiński2019-04-141-2/+0
| | | | | | According to parent "if" condition this is never the case Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Close file descriptor after query commandAmadeusz Sławiński2019-04-141-0/+1
| | | | Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Fix -L option when passed to backend via MsgAmadeusz Sławiński2019-04-132-0/+3
| | | | | | | | | Breaks backward compatibility This fixes a problem when user runs screen with "-L" option in already existing screen. We need to pass information about theflag to backend. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Define data pointer in Event as voidAmadeusz Sławiński2019-03-311-1/+1
| | | | | | | We don't know format of data we pass around, so we may as well define pointer as void *. Gets rid of -Wcast-align warning with clang. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* Fix D_processinputdata typeAmadeusz Sławiński2019-03-312-3/+3
| | | | | | | Define d_processinputdata as struct pwdata instead of doing casts back and forth. Removes clang warning with -Wcast-align. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>