1
0
Fork 0
alistair23-linux/ipc
Serge E. Hallyn b0e77598f8 userns: user namespaces: convert several capable() calls
CAP_IPC_OWNER and CAP_IPC_LOCK can be checked against current_user_ns(),
because the resource comes from current's own ipc namespace.

setuid/setgid are to uids in own namespace, so again checks can be against
current_user_ns().

Changelog:
	Jan 11: Use task_ns_capable() in place of sched_capable().
	Jan 11: Use nsown_capable() as suggested by Bastian Blank.
	Jan 11: Clarify (hopefully) some logic in futex and sched.c
	Feb 15: use ns_capable for ipc, not nsown_capable
	Feb 23: let copy_ipcs handle setting ipc_ns->user_ns
	Feb 23: pass ns down rather than taking it from current

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Serge E. Hallyn <serge.hallyn@canonical.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Daniel Lezcano <daniel.lezcano@free.fr>
Acked-by: David Howells <dhowells@redhat.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-23 19:47:08 -07:00
..
Makefile Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
compat.c ipc: initialize structure memory to zero for compat functions 2010-10-27 18:03:13 -07:00
compat_mq.c ipc: initialize structure memory to zero for compat functions 2010-10-27 18:03:13 -07:00
ipc_sysctl.c sysctl ipc: Remove dead binary sysctl support code. 2009-11-12 02:04:54 -08:00
ipcns_notifier.c ipc: do not use a negative value to re-enable msgmni automatic recomputing 2008-07-25 10:53:42 -07:00
mq_sysctl.c sysctl ipc: Remove dead binary sysctl support code. 2009-11-12 02:04:54 -08:00
mqueue.c fs: icache RCU free inodes 2011-01-07 17:50:26 +11:00
msg.c userns: user namespaces: convert several capable() calls 2011-03-23 19:47:08 -07:00
msgutil.c userns: add a user namespace owner of ipc ns 2011-03-23 19:47:07 -07:00
namespace.c userns: user namespaces: convert several capable() calls 2011-03-23 19:47:08 -07:00
sem.c userns: user namespaces: convert several capable() calls 2011-03-23 19:47:08 -07:00
shm.c userns: user namespaces: convert several capable() calls 2011-03-23 19:47:08 -07:00
syscall.c ppc64 sys_ipc breakage in 2.6.34-rc2 2010-03-22 09:57:19 -07:00
util.c userns: user namespaces: convert several capable() calls 2011-03-23 19:47:08 -07:00
util.h userns: user namespaces: convert several capable() calls 2011-03-23 19:47:08 -07:00