aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/security.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index 5eff459b3833..ac4bc3760b46 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -66,6 +66,9 @@ extern int cap_inode_setxattr(struct dentry *dentry, const char *name,
66extern int cap_inode_removexattr(struct dentry *dentry, const char *name); 66extern int cap_inode_removexattr(struct dentry *dentry, const char *name);
67extern int cap_inode_need_killpriv(struct dentry *dentry); 67extern int cap_inode_need_killpriv(struct dentry *dentry);
68extern int cap_inode_killpriv(struct dentry *dentry); 68extern int cap_inode_killpriv(struct dentry *dentry);
69extern int cap_file_mmap(struct file *file, unsigned long reqprot,
70 unsigned long prot, unsigned long flags,
71 unsigned long addr, unsigned long addr_only);
69extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); 72extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags);
70extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, 73extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3,
71 unsigned long arg4, unsigned long arg5); 74 unsigned long arg4, unsigned long arg5);
@@ -2197,9 +2200,7 @@ static inline int security_file_mmap(struct file *file, unsigned long reqprot,
2197 unsigned long addr, 2200 unsigned long addr,
2198 unsigned long addr_only) 2201 unsigned long addr_only)
2199{ 2202{
2200 if ((addr < mmap_min_addr) && !capable(CAP_SYS_RAWIO)) 2203 return cap_file_mmap(file, reqprot, prot, flags, addr, addr_only);
2201 return -EACCES;
2202 return 0;
2203} 2204}
2204 2205
2205static inline int security_file_mprotect(struct vm_area_struct *vma, 2206static inline int security_file_mprotect(struct vm_area_struct *vma,