[systemd-devel] Mounting /dev/pts

Michael Biebl mbiebl at gmail.com
Mon Jan 3 16:14:03 PST 2011


2011/1/4 Lennart Poettering <lennart at poettering.net>:
> On Tue, 04.01.11 01:01, Michael Biebl (mbiebl at gmail.com) wrote:
>
>>
>> 2011/1/4 Lennart Poettering <lennart at poettering.net>:
>> > On Tue, 04.01.11 00:24, Wulf C. Krueger (philantrop at exherbo.org) wrote:
>> >
>> >> Hello,
>> >>
>> >> currently, /dev/pts is mounted without the usual options by systemd.
>> >
>> > Normally, additional parameters listed in /etc/fstab should be applied
>> > on boot with remount-api-vfs.service unit. However, there seems to be a
>> > bug right now and this is not done properly.
>>
>> On Debian and Ubuntu /dev/pts is mounted with noexec,nosuid,gid=tty,mode=0620.
>>
>> In Debian it is done via the mountdevsubfs sysv init script, in Ubuntu
>> it is done by mountall.
>> On both systems /dev/pts is *not* defined in /etc/fstab.
>>
>> I guess Wulf's point isn't, that options in /etc/fstab are not applied
>> but rather that systemd should mount /dev/pts with those options.
>
> Hmm, I normally would be happy to do that, but I am a bit concerned
> about the gid=tty parameter. Before we pass that off to the kernel we'd
> have to look that up and pass a numeric gid on. But doing NSS queries
> from PID 1 is a little bit dangerous. Hence I'd actually prefer if
> people apply this in /etc/fstab.
>
> Ideas? Suggestions?

The mountdevsubfs init script does indeed use a numeric value (= 5)
for gid as that is guaranteed to be tty on Debian.
I just checked a Ubuntu 10.10,  Fedora 14 and openSUSE 11.4 system and
they all use tty:5.

If this is an assumption though that can be safely made accros distros, I dunno.

Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list