Linux Container Development
 help / color / mirror / Atom feed
From: sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
To: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
Cc: Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>,
	Oleg Nesterov <oleg-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>,
	Pavel Emelianov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
Subject: [PATCH] Fix capability.c to work with threaded init
Date: Fri, 17 Aug 2007 18:30:04 -0700	[thread overview]
Message-ID: <20070818013004.GA29859@us.ibm.com> (raw)


From: Sukadev Bhattiprolu <sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH] Fix capability.c to work with threaded init

When setting capabilities, cap_set_all() must skip all threads of the
container_init process - not just the main thread. 

Signed-off-by: Sukadev Bhattiprolu <sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
 kernel/capability.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.23-rc2-mm2/kernel/capability.c
===================================================================
--- 2.6.23-rc2-mm2.orig/kernel/capability.c	2007-08-17 17:33:17.000000000 -0700
+++ 2.6.23-rc2-mm2/kernel/capability.c	2007-08-17 17:33:17.000000000 -0700
@@ -137,7 +137,7 @@ static inline int cap_set_all(kernel_cap
      int found = 0;
 
      do_each_thread(g, target) {
-             if (target == current || is_container_init(target))
+             if (target == current || is_container_init(target->group_leader))
                      continue;
              found = 1;
 	     if (security_capset_check(target, effective, inheritable,

             reply	other threads:[~2007-08-18  1:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-18  1:30 sukadev-r/Jw6+rmf7HQT0dZR+AlfA [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-03  6:26 [PATCH] Fix capability.c to work with threaded init sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found] ` <20070803062610.GB16833-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-08-03 16:51   ` Dave Hansen
2007-08-03 17:29     ` Oleg Nesterov
     [not found]       ` <20070803172934.GB3783-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>
2007-08-03 20:51         ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA

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=20070818013004.GA29859@us.ibm.com \
    --to=sukadev-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=akpm-3NddpPZAyC0@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=oleg-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org \
    --cc=xemul-GEFAQzZX7r8dnm+yROfE0A@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