User: Password:
|
|
Subscribe / Log in / New account

Passing fds via pipes?!

Passing fds via pipes?!

Posted Jul 30, 2009 0:37 UTC (Thu) by nix (subscriber, #2304)
In reply to: Passing fds via pipes?! by i3839
Parent article: A tempest in a tty pot

Wrong way round. An fd to a TTY can be passed over a unix-domain socket
and then used (which will trigger line discipline magic even though the
app has no idea it's using it), so it's using a TTY even though it never
opened it or looked at /dev/ptmx. (This is probably not common, but it
makes a comprehensive audit of TTY users ridiculously hard, because use of
AF_UNIX sockets *is* common and fd passing is not particularly rare. One
variation of it, in which the fd is passed into the application as one of
fds 0 to 2, is of course exceedingly common. You don't even need AF_UNIX
sockets for that.)


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds