lkml.org 
[lkml]   [2000]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: access() says EROFS even for device files if /dev is mounted RO


On Wed, 29 Nov 2000, Hugh Dickins wrote:

> On Tue, 28 Nov 2000, Andries Brouwer wrote:
> > On Tue, Nov 28, 2000 at 03:04:31PM +0100, Rogier Wolff wrote:
> >
> > > Ok, so if you read the standard carefully you get a bogus result.
> >
> > Why bogus? Things could have been otherwise, but the important
> > part is that all Unices do things the same way.
>
> Yes, and I think you'll have difficulty, Andries, finding
> any other Unices which interpret the standard as you and
> Linux do: Solaris, HP-UX, UnixWare and OpenServer all allow
> writing to a device node (or FIFO) on read-only filesystem.

Hold on. What do they return upon access()? I've looked through the
available kernel sources and results are:
has r/o filesystems access() open()
v3: no
v5, v6: yes N/A EROFS
v7: yes EROFS EROFS
PDP versions of BSD prior to 2.10, Ultrix 3.1, SysIII, PWB: same as v7
4.4BSD: yes ok ok
{Free,Net,Open}BSD, Linux prior to 2.2.6 and post 2.4.0-test9-pre7: ditto
2.10BSD, 2.10.1BSD, 2.11BSD: ditto
4.3-Tahoe and later: ditto, judging by date of 2.10 release.

What you are saying is that recent SysV variants have
yes ? ok
Nice, but what do they do on access()? If they do not return EROFS for
devices - that's it, standard needs to be fixed and 2.2 should drop the
special-casing in sys_access().

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:47    [W:0.059 / U:1.120 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site