In article <201805172011.qaa05...@stone.rodents-montreal.org>, Mouse <mo...@rodents-montreal.org> wrote: >In sys/kern/tty.c, I find > > case FIOSETOWN: { /* set pgrp of tty */ >[...] > if (tp->t_session != NULL && !isctty(p, tp)) { > mutex_exit(proc_lock); > return (ENOTTY); > } > >and > > case TIOCSPGRP: { /* set pgrp of tty */ >[...] > if (!isctty(p, tp)) { > mutex_exit(proc_lock); > return (ENOTTY); > } > >These are being a problem for me; I want to open up two ttys, neither >being my control tty, and get SIGIO when I/O is possible on either. >Obviously, I can just build a kernel with those tests snipped out; >indeed, I'm doing exactly that to see if my code works then. > >But I'm wondering why those checks are there, wondering what hazard I'm >risking by removing them. Anyone happen to know?
It is a security issue (as usual). christos