From: Valdis.Kletnieks@vt.edu
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
viro@zeniv.linux.org.uk, Andi Kleen <ak@linux.intel.com>,
chris.mason@oracle.com, josef@redhat.com, agruen@linbit.com,
"Serge E. Hallyn" <serue@us.ibm.com>
Subject: Re: [PATCH 1/4] Cache xattr security drop check for write
Date: Sun, 29 May 2011 09:52:24 -0400 [thread overview]
Message-ID: <95980.1306677144@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Fri, 27 May 2011 15:54:02 PDT." <1306536845-24162-1-git-send-email-andi@firstfloor.org>
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
On Fri, 27 May 2011 15:54:02 PDT, Andi Kleen said:
> @@ -2578,5 +2580,10 @@ int __init get_filesystem_list(char *buf);
> #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
> (flag & __FMODE_NONOTIFY)))
>
> +static inline int is_sgid(mode_t mode)
> +{
> + return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP));
> +}
> +
There has *got* to be a better name for this function.
And having said that, I'm not convinced it's the *right* check - on an SELinux
system, pretty much *all* the files have a security xattr attached to them, and
very few are actually setuid/setgid. So 98% of the time, or more, this will DTWT.
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2011-05-29 13:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-27 22:54 Andi Kleen
2011-05-27 22:54 ` [PATCH 2/4] EXT4: Set NOSEC flag early when there are no xattrs Andi Kleen
2011-05-28 9:08 ` Marco Stornelli
2011-05-28 11:24 ` Chris Mason
2011-05-28 14:43 ` Andi Kleen
2011-05-27 22:54 ` [PATCH 3/4] BTRFS: Set NOSEC early for btrfs Andi Kleen
2011-05-27 22:54 ` [PATCH 4/4] XFS: Set NOSEC flag early when inode has no xattrs Andi Kleen
2011-05-28 11:42 ` [PATCH 1/4] Cache xattr security drop check for write Al Viro
2011-05-29 13:52 ` Valdis.Kletnieks [this message]
2011-05-29 14:24 ` Andi Kleen
2011-05-29 17:48 ` Valdis.Kletnieks
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=95980.1306677144@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=agruen@linbit.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=chris.mason@oracle.com \
--cc=josef@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
--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
all inboxes | Powered by JetHome®