• Thomas Liu's avatar
    SELinux: Convert avc_audit to use lsm_audit.h · 2bf49690
    Thomas Liu authored
    Convert avc_audit in security/selinux/avc.c to use lsm_audit.h,
    for better maintainability.
     - changed selinux to use common_audit_data instead of
     - eliminated code in avc.c and used code from lsm_audit.h instead.
    Had to add a LSM_AUDIT_NO_AUDIT to lsm_audit.h so that avc_audit
    can call common_lsm_audit and do the pre and post callbacks without
    doing the actual dump.  This makes it so that the patched version
    behaves the same way as the unpatched version.
    Also added a denied field to the selinux_audit_data private space,
    once again to make it so that the patched version behaves like the
    I've tested and confirmed that AVCs look the same before and after
    this patch.
    Signed-off-by: default avatarThomas Liu <tliu@redhat.com>
    Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
    Signed-off-by: default avatarJames Morris <jmorris@namei.org>
lsm_audit.c 8.51 KB