tests: Fix build if TIOCSTI is not definedSome downstream projects (e.g. ElectroBSD) have removed the TIOCSTIWe already have some components (such as mail and tcsh) that buildwithout TIOCSTI def
tests: Fix build if TIOCSTI is not definedSome downstream projects (e.g. ElectroBSD) have removed the TIOCSTIWe already have some components (such as mail and tcsh) that buildwithout TIOCSTI defined. This is (existing portability support in thoseprojects.Simplify things for downstreams by extending this approach to thisadditional TIOCSTI user.Reviewed by: markjDifferential Revision: https://reviews.freebsd.org/D50614
show more ...
tty: Avoid leaving dangling pointers in tty_drop_ctty()The TIOCNOTTY handler detaches the calling process from its controllingterminal. It clears the link from the session to the tty, but not the
tty: Avoid leaving dangling pointers in tty_drop_ctty()The TIOCNOTTY handler detaches the calling process from its controllingterminal. It clears the link from the session to the tty, but not thepointers from the tty to the session and process group. This means thatsess_release() doesn't call tty_rel_sess(), and that pgdelete() doesn'tcall tty_rel_pgrp(), so the pointers are left dangling.Fix this by clearing pointers in tty_drop_ctty(). Add a standaloneregression test.Approved by: soSecurity: FreeBSD-SA-26:10.ttySecurity: CVE-2026-5398Reported by: Nicholas Carlini <npc@anthropic.com>Reviewed by: kib, kevansFixes: 1b50b999f9b5 ("tty: implement TIOCNOTTY")Differential Revision: https://reviews.freebsd.org/D56046
tests: kern: add some tests for TIOCSTIThese offer at least rudimentary coverage of TIOCSTI, ensuring that itbasically works and does what it's described to do and throws errors forunprivileged u
tests: kern: add some tests for TIOCSTIThese offer at least rudimentary coverage of TIOCSTI, ensuring that itbasically works and does what it's described to do and throws errors forunprivileged use that is supposed to be blocked.Reviewed by: kibDifferential Revision: https://reviews.freebsd.org/D50507
tests: kern: add some porch(1)-based tty testsIf sysutils/porch is installed, we'll do some basic testing of ttybehavior. The existing tests primarily cover ICANON-related processingand corner c
tests: kern: add some porch(1)-based tty testsIf sysutils/porch is installed, we'll do some basic testing of ttybehavior. The existing tests primarily cover ICANON-related processingand corner cases that have been fixed somewhat recently, but Ianticipate growing this out a bit in due time.Reviewed by: ngieDifferential Revision: https://reviews.freebsd.org/D46806