From: Tycho Andersen <tycho@docker.com>
To: Guilherme Magalhaes <guilherme.magalhaes@hpe.com>
Cc: dmitry.kasatkin@gmail.com, zohar@linux.vnet.ibm.com,
viro@zeniv.linux.org.uk, james.l.morris@oracle.com,
serge@hallyn.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-ima-devel@lists.sourceforge.net,
linux-ima-user@lists.sourceforge.net,
linux-security-module@vger.kernel.org, joaquims@hpe.com,
nigel.edwards@hpe.com
Subject: Re: [RFC 04/11] ima: add support to namespace securityfs file
Date: Thu, 18 May 2017 15:39:39 -0600 [thread overview]
Message-ID: <20170518213939.mrvuzxf3kdqqnemc@docker> (raw)
In-Reply-To: <1494511203-8397-5-git-send-email-guilherme.magalhaes@hpe.com>
Hi Guilherme,
On Thu, May 11, 2017 at 10:59:56AM -0300, Guilherme Magalhaes wrote:
> +static int ima_open_namespaces(struct inode *inode, struct file *filp)
> +{
> + if (!(filp->f_flags & O_WRONLY))
> + return -EACCES;
> +
> + if (!capable(CAP_SYS_ADMIN))
> + return -EPERM;
> +
> + if (test_and_set_bit(IMA_FS_BUSY, &ima_fs_flags))
> + return -EBUSY;
It probably makes sense to do something like:
if (!(ima_appraise & IMA_APPRAISE_NAMESPACE))
return -EINVAL;
here.
I'll keep playing around with this patchset and see if I have any
other feedback.
Cheers,
Tycho
next prev parent reply other threads:[~2017-05-18 21:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 13:59 [RFC 00/11] ima: namespace support for IMA policy Guilherme Magalhaes
2017-05-11 13:59 ` [RFC 01/11] ima: qualify pathname in audit info record Guilherme Magalhaes
2017-05-11 13:59 ` [RFC 02/11] ima: qualify pathname in audit measurement record Guilherme Magalhaes
2017-05-11 13:59 ` [RFC 03/11] ima: qualify pathname in measurement file Guilherme Magalhaes
2017-05-11 13:59 ` [RFC 04/11] ima: add support to namespace securityfs file Guilherme Magalhaes
2017-05-18 21:39 ` Tycho Andersen [this message]
2017-05-24 20:12 ` Mimi Zohar
2017-05-25 7:36 ` John Johansen
2017-05-25 11:46 ` Mimi Zohar
2017-05-25 19:04 ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-05-29 17:32 ` Mimi Zohar
2017-05-31 9:49 ` Dr. Greg Wettstein
2017-05-11 13:59 ` [RFC 05/11] ima: store new namespace policy structure in a radix tree Guilherme Magalhaes
2017-05-11 13:59 ` [RFC 06/11] ima, fs: release namespace policy resources Guilherme Magalhaes
2017-05-11 13:59 ` [RFC 07/11] ima: new namespace policy structure to track initial namespace policy data Guilherme Magalhaes
2017-05-11 14:00 ` [RFC 08/11] ima: block initial namespace id on the namespace policy interface Guilherme Magalhaes
2017-05-11 14:00 ` [RFC 09/11] ima: delete namespace policy securityfs file in write-once mode Guilherme Magalhaes
2017-05-11 14:00 ` [RFC 10/11] ima: handling all policy flags per namespace using ima_ns_policy structure Guilherme Magalhaes
2017-05-11 14:53 ` [RFC 00/11] ima: namespace support for IMA policy Magalhaes, Guilherme (Brazil R&D-CL)
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=20170518213939.mrvuzxf3kdqqnemc@docker \
--to=tycho@docker.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=guilherme.magalhaes@hpe.com \
--cc=james.l.morris@oracle.com \
--cc=joaquims@hpe.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-ima-devel@lists.sourceforge.net \
--cc=linux-ima-user@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=nigel.edwards@hpe.com \
--cc=serge@hallyn.com \
--cc=viro@zeniv.linux.org.uk \
--cc=zohar@linux.vnet.ibm.com \
/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).