Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

capabilities: remove cap_mmap_file()

The cap_mmap_file() LSM callback returns the default value for the
security_mmap_file() LSM hook and can be safely removed.

Signed-off-by: Paul Moore <paul@paul-moore.com>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Serge Hallyn <sergeh@kernel.org>

authored by

Paul Moore and committed by
Serge Hallyn
3f4f1f8a 40384c84

-7
-7
security/commoncap.c
··· 1428 1428 return ret; 1429 1429 } 1430 1430 1431 - int cap_mmap_file(struct file *file, unsigned long reqprot, 1432 - unsigned long prot, unsigned long flags) 1433 - { 1434 - return 0; 1435 - } 1436 - 1437 1431 #ifdef CONFIG_SECURITY 1438 1432 1439 1433 static const struct lsm_id capability_lsmid = { ··· 1447 1453 LSM_HOOK_INIT(inode_killpriv, cap_inode_killpriv), 1448 1454 LSM_HOOK_INIT(inode_getsecurity, cap_inode_getsecurity), 1449 1455 LSM_HOOK_INIT(mmap_addr, cap_mmap_addr), 1450 - LSM_HOOK_INIT(mmap_file, cap_mmap_file), 1451 1456 LSM_HOOK_INIT(task_fix_setuid, cap_task_fix_setuid), 1452 1457 LSM_HOOK_INIT(task_prctl, cap_task_prctl), 1453 1458 LSM_HOOK_INIT(task_setscheduler, cap_task_setscheduler),