diff options
author | John Johansen <john.johansen@canonical.com> | 2017-01-16 00:42:34 -0800 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2017-01-16 01:18:28 -0800 |
commit | 73688d1ed0b8f800f312f7bc9d583463858da861 (patch) | |
tree | 41d58fc6558b4a07554da9dc3ff4db3a36d1ad59 /security/apparmor/include/policy_ns.h | |
parent | 5fd1b95fc9b96629d185f5fe3d9342fcff78eb30 (diff) | |
download | op-kernel-dev-73688d1ed0b8f800f312f7bc9d583463858da861.zip op-kernel-dev-73688d1ed0b8f800f312f7bc9d583463858da861.tar.gz |
apparmor: refactor prepare_ns() and make usable from different views
prepare_ns() will need to be called from alternate views, and namespaces
will need to be created via different interfaces. So refactor and
allow specifying the view ns.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include/policy_ns.h')
-rw-r--r-- | security/apparmor/include/policy_ns.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/apparmor/include/policy_ns.h b/security/apparmor/include/policy_ns.h index e4c8765..820d86d2 100644 --- a/security/apparmor/include/policy_ns.h +++ b/security/apparmor/include/policy_ns.h @@ -83,7 +83,9 @@ void aa_free_ns_kref(struct kref *kref); struct aa_ns *aa_find_ns(struct aa_ns *root, const char *name); struct aa_ns *aa_findn_ns(struct aa_ns *root, const char *name, size_t n); -struct aa_ns *aa_prepare_ns(const char *name); +struct aa_ns *__aa_find_or_create_ns(struct aa_ns *parent, const char *name, + struct dentry *dir); +struct aa_ns *aa_prepare_ns(struct aa_ns *root, const char *name); void __aa_remove_ns(struct aa_ns *ns); static inline struct aa_profile *aa_deref_parent(struct aa_profile *p) |