[PATCH] apparmor: make __aa_path_perm() static

Xiu Jianfeng xiujianfeng at huawei.com
Wed Sep 14 07:46:07 UTC 2022


Make __aa_path_perm() static as it's only used inside apparmor/file.c.

Signed-off-by: Xiu Jianfeng <xiujianfeng at huawei.com>
---
 security/apparmor/file.c         | 6 +++---
 security/apparmor/include/file.h | 3 ---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index e1b7e93602e4..14f7d7ef3f54 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -265,9 +265,9 @@ unsigned int aa_str_perms(struct aa_dfa *dfa, unsigned int start,
 	return state;
 }
 
-int __aa_path_perm(const char *op, struct aa_profile *profile, const char *name,
-		   u32 request, struct path_cond *cond, int flags,
-		   struct aa_perms *perms)
+static int __aa_path_perm(const char *op, struct aa_profile *profile, const char *name,
+			  u32 request, struct path_cond *cond, int flags,
+			  struct aa_perms *perms)
 {
 	int e = 0;
 
diff --git a/security/apparmor/include/file.h b/security/apparmor/include/file.h
index 029cb20e322d..17dca3502230 100644
--- a/security/apparmor/include/file.h
+++ b/security/apparmor/include/file.h
@@ -189,9 +189,6 @@ unsigned int aa_str_perms(struct aa_dfa *dfa, unsigned int start,
 			  const char *name, struct path_cond *cond,
 			  struct aa_perms *perms);
 
-int __aa_path_perm(const char *op, struct aa_profile *profile,
-		   const char *name, u32 request, struct path_cond *cond,
-		   int flags, struct aa_perms *perms);
 int aa_path_perm(const char *op, struct aa_label *label,
 		 const struct path *path, int flags, u32 request,
 		 struct path_cond *cond);
-- 
2.17.1



More information about the Linux-security-module-archive mailing list