mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 01:47:58 +02:00
audit: fix using original file:line information for audit logging
With structured logging (journald), the file, line and func information is relevant. Propagate the right value to the audit logging line.
This commit is contained in:
parent
1353a0e8da
commit
ab3546b8e1
1 changed files with 12 additions and 1 deletions
|
|
@ -174,7 +174,18 @@ nm_audit_log(NMAuditManager *self,
|
|||
|
||||
if (nm_logging_enabled(AUDIT_LOG_LEVEL, LOGD_AUDIT)) {
|
||||
msg = build_message(fields, BACKEND_LOG);
|
||||
_NMLOG(AUDIT_LOG_LEVEL, LOGD_AUDIT, "%s", msg);
|
||||
_nm_log_full(file,
|
||||
line,
|
||||
func,
|
||||
!(NM_THREAD_SAFE_ON_MAIN_THREAD),
|
||||
AUDIT_LOG_LEVEL,
|
||||
LOGD_AUDIT,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
"%s%s",
|
||||
_NMLOG_PREFIX_NAME ": ",
|
||||
msg);
|
||||
g_free(msg);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue