diff options
author | Casey Schaufler <casey@schaufler-ca.com> | 2015-05-02 15:11:42 -0700 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2015-05-12 15:00:41 +1000 |
commit | b1d9e6b0646d0e5ee5d9050bd236b6c65d66faef (patch) | |
tree | befe73902cf0797dabb704cf6688b3fe335fc19e /security/smack/smack.h | |
parent | e20b043a6902ecb61c2c84355c3bae5149f391db (diff) | |
download | linux-stable-b1d9e6b0646d0e5ee5d9050bd236b6c65d66faef.tar.gz linux-stable-b1d9e6b0646d0e5ee5d9050bd236b6c65d66faef.tar.bz2 linux-stable-b1d9e6b0646d0e5ee5d9050bd236b6c65d66faef.zip |
LSM: Switch to lists of hooks
Instead of using a vector of security operations
with explicit, special case stacking of the capability
and yama hooks use lists of hooks with capability and
yama hooks included as appropriate.
The security_operations structure is no longer required.
Instead, there is a union of the function pointers that
allows all the hooks lists to use a common mechanism for
list management while retaining typing. Each module
supplies an array describing the hooks it provides instead
of a sparsely populated security_operations structure.
The description includes the element that gets put on
the hook list, avoiding the issues surrounding individual
element allocation.
The method for registering security modules is changed to
reflect the information available. The method for removing
a module, currently only used by SELinux, has also changed.
It should be generic now, however if there are potential
race conditions based on ordering of hook removal that needs
to be addressed by the calling module.
The security hooks are called from the lists and the first
failure is returned.
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Paul Moore <paul@paul-moore.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'security/smack/smack.h')
-rw-r--r-- | security/smack/smack.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/security/smack/smack.h b/security/smack/smack.h index 262dad8dfbc6..b8c1a869d85e 100644 --- a/security/smack/smack.h +++ b/security/smack/smack.h @@ -276,8 +276,6 @@ extern struct mutex smack_known_lock; extern struct list_head smack_known_list; extern struct list_head smk_netlbladdr_list; -extern struct security_operations smack_ops; - #define SMACK_HASH_SLOTS 16 extern struct hlist_head smack_known_hash[SMACK_HASH_SLOTS]; |