Re: How to lock current->signal->tty

Alan Cox
2006-08-08T17:52:44Z

Ar Maw, 2006-08-08 am 13:44 -0400, ysgrifennodd Stephen Smalley:
> SELinux is just revalidating access to the tty when the task changes
> contexts upon execve, and resetting the tty if the task is no longer
> allowed to use it. Likewise with the open file descriptors that would
> be inherited. No clearing of the ttys of other tasks required as far as
> SELinux is concerned, although that might not fit with normal semantics.

The kernel requires you end up with a session leader etc so an exec that
loses rights by the session leader does indeed match disassociate_ctty I
guess. The ctty is a bit of an odd thing in the Unix world and perhaps
something that shouldn't have happened in that it gives you ability to
do things even if you have no fd to it.

Alan