Bug 110209 - rc.sysinit mounts /dev/pts without honoring /etc/fstab
rc.sysinit mounts /dev/pts without honoring /etc/fstab
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks: 108782
  Show dependency treegraph
 
Reported: 2003-11-16 23:37 EST by Gerald Britton
Modified: 2014-03-16 22:40 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-11-17 16:15:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gerald Britton 2003-11-16 23:37:33 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031030

Description of problem:
/etc/init.d/rc.sysinit script, line 80:

mount -n -t devpts /dev/pts /dev/pts

This mounts /dev/pts without honoring the options listed in
/etc/fstab.  This default setup has: gid=5,mode=620 which makes
the pts devices owned by group 'tty' and writable by that group by
default.  The behavior of the flawed rc.sysinit script results in
the devices owned by the user that created them and that user's
primary group.  This breaks such things as "mesg" and "ytalk" from
working properly.

Version-Release number of selected component (if applicable):
initscripts-7.42-1

How reproducible:
Always

Steps to Reproduce:
1. log in using a pseudo-terminal (ssh, gnome-terminal, etc)
2. ls -l /dev/pts, note group ownership.
3. as root: mount -oremount /dev/pts
4. repeat steps 1/2 and note difference.

Actual Results:  /dev/pts/* are owned by users' primary groups.

Expected Results:  /dev/pts/* should be owned by group tty.

Additional info:
Comment 1 Bill Nottingham 2003-11-17 15:05:50 EST
Can you attach your /etc/fstab? It works for me.
Comment 2 Gerald Britton 2003-11-17 15:37:03 EST
I've seen this on 2 machines sofar, here's the fstab from one:

LABEL=/                 /                       ext3   
noatime,commit=600   1 1
none                    /dev/pts                devpts  gid=5,mode=620
 0 0
LABEL=/home             /home                   ext3   
noatime,commit=600   1 2
none                    /proc                   proc    defaults     
  0 0
none                    /dev/shm                tmpfs   defaults     
  0 0
/dev/hda3               /suspend                vfat    defaults     
  0 0
/dev/hda5               swap                    swap    defaults     
  0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660
noauto,owner,kudzu,ro 0 0

I boot, login in X and open 3 gnome terminals, ls -l /dev/pts:

crw--w----    1 gbritton gbritton 136,   0 Nov 17 15:35 0
crw--w----    1 gbritton gbritton 136,   1 Nov 17 15:35 1
crw--w----    1 gbritton gbritton 136,   2 Nov 17 15:35 2

su and run "mount -oremount /dev/pts" then close and re-open 3
gnome terminals, ls -l /dev/pts:

crw--w----    1 gbritton tty      136,   0 Nov 17 15:36 0
crw--w----    1 gbritton tty      136,   1 Nov 17 15:36 1
crw--w----    1 gbritton tty      136,   2 Nov 17 15:36 2

Comment 3 Bill Nottingham 2003-11-17 15:58:44 EST
Ah, sshd sets the perms itself even if the filesystem doesn't, that's
why I wasn't seeing it. :)
Comment 4 Bill Nottingham 2003-11-17 16:15:20 EST
Fixed in 7.42.1-1.

Note You need to log in before you can comment on or make changes to this bug.