patch-2.2.11 linux/include/linux/capability.h

Next file: linux/include/linux/coda.h
Previous file: linux/include/linux/blkdev.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.10/linux/include/linux/capability.h linux/include/linux/capability.h
@@ -264,6 +264,10 @@
 #define CAP_SYS_TTY_CONFIG   26
 
 #ifdef __KERNEL__
+/* 
+ * Bounding set
+ */
+extern kernel_cap_t cap_bset;
 
 /*
  * Internal kernel functions only
@@ -289,7 +293,7 @@
 #define CAP_TO_MASK(x) (1 << (x))
 #define cap_raise(c, flag)   (cap_t(c) |=  CAP_TO_MASK(flag))
 #define cap_lower(c, flag)   (cap_t(c) &= ~CAP_TO_MASK(flag))
-#define cap_raised(c, flag)  (cap_t(c) &   CAP_TO_MASK(flag))
+#define cap_raised(c, flag)  (cap_t(c) & CAP_TO_MASK(flag) & cap_bset)
 
 static inline kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b)
 {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)