usbguard icon indicating copy to clipboard operation
usbguard copied to clipboard

Always check if audit logging was successful

Open Cropi opened this issue 4 years ago • 0 comments

Description

Always check if audit_log_user_message() was successful after logging a message to the audit system. Right now, if for any reason usbguard-daemon is not able to log user messages, it won't display any warnings.

The function returns the sequence number which is > 0 on success or <= 0 on error. See audit_log_user_message(3) manual for detailed information(link).

Chunk of code that needs to be changed: https://github.com/USBGuard/usbguard/blob/master/src/Daemon/LinuxAuditBackend.cpp#L317

How often is it reproducible?

It happens when AuditBackend=LinuxAudit is set in the configuration and audit logs can't be created.

Cropi avatar Mar 17 '21 18:03 Cropi