diff options
author | John Johansen <john.johansen@canonical.com> | 2022-10-03 11:48:24 +0200 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2022-10-25 07:35:36 +0200 |
commit | 58f89ce58bb4f5cf5963b20a19aaa2431b0412d8 (patch) | |
tree | c2d790ece0ee8b71c048c3775a70801e5927acaf /security/apparmor/include | |
parent | apparmor: fix obsoleted comments for aa_getprocattr() and audit_resource() (diff) | |
download | linux-58f89ce58bb4f5cf5963b20a19aaa2431b0412d8.tar.xz linux-58f89ce58bb4f5cf5963b20a19aaa2431b0412d8.zip |
apparmor: refactor code that alloc null profiles
Bother unconfined and learning profiles use the null profile as their
base. Refactor so they are share a common base routine. This doesn't
save much atm but will be important when the feature set of the
parent is inherited.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include')
-rw-r--r-- | security/apparmor/include/policy.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h index 5cadfb20df29..545f791cabda 100644 --- a/security/apparmor/include/policy.h +++ b/security/apparmor/include/policy.h @@ -234,8 +234,10 @@ void aa_free_proxy_kref(struct kref *kref); struct aa_ruleset *aa_alloc_ruleset(gfp_t gfp); struct aa_profile *aa_alloc_profile(const char *name, struct aa_proxy *proxy, gfp_t gfp); -struct aa_profile *aa_new_null_profile(struct aa_profile *parent, bool hat, - const char *base, gfp_t gfp); +struct aa_profile *aa_alloc_null(struct aa_profile *parent, const char *name, + gfp_t gfp); +struct aa_profile *aa_new_learning_profile(struct aa_profile *parent, bool hat, + const char *base, gfp_t gfp); void aa_free_profile(struct aa_profile *profile); void aa_free_profile_kref(struct kref *kref); struct aa_profile *aa_find_child(struct aa_profile *parent, const char *name); |