From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: [PATCH 1/1] cr: allocate security context for msg_msg
Date: Thu, 02 Jul 2009 06:08:34 -0400 [thread overview]
Message-ID: <4A4C8722.1040704@cs.columbia.edu> (raw)
In-Reply-To: <20090630201950.GA22761-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Applied to v17.
Oren.
Serge E. Hallyn wrote:
> Since we create msg_msg structs by hand, we also need to
> ask LSM to allocate a security context. Otherwise
> selinux_msg_queue_msgrcv will throw a fit dereferencing
> msg->security (6b6b6b6b6b6b6000).
>
> With this patch, cr tests can be executed with selinux
> enabled.
>
> Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
> ipc/checkpoint_msg.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/ipc/checkpoint_msg.c b/ipc/checkpoint_msg.c
> index 51385b0..fca8e7d 100644
> --- a/ipc/checkpoint_msg.c
> +++ b/ipc/checkpoint_msg.c
> @@ -17,6 +17,7 @@
> #include <linux/sched.h>
> #include <linux/syscalls.h>
> #include <linux/nsproxy.h>
> +#include <linux/security.h>
> #include <linux/ipc_namespace.h>
>
> #include "util.h"
> @@ -248,6 +249,8 @@ static struct msg_msg *restore_msg_contents_one(struct ckpt_ctx *ctx, int *clen)
> msg->m_type = h->m_type;
> msg->m_ts = h->m_ts;
> *clen = h->m_ts;
> + ret = security_msg_msg_alloc(msg);
> +
> out:
> if (ret < 0 && msg) {
> free_msg(msg);
next prev parent reply other threads:[~2009-07-02 10:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-30 20:19 [PATCH 1/1] cr: allocate security context for msg_msg Serge E. Hallyn
[not found] ` <20090630201950.GA22761-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-07-02 10:08 ` Oren Laadan [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-06-25 18:57 Serge E. 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=4A4C8722.1040704@cs.columbia.edu \
--to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
/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