[apparmor] [PATCH 1/5] apparmor: constify some of the pointer arguments of audit_mount

Ryan Lee ryan.lee at canonical.com
Tue Mar 4 01:11:37 UTC 2025


Unfortunately, the profile pointer itself cannot be constified because
aa_audit itself needs to extract non-const pointers from the profile
struct.

Signed-off-by: Ryan Lee <ryan.lee at canonical.com>
---
 security/apparmor/mount.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c
index bf8863253e07..1e1878a2ed6b 100644
--- a/security/apparmor/mount.c
+++ b/security/apparmor/mount.c
@@ -136,7 +136,8 @@ static int audit_mount(const struct cred *subj_cred,
 		       const char *name, const char *src_name,
 		       const char *type, const char *trans,
 		       unsigned long flags, const void *data, u32 request,
-		       struct aa_perms *perms, const char *info, int error)
+		       const struct aa_perms *perms,
+		       const char *info, int error)
 {
 	int audit_type = AUDIT_APPARMOR_AUTO;
 	DEFINE_AUDIT_DATA(ad, LSM_AUDIT_DATA_NONE, AA_CLASS_MOUNT, op);
-- 
2.43.0




More information about the AppArmor mailing list