From: Vincent Hanquez <tab@snarc.org>
To: Serge Hallyn <serue@us.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Chris Wright <chrisw@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
akpm@osdl.org, netdev@oss.sgi.com
Subject: Re: [PATCH] BSD Jail LSM
Date: Tue, 14 Sep 2004 01:58:28 +0200 [thread overview]
Message-ID: <20040913235828.GA7212@snarc.org> (raw)
In-Reply-To: <1095117605.2350.11.camel@serge.austin.ibm.com>
On Mon, Sep 13, 2004 at 06:20:05PM -0500, Serge Hallyn wrote:
> +#define in_use(x) (x->jail_flags & IN_USE)
> +#define set_in_use(x) (x->jail_flags |= IN_USE)
> +
> +#define got_network(x) (x->jail_flags & (GOT_IPV4 | GOT_IPV6))
> +#define got_ipv4(x) (x->jail_flags & (GOT_IPV4))
> +#define got_ipv6(x) (x->jail_flags & (GOT_IPV6))
> +#define set_ipv4(x) (x->jail_flags |= GOT_IPV4)
> +#define set_ipv6(x) (x->jail_flags |= GOT_IPV6)
> +#define unset_got_ipv4(x) (x->jail_flags &= ~GOT_IPV4)
> +#define unset_got_ipv6(x) (x->jail_flags &= ~GOT_IPV6)
> +
> +#define get_task_security(task) (task->security)
> +#define get_inode_security(inode) (inode->i_security)
> +#define get_sock_security(sock) (sock->sk_security)
> +#define get_file_security(file) (file->f_security)
> +#define get_ipc_security(ipc) (ipc->security)
> +
> +#define jail_of(proc) (get_task_security(proc))
> +
> +#define set_task_security(task,data) task->security = data
> +#define set_inode_security(inode,data) inode->i_security = data
> +#define set_sock_security(sock,data) sock->sk_security = data
> +#define set_file_security(file,data) file->f_security = data
> +#define set_ipc_security(ipc,data) ipc.security = data
Hi Serge,
Do you really need all thoses macros ?
It seems to me that's too much macros for stuff which are easy
to write and to understand.
Just my 2cents,
--
Tab
next prev parent reply other threads:[~2004-09-13 23:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-10 20:21 [PATCH] BSD Jail LSM (1/3) Serge Hallyn
2004-09-10 20:23 ` [PATCH] BSD Jail LSM (2/3) Serge Hallyn
2004-09-10 19:31 ` Alan Cox
2004-09-12 23:33 ` Serge E. Hallyn
2004-09-13 10:56 ` Alan Cox
2004-09-13 15:08 ` Serge E. Hallyn
2004-09-13 23:20 ` [PATCH] BSD Jail LSM Serge Hallyn
2004-09-13 23:58 ` Vincent Hanquez [this message]
2004-09-14 14:04 ` Serge E. Hallyn
2004-09-14 18:13 ` Chris Wright
2004-09-12 21:12 ` [PATCH] BSD Jail LSM (2/3) Herbert Poetzl
2004-09-10 20:23 ` [PATCH] BSD Jail LSM (3/3) Serge Hallyn
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=20040913235828.GA7212@snarc.org \
--to=tab@snarc.org \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=chrisw@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--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.