From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: [PATCH linux-cr] always restore msg_msg label
Date: Tue, 9 Mar 2010 00:13:01 -0600 [thread overview]
Message-ID: <20100309061301.GA21905@us.ibm.com> (raw)
Hi Oren,
In comparing your ckpt-v19-dev-serge branch to my local one I
noticed this patch was missing, then realized I hadn't sent it
separately, but only inline with a response to Nathan.
Please do apply.
Without this patch, selinux labels will not be restored on msg_msg's in
message queues (because we didn't send the restored msg_msg through
msgsnd), and the restored task won't have the permission to receive the
messages.
As I mentioned in that thread, simply re-routing the restored
msg_msg through msgsnd doesn't really suffice because the msg_msg
label is calculated as a product of the msgq and sending task
labels, and the latter may have already changed.
thanks,
-serge
Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
security/security.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/security/security.c b/security/security.c
index 28db976..2b147cf 100644
--- a/security/security.c
+++ b/security/security.c
@@ -1524,7 +1524,9 @@ int security_restore_obj(struct ckpt_ctx *ctx, void *v, int sectype,
/* return if caller didn't want to restore checkpointed labels */
if (!(ctx->uflags & RESTART_KEEP_LSM))
- return 0;
+ /* though msg_msg label must always be restored */
+ if (sectype != CKPT_SECURITY_MSG_MSG)
+ return 0;
l = ckpt_obj_fetch(ctx, secref, CKPT_OBJ_SECURITY);
if (IS_ERR(l))
--
1.6.0.6
next reply other threads:[~2010-03-09 6:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 6:13 Serge E. Hallyn [this message]
[not found] ` <20100309061301.GA21905-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-15 2:53 ` [PATCH linux-cr] always restore msg_msg label Oren Laadan
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=20100309061301.GA21905@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=orenl-eQaUEPhvms7ENvBUuze7eA@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