[PATCH 1/1] capabilities: use cap_task_prctl when !CONFIG_SECURITY

From: Serge E . Hallyn
Date: Wed Mar 05 2008 - 09:02:32 EST


capabilities-implement-per-process-securebits.patch introduced
cap_task_prctl() and moved the handling of capability-related
prctl into it. So when !CONFIG_SECURITY, the default
security_task_prctl() needs to call cap_task_prctl() the way
other default hooks call capability helpers when they exist.

This fixes a slew of userspace breakages when
CONFIG_SECURITY=n.

Signed-off-by: Serge E. Hallyn <serue@xxxxxxxxxx>
---
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 83763b0..861d6da 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -2228,7 +2228,7 @@ static inline int security_task_prctl (int option, unsigned long arg2,
unsigned long arg4,
unsigned long arg5, long *rc_p)
{
- return 0;
+ return cap_task_prctl(option, arg2, arg3, arg3, arg5, rc_p);
}

static inline void security_task_reparent_to_init (struct task_struct *p)
--
1.5.1

--
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/