Re: Strange behaviour of devfs wrt /dev/tty

Gerhard Mack (gmack@imag.net)
Sat, 25 Apr 1998 22:54:51 -0700 (PDT)


On Sun, 26 Apr 1998, Richard Gooch wrote:

> Gerhard Mack writes:
> >
> > I get this without devfs.
> >
> > On Sun, 26 Apr 1998, Richard Gooch wrote:
> >
> > > Roderich Schupp writes:
> > > > I noticed the following strange behaviour with devfs (patch-v27,
> > > > kernel 2.1.98). If some program opens /dev/tty (e.g. "cat < /dev/tty")
> > > > /dev/tty suddenly changes owner/group (to the uid/gid of the
> > > > program opening the device) and permissions (600). The problem is:
> > > > all other processes on the system see the _same_ permissions
> > > > of /dev/tty. Shouldn't that be visible only to the processes with
> > > > the same controlling terminal?
>
> So you are getting /dev/tty ownership/permissions changes *without*
> devfs? That's strange. What are the permissions before and after some
> random user opens /dev/tty ?

I seriously don't know what is doing this, it's something that has had me
wondering.
I am willing to poke around some more if you want, just tell me where to
look. This is without devfs.

Gerhard

crw-rw---- 1 root root 4, 0 Feb 7 1996 tty0
crw--w---- 1 gmack tty 4, 1 Apr 25 22:38 tty1
crw--w---- 1 gmack tty 4, 2 Apr 25 22:38 tty2
crw--w---- 1 gmack tty 4, 3 Apr 25 22:28 tty3
crw------- 1 gmack tty 4, 4 Apr 25 22:36 tty4
crw------- 1 root tty 4, 5 Apr 25 22:38 tty5
crw--w---- 1 gmack tty 4, 6 Apr 25 21:44 tty6
crw-rw---- 1 root root 4, 7 Apr 6 16:27 tty7
crw-rw---- 1 dan dan 4, 8 Dec 31 1979 tty8
crw-rw---- 1 root tty 4, 9 Nov 10 07:39 tty9

[gmack@localhost gmack]$ finger
Login Name Tty Idle Login Time Office Office Phone
dan RHS Linux User *p0 Apr 25 17:32 (ghm)
gmack Gerhard Mack 1 Apr 25 12:34
gmack Gerhard Mack 2 4 Apr 25 12:35
gmack Gerhard Mack 3 Apr 25 12:49
gmack Gerhard Mack *4 Apr 25 15:19
gmack Gerhard Mack 6 1:31 Apr 25 19:03
root root *5 30 Apr 25 13:23

ghm=telnet session by the windows machine from hell (hate fixing it)

--
Gerhard Mack
irc admin centurion.starchat.net

gmack@imag.net innerfire@starchat.net

As a computer I find your faith in technology amusing.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu