mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
In an effort to decompose security/security.c somewhat to make it less twisted and unwieldy, pull out the LSM notifier code into a new file as it is fairly well self-contained. No code changes. Reviewed-by: Kees Cook <kees@kernel.org> Reviewed-by: John Johansen <john.johansen@canonical.com> Reviewed-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
32 lines
802 B
C
32 lines
802 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
* LSM notifier functions
|
|
*
|
|
*/
|
|
|
|
#include <linux/notifier.h>
|
|
#include <linux/security.h>
|
|
|
|
static BLOCKING_NOTIFIER_HEAD(blocking_lsm_notifier_chain);
|
|
|
|
int call_blocking_lsm_notifier(enum lsm_event event, void *data)
|
|
{
|
|
return blocking_notifier_call_chain(&blocking_lsm_notifier_chain,
|
|
event, data);
|
|
}
|
|
EXPORT_SYMBOL(call_blocking_lsm_notifier);
|
|
|
|
int register_blocking_lsm_notifier(struct notifier_block *nb)
|
|
{
|
|
return blocking_notifier_chain_register(&blocking_lsm_notifier_chain,
|
|
nb);
|
|
}
|
|
EXPORT_SYMBOL(register_blocking_lsm_notifier);
|
|
|
|
int unregister_blocking_lsm_notifier(struct notifier_block *nb)
|
|
{
|
|
return blocking_notifier_chain_unregister(&blocking_lsm_notifier_chain,
|
|
nb);
|
|
}
|
|
EXPORT_SYMBOL(unregister_blocking_lsm_notifier);
|