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
    just to add (obvious!) -- whenever "uid" was mentioned I implied "uid and
    gid"...

    On Wed, 29 Nov 2000, Tigran Aivazian wrote:

    > On Wed, 29 Nov 2000, Hugh Dickins wrote:
    > > Sorry, I missed the point at issue here, and what changed when.
    > > Assuming (perhaps wrongly) it's independent of filesystem type,
    > >
    > > Solaris yes ok ok
    > > HP-UX yes EROFS ok
    > >
    > > I don't have UnixWare or OpenServer at hand to test,
    > > guess UnixWare as Solaris, can report OpenServer tomorrow.
    > > But it looks like a Floridan answer.
    >
    > Hugh,
    >
    > The classical interpretation of the access(2) system call is "do the same
    > type of permission check as open(2) would do but using real uid in the
    > credentials instead of effective (or on Linux fs) uid". So, the typical
    > logic of access() would be:
    >
    > duplicate credential structure
    > replace euid with ruid (or with fsuid on Linux)
    > install this tmp credential in the LWP (or task in Linux)
    > do the same sort of lookupname() as open() would do
    > restore saved credentials back
    >
    > 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.
    >
    > 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...
    >
    >

    -
    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.024 / U:0.152 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site