From: Andries.Brouwer@cwi.nl
To: alan@lxorguk.ukuu.org.uk, tigran@veritas.com, viro@math.psu.edu
Cc: aeb@veritas.com, hugh@veritas.com, linux-kernel@vger.kernel.org
Subject: Re: access() says EROFS even for device files if /dev is mounted RO
Date: Wed, 29 Nov 2000 18:17:38 +0100 (MET) [thread overview]
Message-ID: <UTC200011291717.SAA136039.aeb@aak.cwi.nl> (raw)
From viro@math.psu.edu Wed Nov 29 17:52:57 2000
> Should the majority win? I.e. should we say OK, as we do now?
We should, but we don't. 2.4 does the right thing.
2.2 got the following change back in 2.2.6:
res = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
res = permission(dentry->d_inode, mode);
+ /* SuS v2 requires we report a read only fs too */
+ if(!res && (mode & S_IWOTH) && IS_RDONLY(dentry->d_inode))
+ res = -EROFS;
dput(dentry);
}
... and that's what really ticks me off - permission() does the right
tests in case of read-only fs (ignoring the r/o vs. r/w for devices and
FIFOs), but sys_access() explicitly overrides that.
IMO we should revert that in 2.2. HP/UX is probably hopeless - if they
will ever start caring about bogus behaviour access() will not be anywhere
near the top of their list ;-/
Yes. Alan, it seems we all agree that
--- open.c~ Tue Jan 4 19:12:23 2000
+++ open.c Wed Nov 29 18:14:14 2000
@@ -305,9 +305,6 @@
res = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
res = permission(dentry->d_inode, mode);
- /* SuS v2 requires we report a read only fs too */
- if(!res && (mode & S_IWOTH) && IS_RDONLY(dentry->d_inode))
- res = -EROFS;
dput(dentry);
}
is a good idea.
Andries
-
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/
next reply other threads:[~2000-11-29 17:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-29 17:17 Andries.Brouwer [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-11-27 3:35 Peter Cordes
2000-11-27 12:42 ` Andries Brouwer
2000-11-27 21:47 ` Rogier Wolff
2000-11-28 0:09 ` Andries Brouwer
2000-11-28 14:04 ` Rogier Wolff
2000-11-28 21:37 ` Andries Brouwer
2000-11-29 12:01 ` Hugh Dickins
2000-11-29 12:39 ` Alexander Viro
2000-11-29 15:46 ` Hugh Dickins
2000-11-29 16:18 ` Alexander Viro
2000-11-29 16:40 ` Tigran Aivazian
2000-11-29 16:52 ` Alexander Viro
2000-12-01 17:12 ` Olivier Galibert
2000-12-01 17:59 ` Richard B. Johnson
2000-11-29 16:24 ` Tigran Aivazian
2000-11-29 16:25 ` Tigran Aivazian
2000-11-29 16:42 ` Alexander Viro
2000-11-29 16:58 ` Tigran Aivazian
2000-11-29 17:07 ` Tigran Aivazian
2000-11-29 16:48 ` Hugh Dickins
2000-11-29 14:24 ` Richard B. Johnson
2000-11-28 22:56 ` Peter Cordes
2000-11-28 23:23 ` Alexander Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=UTC200011291717.SAA136039.aeb@aak.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=aeb@veritas.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tigran@veritas.com \
--cc=viro@math.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®