Skip to content

Commit 3f4f1f8

Browse files
pcmooreSerge Hallyn
authored andcommitted
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>
1 parent 40384c8 commit 3f4f1f8

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

security/commoncap.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,12 +1428,6 @@ int cap_mmap_addr(unsigned long addr)
14281428
return ret;
14291429
}
14301430

1431-
int cap_mmap_file(struct file *file, unsigned long reqprot,
1432-
unsigned long prot, unsigned long flags)
1433-
{
1434-
return 0;
1435-
}
1436-
14371431
#ifdef CONFIG_SECURITY
14381432

14391433
static const struct lsm_id capability_lsmid = {
@@ -1453,7 +1447,6 @@ static struct security_hook_list capability_hooks[] __ro_after_init = {
14531447
LSM_HOOK_INIT(inode_killpriv, cap_inode_killpriv),
14541448
LSM_HOOK_INIT(inode_getsecurity, cap_inode_getsecurity),
14551449
LSM_HOOK_INIT(mmap_addr, cap_mmap_addr),
1456-
LSM_HOOK_INIT(mmap_file, cap_mmap_file),
14571450
LSM_HOOK_INIT(task_fix_setuid, cap_task_fix_setuid),
14581451
LSM_HOOK_INIT(task_prctl, cap_task_prctl),
14591452
LSM_HOOK_INIT(task_setscheduler, cap_task_setscheduler),

0 commit comments

Comments
 (0)