split cap_mmap_addr() out of cap_file_mmap()

... switch callers.

Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2012-05-30 13:11:37 -04:00
commit d007794a18
5 changed files with 28 additions and 13 deletions

View file

@ -3104,7 +3104,7 @@ static int selinux_file_mmap(struct file *file, unsigned long reqprot,
}
/* do DAC check on address space usage */
rc = cap_file_mmap(file, reqprot, prot, flags, addr, addr_only);
rc = cap_mmap_addr(addr);
if (rc || addr_only)
return rc;