Kernel: Added TIOCSTI ioctl placeholder (#6037)

Added a dummy TIOCSTI ioctl placeholder. This is a dangerous ioctl that
can be used to inject input into a tty. Added for compatibility. Always
fails with EIO.
This commit is contained in:
Baitinq 2021-03-31 22:58:41 +02:00 committed by GitHub
commit 19c578024b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: sideshowbarker 2024-07-18 20:56:29 +09:00
2 changed files with 4 additions and 0 deletions

View file

@ -414,6 +414,8 @@ int TTY::ioctl(FileDescription&, unsigned request, FlatPtr arg)
case TIOCSCTTY:
current_process.set_tty(this);
return 0;
case TIOCSTI:
return -EIO;
case TIOCNOTTY:
current_process.set_tty(nullptr);
return 0;