OSDN Git Service

apparmor: make __aa_path_perm() static
authorXiu Jianfeng <xiujianfeng@huawei.com>
Wed, 14 Sep 2022 07:46:07 +0000 (15:46 +0800)
committerJohn Johansen <john.johansen@canonical.com>
Mon, 3 Oct 2022 21:49:04 +0000 (14:49 -0700)
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>
security/apparmor/file.c
security/apparmor/include/file.h

index d7f2784..e7dc5ea 100644 (file)
@@ -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);
index 1a1c0f0..5be620a 100644 (file)
@@ -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);