Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160626479
D57233.id179468.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
694 B
Referenced Files
None
Subscribers
None
D57233.id179468.diff
View Options
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -101,6 +101,10 @@
SYSCTL_INT(_kern, OID_AUTO, tty_drainwait, CTLFLAG_RWTUN,
&tty_drainwait, 0, "Default output drain timeout in seconds");
+static bool tty_tiocsti = true;
+SYSCTL_BOOL(_security_bsd, OID_AUTO, tiocsti, CTLFLAG_RWTUN,
+ &tty_tiocsti, 0, "Allow TIOCSTI ioctl");
+
/*
* Set TTY buffer sizes.
*/
@@ -1651,6 +1655,10 @@
static int
tty_sti_check(struct tty *tp, int fflag, struct thread *td)
{
+ /* Check for global disable. */
+ if (!tty_tiocsti)
+ return (EPERM);
+
/* Root can bypass all of our constraints. */
if (priv_check(td, PRIV_TTY_STI) == 0)
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 27, 7:54 AM (9 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33822020
Default Alt Text
D57233.id179468.diff (694 B)
Attached To
Mode
D57233: tty: Add sysctl knob to globally disable TIOCSTI
Attached
Detach File
Event Timeline
Log In to Comment