Quoting Jiri Slaby (jirislaby@gmail.com):Thanks, Jiri. Does the following patch work for you? This patch address the !CONFIG_SECURITY case, but not the case of using the dummy LSM. The default these days is to have capabilities compiled in no matter what, but it is still possible to have CONFIG_SECURITY=y and CONFIG_SECURITY_CAPABILITIES=n, in which case prctl(0x8) will return -EINVAL. Do we want dummy to call cap_prctl() as well, or are we ok with userspace getting -EINVAL given that there are in fact no capabilities at that point and the userspace code is clearly expecting them? thanks, -serge From 4a66f19580489a3ac84f0a145e4585c09e65c88e Mon Sep 17 00:00:00 2001 From: Serge E. Hallyn <serue@us.ibm.com> Date: Wed, 5 Mar 2008 06:02:32 -0800 Subject: [PATCH 1/1] capabilities: use cap_task_prctl when !CONFIG_SECURITY 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@us.ibm.com> --- 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 --
| Linus Torvalds | Linux 2.6.27-rc8 |
| Trent Piepho | [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
| Satyam Sharma | Re: 2.6.23-rc4-mm1 "no CRC" MODPOST warnings |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| Bill Lear | Dangers of working on a tracking branch |
| Jeff King | Re: What's cooking in git/spearce.git (topics) |
| Jason Garber | git push [rejected] question |
| Maxim Gordienko | [GIT-P4] usage under Windows |
| Richard Stallman | Real men don't attack straw men |
| Leon Dippenaar | New tcp stack attack |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Brandon Lee | DELL PERC 5iR slow performance |
| Jeff Garzik | Re: [PATCH] drivers/net: remove network drivers' last few uses of IRQF_SAMPLE_RANDOM |
| Paul Moore | [PATCH v7 00/17] Labeled networking patches for 2.6.28 |
| Denys Vlasenko | Re: bnx2 dirver's firmware images |
| Herbert Xu | Re: csum offload and af_packet |
