[PATCH] Fix security.h compilation with !CONFIG_SECURITY

From: Andi Kleen
Date: Mon Aug 18 2008 - 02:55:48 EST


From: Andi Kleen <ak@xxxxxxxxxxxxxxx>

This recent patch

commit 5cd9c58fbe9ec92b45b27e131719af4f2bd9eb40
Author: David Howells <dhowells@xxxxxxxxxx>
Date: Thu Aug 14 11:37:28 2008 +0100

security: Fix setting of PF_SUPERPRIV by __capable()

broke compilation with !CONFIG_SECURITY:

linux/include/linux/security.h: In function 'security_ptrace_traceme':
linux/include/linux/security.h:1760: error: 'parent' undeclared (first use in this function)

Add the obvious fix.

Cc: David Howells <dhowells@xxxxxxxxxx>
Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
---
include/linux/security.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/security.h b/include/linux/security.h
index 2ee5ecf..0cc23a1 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -1757,7 +1757,7 @@ static inline int security_ptrace_may_access(struct task_struct *child,

static inline int security_ptrace_traceme(struct task_struct *child)
{
- return cap_ptrace_traceme(parent);
+ return cap_ptrace_traceme(child);
}

static inline int security_capget(struct task_struct *target,
--
1.5.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/