diff options
-rw-r--r-- | src/core/selinux-access.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c index 39e994afd7..ada4f8705c 100644 --- a/src/core/selinux-access.c +++ b/src/core/selinux-access.c @@ -112,7 +112,11 @@ _printf_(2, 3) static int log_callback(int type, const char *fmt, ...) { va_end(ap); if (r >= 0) { - audit_log_user_avc_message(fd, AUDIT_USER_AVC, buf, NULL, NULL, NULL, 0); + if (type == SELINUX_AVC) + audit_log_user_avc_message(get_audit_fd(), AUDIT_USER_AVC, buf, NULL, NULL, NULL, 0); + else if (type == SELINUX_ERROR) + audit_log_user_avc_message(get_audit_fd(), AUDIT_USER_SELINUX_ERR, buf, NULL, NULL, NULL, 0); + return 0; } } |