[systemd-devel] PrivateDevices=true blocks use of ttys?

Lennart Poettering lennart at poettering.net
Fri Dec 26 15:39:08 PST 2014

On Fri, 26.12.14 23:38, Matthias Urlichs (matthias at urlichs.de) wrote:

> Hi,
> Alison Chaiken:
> > Isn't /dev/tty0 a pseudo TTY?
> It's an alias to the current real TTY, which is not exactly the same
> thing.

Not really. /dev/tty0 is an alias for the current VT (i.e. the virtual
terminal that's on your VGA screen, in contrast to ttys such as serial
ports or pseudo ttys). 

/dev/tty (without the trailing 0) on the other hand is an alias for
the current controlling tty of your process. This can point to any
kind of tty, including VTs, ptys, serial ports, ...

Confusing? Hell yeah! It's UNIX! Do all kinds of redundant things in a
shitty way and label them in the most confusing scheme possible!

> IMHO "PrivateDevices=yes" is supposed to make sure that this job cannot
> mess up any "real" device. Writing junk to /dev/tty0 can mess up my console
> quite easily. Therefore, blocking /dev/tty0 is correct.



Lennart Poettering, Red Hat

More information about the systemd-devel mailing list