Borsenkow Andrej writes:
> On ðÎÄ, 2002-02-18 at 00:52, Richard Gooch wrote:
> > > - still devfs documentation tells us we should not use devpts with
> > > devfs; and I am not sure who wins. pty.c registers /dev/pts/? with
> > > current owner and 600 permissions; and here I have
> > >
> > > {pts/1}% ll /dev/pts
> > > иÑ'ого 0
> > > crw--w---- 1 bor bor 136, 0 ÐÇÐ?Ð? 16 16:11 0
> > > crw------- 1 bor bor 136, 1 ÐÇÐ?Ð? 16 17:05 1
> > > crw------- 1 bor bor 136, 2 ÐÇÐ?Ð? 16 17:03 2
> > > crw------- 1 bor bor 136, 3 ÐÇÐ?Ð? 16 17:04 3
> > >
> > > that looks like pts/0 got permissions from devpts and others from devfs
> > > because default mount for devpts here is 640
> >
> > I doubt that. More likely some programme changed the permissions for
> > pts/0 (perhaps xconsole or th Gnome equivalent?).
>
> I booted without mounted devpts and all of them have the same
> permissions:
>
> {pts/2}% LANGUAGE=en LC_TIME=en ll /dev/pts
> total 0
> crw------- 1 bor bor 136, 0 Jan 1 1970 0
> crw------- 1 bor bor 136, 1 Feb 18 22:51 1
> crw------- 1 bor bor 136, 2 Feb 18 22:55 2
Interesting.
> may be there are different ways to open pty and they take different
> paths.
Could be. If so, it's most likely to be in the glibc PTY allocation
code. It wouldn't surprise me, considering how much bloated shit is
already in glibc. I know that they had hard-wired Unix98 PTY
allocation to devpts at one point, and needed a patch to support devfs
as well (which was added). Instead of their pointless hard-wiring,
they could have just dropped that code and it would work automatically
irrespective of the FS type.
> But this imply that we really should not use devpts due to
> possiblilty of permissions not being applied.
Looks like it. Sigh. It would be nice if someone could do some
stracing to figure out what was being done behind the covers.
Regards,
Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current: rgooch@xxxxxxxxxxxxxxx
|