OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] Fix capability.c to work with threaded init
[PATCH] Fix capability.c to work with threaded init [message #19726] Sat, 18 August 2007 01:30
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
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@us.ibm.com>
---
 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,
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Previous Topic: [PATCH] Isolate some explicit usage of task->tgid
Next Topic: Memory controller test results (v6)
Goto Forum:
  


Current Time: Wed Aug 27 08:54:49 GMT 2025

Total time taken to generate the page: 0.10260 seconds