aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss
diff options
context:
space:
mode:
authorOndrej Mosnacek <omosnace@redhat.com>2021-01-06 14:26:19 +0100
committerPaul Moore <paul@paul-moore.com>2021-01-12 09:53:57 -0500
commit3c797e514b927e6c85c0ae3359e85cc55422eec1 (patch)
treef3e652f9bdfa2ff34107fb485d8bedf69e0805bd /security/selinux/ss
parentselinux: remove unused global variables (diff)
downloadlinux-dev-3c797e514b927e6c85c0ae3359e85cc55422eec1.tar.xz
linux-dev-3c797e514b927e6c85c0ae3359e85cc55422eec1.zip
selinux: drop the unnecessary aurule_callback variable
Its value is actually not changed anywhere, so it can be substituted for a direct call to audit_update_lsm_rules(). Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss')
-rw-r--r--security/selinux/ss/services.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 597b79703584..5e08ce2c5994 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -3693,15 +3693,11 @@ out:
return match;
}
-static int (*aurule_callback)(void) = audit_update_lsm_rules;
-
static int aurule_avc_callback(u32 event)
{
- int err = 0;
-
- if (event == AVC_CALLBACK_RESET && aurule_callback)
- err = aurule_callback();
- return err;
+ if (event == AVC_CALLBACK_RESET)
+ return audit_update_lsm_rules();
+ return 0;
}
static int __init aurule_init(void)