[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <95980.1306677144@turing-police.cc.vt.edu>
Date: Sun, 29 May 2011 09:52:24 -0400
From: Valdis.Kletnieks@...edu
To: Andi Kleen <andi@...stfloor.org>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
viro@...iv.linux.org.uk, Andi Kleen <ak@...ux.intel.com>,
chris.mason@...cle.com, josef@...hat.com, agruen@...bit.com,
"Serge E. Hallyn" <serue@...ibm.com>
Subject: Re: [PATCH 1/4] Cache xattr security drop check for write
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.
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists