[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1229691171.4948.3.camel@localhost.localdomain>
Date: Fri, 19 Dec 2008 07:52:51 -0500
From: Stephen Smalley <sds@...ho.nsa.gov>
To: James Morris <jmorris@...ei.org>
Cc: linux-security-module@...r.kernel.org,
Alexey Dobriyan <adobriyan@...il.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
David Miller <davem@...emloft.net>, auke-jan.h.kok@...el.com,
Andrew Morton <akpm@...ux-foundation.org>,
e1000-devel@...ts.sourceforge.net, netdev@...r.kernel.org,
Eric Paris <eparis@...isplace.org>,
Al Viro <viro@....linux.org.uk>,
Chris Wright <chrisw@...s-sol.org>
Subject: Re: [PATCH 3/3][RFC] SELinux: don't check permissions for kernel
mounts
On Fri, 2008-12-19 at 12:07 +1100, James Morris wrote:
> Don't bother checking permissions when the kernel performs an internal
> mount, as this should always be allowed.
>
> Signed-off-by: James Morris <jmorris@...ei.org>
Acked-by: Stephen Smalley <sds@...ho.nsa.gov>
> ---
> security/selinux/hooks.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index 3897758..4a44903 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -2461,6 +2461,10 @@ static int selinux_sb_kern_mount(struct super_block *sb, int flags, void *data)
> if (rc)
> return rc;
>
> + /* Allow all mounts performed by the kernel */
> + if (flags & MS_KERNMOUNT)
> + return 0;
> +
> AVC_AUDIT_DATA_INIT(&ad, FS);
> ad.u.fs.path.dentry = sb->s_root;
> return superblock_has_perm(current, sb, FILESYSTEM__MOUNT, &ad);
--
Stephen Smalley
National Security Agency
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists