* [PATCH linux-cr] always restore msg_msg label
@ 2010-03-09 6:13 Serge E. Hallyn
[not found] ` <20100309061301.GA21905-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Serge E. Hallyn @ 2010-03-09 6:13 UTC (permalink / raw)
To: Oren Laadan; +Cc: Linux Containers
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux-cr] always restore msg_msg label
[not found] ` <20100309061301.GA21905-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
@ 2010-03-15 2:53 ` Oren Laadan
0 siblings, 0 replies; 2+ messages in thread
From: Oren Laadan @ 2010-03-15 2:53 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: Linux Containers
In v20-rc1.
Serge E. Hallyn wrote:
> 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))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-15 2:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-09 6:13 [PATCH linux-cr] always restore msg_msg label Serge E. Hallyn
[not found] ` <20100309061301.GA21905-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-15 2:53 ` Oren Laadan
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.