From: Seth Arnold <seth.arnold@suse.de>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
Stephen Smalley <sds@tycho.nsa.gov>,
James Morris <jmorris@namei.org>,
chris friedhoff <chris@friedhoff.org>,
Chris Wright <chrisw@sous-sol.org>, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 1/1] security: introduce file posix caps
Date: Tue, 7 Nov 2006 13:54:44 -0800 [thread overview]
Message-ID: <20061107215444.GO30208@suse.de> (raw)
In-Reply-To: <20061107034550.GA13693@sergelap.austin.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 970 bytes --]
On Mon, Nov 06, 2006 at 09:45:50PM -0600, Serge E. Hallyn wrote:
> #define CAP_AUDIT_CONTROL 30
>
> +#define CAP_NUMCAPS 31
[...]
> +struct vfs_cap_data_struct {
> + __u32 version;
> + __u32 effective;
> + __u32 permitted;
> + __u32 inheritable;
> +};
[...]
> +static int check_cap_sanity(struct vfs_cap_data_struct *cap)
> +{
> + int i;
> +
> + if (cap->version != _LINUX_CAPABILITY_VERSION)
> + return -EPERM;
> +
> + for (i=CAP_NUMCAPS; i<sizeof(cap->effective); i++) {
> + if (cap->effective & CAP_TO_MASK(i))
> + return -EPERM;
> + }
> + for (i=CAP_NUMCAPS; i<sizeof(cap->permitted); i++) {
> + if (cap->permitted & CAP_TO_MASK(i))
> + return -EPERM;
> + }
> + for (i=CAP_NUMCAPS; i<sizeof(cap->inheritable); i++) {
> + if (cap->inheritable & CAP_TO_MASK(i))
> + return -EPERM;
> + }
> +
> + return 0;
> +}
for (i=31; i<4; i++) ...
I'm not sure this checks what you think it checks? :)
Thanks
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-11-07 21:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-07 3:45 [PATCH 1/1] security: introduce file posix caps Serge E. Hallyn
2006-11-07 12:27 ` KaiGai Kohei
2006-11-07 14:56 ` Stephen Smalley
2006-11-07 15:10 ` Serge E. Hallyn
2006-11-07 15:26 ` Stephen Smalley
2006-11-07 16:43 ` Serge E. Hallyn
2006-11-07 18:45 ` Serge E. Hallyn
2006-11-07 21:54 ` Seth Arnold [this message]
2006-11-07 22:06 ` Serge E. Hallyn
2006-11-08 5:32 ` Serge E. Hallyn
2006-11-08 18:50 ` Chris Friedhoff
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=20061107215444.GO30208@suse.de \
--to=seth.arnold@suse.de \
--cc=akpm@osdl.org \
--cc=chris@friedhoff.org \
--cc=chrisw@sous-sol.org \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=serue@us.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.