Message ID | 20210106132622.1122033-3-omosnace@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Paul Moore |
Headers | show |
Series | Clean up SELinux global variables | expand |
On Wed, Jan 6, 2021 at 8:26 AM Ondrej Mosnacek <omosnace@redhat.com> wrote: > > 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> > --- > security/selinux/ss/services.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) Merged into selinux/next, thanks.
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 597b79703584e..5e08ce2c5994a 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)
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> --- security/selinux/ss/services.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)