Capabilities: move cap_file_mmap to commoncap.c
authorEric Paris <eparis@redhat.com>
Fri, 31 Jul 2009 16:53:58 +0000 (12:53 -0400)
committerJames Morris <jmorris@namei.org>
Wed, 5 Aug 2009 23:02:17 +0000 (09:02 +1000)
commit7c73875e7dda627040b12c19b01db634fa7f0fd1
treef8f4df20bdcafb1bd981c8a7b0797d13b2625b27
parent012a5299a29672039f42944a37984558393ef769
Capabilities: move cap_file_mmap to commoncap.c

Currently we duplicate the mmap_min_addr test in cap_file_mmap and in
security_file_mmap if !CONFIG_SECURITY.  This patch moves cap_file_mmap
into commoncap.c and then calls that function directly from
security_file_mmap ifndef CONFIG_SECURITY like all of the other capability
checks are done.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
include/linux/security.h
security/capability.c
security/commoncap.c