[apparmor] [PATCH 1/2] apparmor: constify aa_perms pointer argument to aa_audit_file
Ryan Lee
ryan.lee at canonical.com
Tue Mar 4 02:08:49 UTC 2025
The aa_audit_file function doesn't modify aa_perms, so pass the pointer
in as const.
Signed-off-by: Ryan Lee <ryan.lee at canonical.com>
---
security/apparmor/file.c | 2 +-
security/apparmor/include/file.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index d52a5b14dad4..f3463f82fea3 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -92,7 +92,7 @@ static void file_audit_cb(struct audit_buffer *ab, void *va)
* Returns: %0 or error on failure
*/
int aa_audit_file(const struct cred *subj_cred,
- struct aa_profile *profile, struct aa_perms *perms,
+ struct aa_profile *profile, const struct aa_perms *perms,
const char *op, u32 request, const char *name,
const char *target, struct aa_label *tlabel,
kuid_t ouid, const char *info, int error)
diff --git a/security/apparmor/include/file.h b/security/apparmor/include/file.h
index 6e8f2aa66cd6..efc11b1bd9e0 100644
--- a/security/apparmor/include/file.h
+++ b/security/apparmor/include/file.h
@@ -72,7 +72,7 @@ struct path_cond {
#define COMBINED_PERM_MASK(X) ((X).allow | (X).audit | (X).quiet | (X).kill)
int aa_audit_file(const struct cred *cred,
- struct aa_profile *profile, struct aa_perms *perms,
+ struct aa_profile *profile, const struct aa_perms *perms,
const char *op, u32 request, const char *name,
const char *target, struct aa_label *tlabel, kuid_t ouid,
const char *info, int error);
--
2.43.0
base-kernel: v6.14-rc5
target: v6.14
More information about the AppArmor
mailing list