public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] (2.4.26-rc3-mm2) -mm Update CAP_LAST_CAP to reflect CAP_MAC_ADMIN
@ 2007-11-29  0:26 Casey Schaufler
  2007-11-29  2:50 ` Serge E. Hallyn
  0 siblings, 1 reply; 2+ messages in thread
From: Casey Schaufler @ 2007-11-29  0:26 UTC (permalink / raw)
  To: akpm, torvalds; +Cc: linux-kernel, linux-security-module

From: Casey Schaufler <casey@schaufler-ca.com>

Bump the value of CAP_LAST_CAP to reflect the current last cap value.
It appears that the patch that introduced CAP_LAST_CAP and the patch
that introduced CAP_MAC_ADMIN came in more or less at the same time.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>

---

 include/linux/capability.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


diff -uprN -X linux-2.6.24-rc3-mm2-base/Documentation/dontdiff linux-2.6.24-rc3-mm2-base/include/linux/capability.h linux-2.6.24-rc3-mm2-lastcap/include/linux/capability.h
--- linux-2.6.24-rc3-mm2-base/include/linux/capability.h	2007-11-27 16:47:02.000000000 -0800
+++ linux-2.6.24-rc3-mm2-lastcap/include/linux/capability.h	2007-11-28 14:04:57.000000000 -0800
@@ -315,10 +315,6 @@ typedef struct kernel_cap_struct {
 
 #define CAP_SETFCAP	     31
 
-#define CAP_LAST_CAP         CAP_SETFCAP
-
-#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
-
 /* Override MAC access.
    The base kernel enforces no MAC policy.
    An LSM may enforce a MAC policy, and if it does and it chooses
@@ -336,6 +332,10 @@ typedef struct kernel_cap_struct {
 
 #define CAP_MAC_ADMIN        33
 
+#define CAP_LAST_CAP         CAP_MAC_ADMIN
+
+#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
+
 /*
  * Bit location of each capability (used by user-space library and kernel)
  */


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] (2.4.26-rc3-mm2) -mm Update CAP_LAST_CAP to reflect CAP_MAC_ADMIN
  2007-11-29  0:26 [PATCH] (2.4.26-rc3-mm2) -mm Update CAP_LAST_CAP to reflect CAP_MAC_ADMIN Casey Schaufler
@ 2007-11-29  2:50 ` Serge E. Hallyn
  0 siblings, 0 replies; 2+ messages in thread
From: Serge E. Hallyn @ 2007-11-29  2:50 UTC (permalink / raw)
  To: Casey Schaufler; +Cc: akpm, torvalds, linux-kernel, linux-security-module

Quoting Casey Schaufler (casey@schaufler-ca.com):
> From: Casey Schaufler <casey@schaufler-ca.com>
> 
> Bump the value of CAP_LAST_CAP to reflect the current last cap value.
> It appears that the patch that introduced CAP_LAST_CAP and the patch
> that introduced CAP_MAC_ADMIN came in more or less at the same time.
> 
> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>

Signed-off-by: Serge Hallyn <serue@us.ibm.com>


> 
> ---
> 
>  include/linux/capability.h |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> 
> diff -uprN -X linux-2.6.24-rc3-mm2-base/Documentation/dontdiff linux-2.6.24-rc3-mm2-base/include/linux/capability.h linux-2.6.24-rc3-mm2-lastcap/include/linux/capability.h
> --- linux-2.6.24-rc3-mm2-base/include/linux/capability.h	2007-11-27 16:47:02.000000000 -0800
> +++ linux-2.6.24-rc3-mm2-lastcap/include/linux/capability.h	2007-11-28 14:04:57.000000000 -0800
> @@ -315,10 +315,6 @@ typedef struct kernel_cap_struct {
> 
>  #define CAP_SETFCAP	     31
> 
> -#define CAP_LAST_CAP         CAP_SETFCAP
> -
> -#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
> -
>  /* Override MAC access.
>     The base kernel enforces no MAC policy.
>     An LSM may enforce a MAC policy, and if it does and it chooses
> @@ -336,6 +332,10 @@ typedef struct kernel_cap_struct {
> 
>  #define CAP_MAC_ADMIN        33
> 
> +#define CAP_LAST_CAP         CAP_MAC_ADMIN
> +
> +#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
> +
>  /*
>   * Bit location of each capability (used by user-space library and kernel)
>   */
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-29  2:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-29  0:26 [PATCH] (2.4.26-rc3-mm2) -mm Update CAP_LAST_CAP to reflect CAP_MAC_ADMIN Casey Schaufler
2007-11-29  2:50 ` Serge E. Hallyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox