From: Paul Moore <paul@paul-moore.com>
To: linux-security-module@vger.kernel.org, serge@hallyn.com
Subject: [RFC PATCH] capabilities: remove cap_mmap_file()
Date: Wed, 25 Sep 2024 15:20:19 -0400 [thread overview]
Message-ID: <20240925192018.15290-2-paul@paul-moore.com> (raw)
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>
---
security/commoncap.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/security/commoncap.c b/security/commoncap.c
index cefad323a0b1..3d103069903b 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -1428,12 +1428,6 @@ int cap_mmap_addr(unsigned long addr)
return ret;
}
-int cap_mmap_file(struct file *file, unsigned long reqprot,
- unsigned long prot, unsigned long flags)
-{
- return 0;
-}
-
#ifdef CONFIG_SECURITY
static const struct lsm_id capability_lsmid = {
@@ -1453,7 +1447,6 @@ static struct security_hook_list capability_hooks[] __ro_after_init = {
LSM_HOOK_INIT(inode_killpriv, cap_inode_killpriv),
LSM_HOOK_INIT(inode_getsecurity, cap_inode_getsecurity),
LSM_HOOK_INIT(mmap_addr, cap_mmap_addr),
- LSM_HOOK_INIT(mmap_file, cap_mmap_file),
LSM_HOOK_INIT(task_fix_setuid, cap_task_fix_setuid),
LSM_HOOK_INIT(task_prctl, cap_task_prctl),
LSM_HOOK_INIT(task_setscheduler, cap_task_setscheduler),
--
2.46.1
next reply other threads:[~2024-09-25 19:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 19:20 Paul Moore [this message]
2024-09-25 19:45 ` [RFC PATCH] capabilities: remove cap_mmap_file() Casey Schaufler
2024-09-26 13:11 ` Serge E. Hallyn
2024-09-26 13:16 ` Paul Moore
2024-09-26 13:22 ` Serge E. Hallyn
2024-09-26 13:24 ` Paul Moore
2024-09-30 21:08 ` Serge E. Hallyn
2024-10-01 14:08 ` Paul Moore
2024-10-01 21:20 ` Serge E. Hallyn
2024-10-02 15:36 ` Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240925192018.15290-2-paul@paul-moore.com \
--to=paul@paul-moore.com \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.