mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
don't allow ctty to be set to ctty - infinite kernel recursion
Obtained from: 1.1.5.1
This commit is contained in:
parent
903448b1da
commit
cdbbd9cfaf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4939
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty_tty.c 8.2 (Berkeley) 9/23/93
|
||||
* $Id$
|
||||
* $Id: tty_tty.c,v 1.3 1994/08/02 07:42:57 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -128,6 +128,8 @@ cttyioctl(dev, cmd, addr, flag, p)
|
||||
|
||||
if (ttyvp == NULL)
|
||||
return (EIO);
|
||||
if (cmd == TIOCSCTTY) /* don't allow controlling tty to be set */
|
||||
return EINVAL; /* to controlling tty -- infinite recursion */
|
||||
if (cmd == TIOCNOTTY) {
|
||||
if (!SESS_LEADER(p)) {
|
||||
p->p_flag &= ~P_CONTROLT;
|
||||
|
Loading…
Reference in New Issue
Block a user