diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-30 21:30:51 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-31 21:11:54 +0400 |
commit | e5467859f7f79b69fc49004403009dfdba3bec53 (patch) | |
tree | 73b011daf79eeddd61bbcaf65cd197b5e5f6f149 /security/commoncap.c | |
parent | d007794a182bc072a7b7479909dbd0d67ba341be (diff) | |
download | linux-e5467859f7f79b69fc49004403009dfdba3bec53.tar.xz |
split ->file_mmap() into ->mmap_addr()/->mmap_file()
... i.e. file-dependent and address-dependent checks.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/commoncap.c')
-rw-r--r-- | security/commoncap.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index ebac3618896e..6dbae4650abe 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -980,23 +980,8 @@ int cap_mmap_addr(unsigned long addr) return ret; } -/* - * cap_file_mmap - check if able to map given addr - * @file: unused - * @reqprot: unused - * @prot: unused - * @flags: unused - * @addr: address attempting to be mapped - * @addr_only: unused - * - * If the process is attempting to map memory below dac_mmap_min_addr they need - * CAP_SYS_RAWIO. The other parameters to this function are unused by the - * capability security module. Returns 0 if this mapping should be allowed - * -EPERM if not. - */ -int cap_file_mmap(struct file *file, unsigned long reqprot, - unsigned long prot, unsigned long flags, - unsigned long addr, unsigned long addr_only) +int cap_mmap_file(struct file *file, unsigned long reqprot, + unsigned long prot, unsigned long flags) { - return cap_mmap_addr(addr); + return 0; } |