[systemd-devel] Mounting /dev/pts

Wulf C. Krueger philantrop at exherbo.org
Mon Jan 3 15:24:38 PST 2011


currently, /dev/pts is mounted without the usual options by systemd.

If /dev/pts is not mounted with the GID of the tty group, glibc (it assumes 
tty as the group name, too) runs pt_chown which is generally undesirable since 
it needs to be setuid (and is owned by root) and according to grantpt(3) "With 
Linux devpts no such helper binary is required".

Furthermore, having glibc run pt_chown effectively prevents strace -f'ing any 
program that creates a pty (assuming it checks for errors properly), e. g. 
strace -f urxvt.

Setting mode=0620 should be done as well as it makes "mesg y" the default on 
newly created PTYs (cf. mount(8)) which allows using write(1p).

Both options are, to the best of my knowledge, commonly used among Linux 
distros when mounting /dev/pts.

I have tried to come up with a patch myself but failed disgracefully, I'm 

Best regards, Wulf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110104/4883001c/attachment.pgp>

More information about the systemd-devel mailing list