capabilities: remove task_ns_* functions
authorEric Paris <eparis@redhat.com>
Tue, 3 Jan 2012 17:25:15 +0000 (12:25 -0500)
committerEric Paris <eparis@redhat.com>
Thu, 5 Jan 2012 23:52:59 +0000 (18:52 -0500)
commitf1c84dae0ecc51aa35c81f19a0ebcd6c0921ddcb
tree59d729bb7806e42a13f0ec1657c90b717c314002
parentd2a7009f0bb03fa22ad08dd25472efa0568126b9
capabilities: remove task_ns_* functions

task_ in the front of a function, in the security subsystem anyway, means
to me at least, that we are operating with that task as the subject of the
security decision.  In this case what it means is that we are using current as
the subject but we use the task to get the right namespace.  Who in the world
would ever realize that's what task_ns_capability means just by the name?  This
patch eliminates the task_ns functions entirely and uses the has_ns_capability
function instead.  This means we explicitly open code the ns in question in
the caller.  I think it makes the caller a LOT more clear what is going on.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Serge E. Hallyn <serge.hallyn@canonical.com>
include/linux/capability.h
include/linux/cred.h
kernel/capability.c
kernel/ptrace.c
kernel/sched.c