summaryrefslogtreecommitdiffstats
path: root/security/apparmor
diff options
context:
space:
mode:
authorXiu Jianfeng <xiujianfeng@huawei.com>2022-09-14 15:46:07 +0800
committerJohn Johansen <john.johansen@canonical.com>2022-10-03 14:49:04 -0700
commit65f7f666f21ce374628d58b3cc48515070f31e72 (patch)
treeb1b5425c381946d6e8e8b54e11201bc987e9604e /security/apparmor
parentadaa9a3f72e6f98538bfac54f6dc4afc0537f410 (diff)
downloadlinux-65f7f666f21ce374628d58b3cc48515070f31e72.tar.bz2
apparmor: make __aa_path_perm() static
Make __aa_path_perm() static as it's only used inside apparmor/file.c. Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor')
-rw-r--r--security/apparmor/file.c7
-rw-r--r--security/apparmor/include/file.h3
2 files changed, 4 insertions, 6 deletions
diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index d7f27848e7cc..e7dc5ea38997 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -220,9 +220,10 @@ aa_state_t aa_str_perms(struct aa_policydb *file_rules, aa_state_t 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)
{
struct aa_ruleset *rules = list_first_entry(&profile->rules,
typeof(*rules), list);
diff --git a/security/apparmor/include/file.h b/security/apparmor/include/file.h
index 1a1c0f0c5071..5be620af33ba 100644
--- a/security/apparmor/include/file.h
+++ b/security/apparmor/include/file.h
@@ -119,9 +119,6 @@ aa_state_t aa_str_perms(struct aa_policydb *file_rules, aa_state_t 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);