From: Jamie Lokier <jamie@shareable.org>
To: Eric Paris <eparis@redhat.com>
Cc: selinux@tycho.nsa.gov, linux-fsdevel@vger.kernel.org,
linux-security-module@vger.kernel.org, viro@ZenIV.linux.org.uk,
sds@tycho.nsa.gov
Subject: Re: SELinux and access(2), we want to know.
Date: Fri, 8 May 2009 14:14:51 +0100 [thread overview]
Message-ID: <20090508131451.GA3593@shareable.org> (raw)
In-Reply-To: <1241723924.2791.107.camel@localhost.localdomain>
Eric Paris wrote:
> If a process calls access("/etc/shadow", R_OK) I claim
> that we darn sure better return the same result that open("/etc/shadow",
> O_RDONLY) would return. I'm guessing noone is going to argue that
> point.
This is actually wrong in general - and I see that several posters
have repeated it as if it's a fact.
Since the days prior to the new-fangled security models, access() is
supposed to calculate access for the _real_ user and group of the
process doing the access, whereas open() uses the _effective_ user and
group.
It is one of the things access() is useful for, in setuid/setgid programs.
It should be quite obvious that there are corresponding concepts in
modern security models, such as delegated authority, capabilities
etc. which possibly ought to apply to access(), and which possibly
affect how it's audited.
-- Jamie
next prev parent reply other threads:[~2009-05-08 13:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-07 19:18 SELinux and access(2), we want to know Eric Paris
2009-05-07 19:57 ` Serge E. Hallyn
2009-05-07 20:57 ` Eric Paris
2009-05-07 21:28 ` Serge E. Hallyn
2009-05-08 3:51 ` Casey Schaufler
2009-05-08 5:16 ` Eamon Walsh
2009-05-08 12:27 ` Stephen Smalley
2009-05-08 12:46 ` Daniel J Walsh
2009-05-08 14:17 ` Serge E. Hallyn
2009-05-08 14:53 ` Casey Schaufler
2009-05-08 13:05 ` Stephen Smalley
2009-05-08 13:14 ` Jamie Lokier [this message]
2009-05-08 13:29 ` Stephen Smalley
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=20090508131451.GA3593@shareable.org \
--to=jamie@shareable.org \
--cc=eparis@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=viro@ZenIV.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).