Commit Graph

144 Commits

Author SHA1 Message Date
millert
975ee75e4b Substitute "100" for __default_termid__ instead of "vt100".
The "vt" prefix is optional for the default terminal ID.
Fixes an instance of "vtvt100" in the installed man page.
OK matthieu@
2023-12-19 20:31:21 +00:00
matthieu
038a2143ab Update to xterm 378. tested/ok op@, tb@ 2023-02-05 07:45:22 +00:00
matthieu
1a36d93abf enlarge mkstemp() pattern to 10 'X' 2023-01-22 14:22:05 +00:00
matthieu
cdbebc03a1 Prevent users from enabling allowFontOps by menu or via resources.
This further protects from CVE-2022-2602 (although allowFontOps where
disabled by default in OpenBSD since 2009).
2022-11-10 18:19:23 +00:00
matthieu
480c2c5de8 Update xterm to version 375. ok tb@
and also tested by Walter Alejandro Iglesias
2022-11-09 21:55:14 +00:00
matthieu
11786a9e1c missed CVS add/remove in previous update to 274. noticed by tb@ 2022-11-07 12:28:06 +00:00
matthieu
4726157238 Update xterm to version 374 ok tb@ 2022-11-07 11:15:27 +00:00
matthieu
7af07b62e2 Revert parts of the changes in versions 368 and 369 that broke
support of 30bpp displays with TrueType fonts
2022-09-03 06:51:46 +00:00
matthieu
6c19a92e2b kill extra space at EOL 2022-08-07 08:06:54 +00:00
matthieu
f9739d85ea fix indentation style and space/tab 2022-08-07 08:04:41 +00:00
matthieu
10a4b7d422 If unveil(2) fails, display an error with the failing path.
Discussed with deraadt@ ok millert@
2022-08-07 07:10:54 +00:00
deraadt
8b7214bf5f allowMouseOps default is disabled. adjust documentation. 2022-06-04 23:44:52 +00:00
matthieu
aaec4ee837 Document removal of exec-formatted(), exec-selectable() and
spawn-new-terminal() functions.
2022-05-22 15:22:41 +00:00
deraadt
25dfd5d4c8 Back in darker times, xterm was setuid root to add a user entry to the
utmp and wtmp files at startup. real-uid / effective-uid flipping was
used to cleanup the records in these two files at logout-time.  Over
time it was recognized that setuid root is too dangerous, later on
even uid flipping became an unacceptable practice (because an attacker
who finds a bug will simply flip the uid back to root before
continuing exploitation).  Some OS's helped xterm (and other similar
login-related tooling) by making utmp writeable by a new utmp group,
but most did not do the same for wtmp.  xterm started using this new
utmp gid, and the wtmp code moved to "try, and if it fails, ignore the
failure".

The obvious way to use this uid is for xterm to open the utmp file for
write (early on), discard the egid, and keep the file descriptor
around until utmp cleanup at termination.  10-20 lines of code, maybe.
But no,.... that's not what happened.

The previous setuid root flipping code (which is nearly a hundred
lines of #ifdef-wrapped code for portability reasons) was copied and
repurposed by adding new #ifdef code for setgid utmp flipping, and
thus nearly a hundred lines of #ifdef-wrapped code was added).  setgid
flipping has less severe security risks than setuid flipping, but it
is remains an excessively strong and unneccessary power (compared to a
single writeable fd).

When pledge() arrived on the scene, "wpath" was required so that the
utmp file could be opened late, and "id" was required to support egid
flipping.  unveil() arrived on the scene, and the utmp path was added
to the list of viable paths, once again not considering that an incorrect
approach was being taken by the code.

I tried rewriting the portable USE_UTMP_SETGID code to follow the
open-drop-reuse-fd approach, to help out upstream xterm, but it is such
a brain-melting shitshow I gave up, we'll have a (small) intrusive patch
which opens utmp early, drops the gid, and reuses the fd later on.

Maybe upstream will take care of this eventually to reduce the risk of
egid other operating systems.
ok matthieu, much feedback from millert
2022-05-22 14:43:01 +00:00
deraadt
064fa8f9ad Disable wtmp support on OpenBSD, it hasn't worked in nearly two decades
because we dropped setuid root around the, but the code to attempt it
it was erroneously left behind
ok matthieu
2022-05-22 14:07:51 +00:00
deraadt
142eb119d9 Disable the exec-formatted and exec-selectable strictly
ok matthieu
2022-05-22 14:03:01 +00:00
deraadt
aa49914ccf Avoid snprintf truncation near environment variables
ok matthieu
2022-05-22 13:56:30 +00:00
deraadt
e5be32f8f5 A few support functions can be hidden using OPT_EXEC_XTERM, because
the top-level features are disabled because our xterm uses pledge
without "exec" support.
ok matthieu
2022-05-22 13:50:19 +00:00
matthieu
77c0be362c Update to xterm 372. ok tb@, naddy@. Tested by others too. 2022-04-25 19:20:37 +00:00
matthieu
7dc637bc0f Merge Upstream fix for buffer overflow in sixel code.
This code is not compiled on OpenBSD so the shipped xterm are not
vulnerable to this (which is CVE-2022-24130)
Committing the fix in case someone uses this for builds with sixel enabled.
2022-02-21 09:05:40 +00:00
matthieu
664b617ea0 Disable mouse tracking by default.
This causes extra control sequences to be sent to the shell when an
application that has it enabled crashes. Discussed with deraadt@
2021-10-31 18:38:43 +00:00
matthieu
d4405de0d3 Update to xterm 369. Tested by many. 2021-10-17 09:10:00 +00:00
matthieu
c2fd33cef2 Don't exit if unveil() fails. ok deraadt@ 2021-09-06 11:15:25 +00:00
matthieu
7052d2c2a8 Unveil paths needed by xterm at run-time. work with tb@ and deraadt@
Only in (default) case where there are no exec-formatted or
exec-selected resources set. In those case the commands and their
arguments could be anywhere.
2021-09-02 09:31:38 +00:00
martijn
ff43a88e32 Make xterm use my_wcwidth unconditionally again.
CharWidth is a conditional wrapper that assumes that all wide characters
in the range 32-126 and 160-255) are latin-1 characters and are identical
with the unicode (UTF-8) codepoints and result in a width of 1.

This is correct in so far that the names of these code-points are
identical, but for SHY (soft-hyphen) the explanation of how it should be
used differs between unicode and latin-1. Latin-1 assumes that it's always
displayed, for unicode it should only be displayed after local grammar
rules apply.

This wrapper got introduced in xterm #334 and is on the short-list of Thomas
Dickey to fix. Since we don't know when the next release is going to be,
commit this one now, so we have it fixed before 7.0.

Originally discrepency between xterm and wcwidth(3) pointed out by Lauri
Tirkkonen (lauri <at> hacktheplanet <dot> fi).
OK matthieu@
2021-08-31 13:14:04 +00:00
matthieu
cc62be9d9c Update to xterm 367. Tested by abieber@, dv@ and Trondd. Thanks. 2021-04-02 18:44:19 +00:00
matthieu
84840c0372 Update to xterm 366. tested by jsg@ 2021-02-14 09:14:06 +00:00
matthieu
4fc9619181 Update to xterm 363. tested by jsg@ and others on tech@. 2021-01-10 09:23:57 +00:00
matthieu
dc3670b8be Pass the proper widget pointer to getKeymapResources()
Found while testing xterm 363
2021-01-02 10:38:14 +00:00
matthieu
096a30016e Pass proper widget pointer to SetCursorBlink() in local change.
Found while testing upgrade to version 363.
2021-01-02 10:33:31 +00:00
matthieu
2d476acd96 Remove a now unused field that was added as part of a local change. 2021-01-02 10:27:03 +00:00
matthieu
88bb9743b4 Remove redundant / unused defines from CPPFLAGS. No binary changes. 2021-01-02 10:24:36 +00:00
matthieu
553b461bdc Disable the print-immediate and print-on-error functions in xterm.
They a causing a pledge violation when called, and we can live without
them. ok millert, also discussed with deraadt@
2020-01-20 21:03:35 +00:00
matthieu
147e36c7dc Disable PASTE64, TCAP_FKEYS and TCAP_QUERY explicitly.
They got enabled in previous xterm update but we don't want those.
PASTE64 issue and patch by deraadt@, discussed also with nicm@
2020-01-18 11:59:03 +00:00
matthieu
150aa6e9c8 Update to xterm 351. tested and ok solene@ jca@ 2019-12-29 08:54:02 +00:00
matthieu
11de9a2471 Make it possible to build xterm with OPT_TRACE.
with tweaks from kn@.
2019-03-09 20:10:19 +00:00
schwarze
402fc78320 Do not replace wcwidth(3) with a broken, hand-rolled re-implementation
that comes bundled with xterm(1).
Issue found and based on a diff from Lauri Tirkkonen <lotheac at iki dot fi>.
The final form of the diff follows a suggestion from tedu@.
OK matthieu@
2019-03-08 21:25:40 +00:00
schwarze
8f242316fb Update the OPENBSD SPECIFICS section to match reality:
* Add the missing locale, modifyFunctionKeys, precompose, and scrollBar.
* Move backarrowKeyIsErase to conform to alphabetical sorting.
* Add a missing full stop.
Diff found in my tree; i obviously forgot to commit it earlier.
2019-03-08 12:54:30 +00:00
matthieu
44d74a94be Update to xterm version 344. ok jsg@ 2019-02-24 11:41:42 +00:00
matthieu
02339cbc79 use #define XXX 0 to explicitelty disable an option. 2018-07-21 09:31:22 +00:00
matthieu
214a961ee2 Explicitely disable paste64 and readline options, to disable bracketed paste.
readline was not enabled, but paste64 which was on by default enables it.
requested by deraadt@
2018-07-21 09:16:42 +00:00
matthieu
54917569e6 Change the 'Enable Blinking Cursor' menu item to 'Toggle Cursor Blinking'
This is more coherent with how the menu item interacts with changes
caused by sending escape sequences. Remove the check mark from the
item which was getting out of sync.
2018-05-20 09:28:40 +00:00
matthieu
2c13a1681c Make 'reset terminal' also reset the blinking state of the cursor.
Fix from Thomas Dickey.
2018-05-20 09:25:38 +00:00
matthieu
a7a745bbe2 set the default for cursorBlink to 'never' 2018-05-20 09:22:18 +00:00
matthieu
a59a4af1e1 Update to xterm 331 2018-03-29 20:23:53 +00:00
matthieu
6e8ae15186 Update to xterm 331 2018-03-29 20:22:05 +00:00
matthieu
364ef0736d Update to xterm 331 2018-03-29 20:19:15 +00:00
schwarze
1c45dc4fed Disable Unicode canonical composition by default because that's
less surprising and makes copy and paste work better, even though
some none-default fonts currently do not display combining accents.

Problem reported by Philippe Meunier <meunier at ccs dot neu dot edu>.
Root cause found by bentley@.
OK bentley@, and the general direction was also supported by stsp@.
2017-12-13 17:45:49 +00:00
matthieu
99d0aff682 Update to xterm 330 2017-07-15 19:20:51 +00:00
espie
251e3d9436 let X directories build even if you forget depend.
- use BUILDFIRST
- have fontconfig use normal 'all' targets to make sure its files are built
- explicitly document the fontconfig lib order

okay matthieu@
2017-06-18 21:09:07 +00:00