Re: access() says EROFS even for device files if /dev is mounted RO

From: Alexander Viro (viro@math.psu.edu)
Date: Wed Nov 29 2000 - 11:42:18 EST


On Wed, 29 Nov 2000, Tigran Aivazian wrote:

> All I am saying is that if open on HP/UX allows writing but access denies
> it, it is definitely a bug (in HP/UX). Let's remember why access(2) was
> invented at all -- to allow setuid-privileged programs to do permission
> checks based on real uid instead of relying on open(2) to fail. This
> should make it clear that the two (access(2) and open(2)) should behave
> identically modulo the euid->ruid transformation.

Umm... Correction: open() may fail when access() succeeds (e.g. if you've
got too many opened descriptors, etc.), but it shouldn't be other way
round. However, if access() returns an error open() should also fail.
 
> Regards,
> Tigran
>
> PS. This is the sort of dicussion where openly showing snippets of
> proprietary UNIX source code would benefit but, alas, we can't...

Considering your previous workplace... How does official SVR{4,5} behave?

-
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/



This archive was generated by hypermail 2b29 : Thu Nov 30 2000 - 21:00:22 EST