devfs
[Top] [All Lists]

Re: devfs + xinit Authentication error

To: Matthew Vanecek <linuxguy@xxxxxxxxxxxxxx>
Subject: Re: devfs + xinit Authentication error
From: Richard Gooch <rgooch@xxxxxxxxxxxxx>
Date: Wed, 1 Mar 2000 19:21:08 +1100
Cc: devfs@xxxxxxxxxxx, Douglas Gilbert <dgilbert@xxxxxxxxxxxx>
In-reply-to: <38BCA8B6.149CA8B@directlink.net>
References: <fa.g5td4cv.m0as2k@ifi.uio.no> <38BCA8B6.149CA8B@directlink.net>
Sender: owner-devfs@xxxxxxxxxxx
Matthew Vanecek writes:
> Douglas Gilbert wrote:
> > 
> > I'm trying to use devfs (with the default configuration of devfsd) on
> > a slightly modified RH 6.0 i386 platform. When I call startx it fails
> > with an authentication error in xinit. [Works with the classic /dev .]
> > Any guidance?
> > 
> > Doug Gilbert
> 
> 
> I'm having the exact same problem, on 2.3.48.  It complains that I might
> not own the console.  /dev/tty0 exists, and is a link to /dev/vc/0.  The
> permissions on it are a little weird:
> 
> lr-xr-xr-x   1 root     root            0 Feb 29 15:50 /dev/tty0 -> vc/0

Nothing weird about it. Symlink permissions basically don't matter.

> I've tried changing them with a PERMISSIONS string in devfsd.conf and
> directly, but of course chmod does not work on links--only on the file
> that the link points to.  And evidently, X thinks that it cannot write
> to tty0, because tty0 (and *all* the symlinks, every last one of them
> under /dev) do not have the write bit set.  Admittedly, this is not a
> problem on such devices as /dev/cdrom, or other read-only media, but
> when you have apps with the old names hard-coded (like X), and want to
> make symlinks to satisfy those hard-codings, but the symlinks won't let
> you make them lrwxrwxrwx, you can get rather frustrated.
> 
> root@reliant:/dev$ ls -l tty0
> lr-xr-xr-x   1 root     root            0 Feb 29 15:50 tty0 -> vc/0
> root@reliant:/dev$ rm -f tty0
> root@reliant:/dev$ ls -l tty0
> ls: tty0: No such file or directory
> root@reliant:/dev$ ln -sf vc/0 tty0
> root@reliant:/dev$ ls -l tty0
> lr-xr-xr-x   1 root     root            0 Feb 29 23:07 tty0 -> vc/0
> 
> This would seem to be a fairly major failing in either devfs or
> devfsd.  Is it a known bug, or really a bug?  How do we fix it?  It
> doesn't seem to be documented anywhere.  I've tried playing with the
> umask, and deleting/recreating symlinks, but nothing seems to work.
> Is there some undocumented configuration option that I should know
> about?

The bug is in X. It should use stat(2) or access(2) and not lstat(2)
to figure permissions. Assuming that's what X is doing. The bug isn't
in devfs/devfsd.

> TIA for answers.  devfs has gone through some extreme changes since
> 2.2.x.  Once upon a time, it was fairly effortless and bug-free, and
> compiling the patch into the kernel was really all that was
> required.  Now, it seems needlessly complicated.  For systems
> developers, I guess that's not an issue--as they like to spend
> extraordinary amounts of time in making a system work, as opposed to
> the rest of us who just want to use the system.

Blame Linus for the name changes. In time, he expects distributions to
see the merit in the new names and move over to devfs wholesale.

                                Regards,

                                        Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current:   rgooch@xxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>