diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-30 13:30:51 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-31 13:11:54 -0400 |
commit | e5467859f7f79b69fc49004403009dfdba3bec53 (patch) | |
tree | 73b011daf79eeddd61bbcaf65cd197b5e5f6f149 /security/security.c | |
parent | d007794a182bc072a7b7479909dbd0d67ba341be (diff) |
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/security.c')
-rw-r--r-- | security/security.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/security/security.c b/security/security.c index 5497a57fba01..d91c66d3956b 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -657,18 +657,22 @@ int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
657 | return security_ops->file_ioctl(file, cmd, arg); | 657 | return security_ops->file_ioctl(file, cmd, arg); |
658 | } | 658 | } |
659 | 659 | ||
660 | int security_file_mmap(struct file *file, unsigned long reqprot, | 660 | int security_mmap_file(struct file *file, unsigned long reqprot, |
661 | unsigned long prot, unsigned long flags, | 661 | unsigned long prot, unsigned long flags) |
662 | unsigned long addr, unsigned long addr_only) | ||
663 | { | 662 | { |
664 | int ret; | 663 | int ret; |
665 | 664 | ||
666 | ret = security_ops->file_mmap(file, reqprot, prot, flags, addr, addr_only); | 665 | ret = security_ops->mmap_file(file, reqprot, prot, flags); |
667 | if (ret) | 666 | if (ret) |
668 | return ret; | 667 | return ret; |
669 | return ima_file_mmap(file, prot); | 668 | return ima_file_mmap(file, prot); |
670 | } | 669 | } |
671 | 670 | ||
671 | int security_mmap_addr(unsigned long addr) | ||
672 | { | ||
673 | return security_ops->mmap_addr(addr); | ||
674 | } | ||
675 | |||
672 | int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot, | 676 | int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot, |
673 | unsigned long prot) | 677 | unsigned long prot) |
674 | { | 678 | { |