summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/modules/vfs_full_audit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index ec886c52bd..00af87c53b 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -74,6 +74,7 @@ struct vfs_full_audit_private_data {
struct bitmap *success_ops;
struct bitmap *failure_ops;
int syslog_facility;
+ int syslog_priority;
};
#undef DBGC_CLASS
@@ -521,7 +522,7 @@ static void do_log(vfs_op_type op, bool success, vfs_handle_struct *handle,
* Specify the facility to interoperate with other syslog callers
* (smbd for example).
*/
- priority = audit_syslog_priority(handle) | pd->syslog_facility;
+ priority = pd->syslog_priority | pd->syslog_facility;
audit_pre = audit_prefix(talloc_tos(), handle->conn);
syslog(priority, "%s|%s|%s|%s\n",
@@ -590,6 +591,8 @@ static int smb_full_audit_connect(vfs_handle_struct *handle,
return -1;
}
+ pd->syslog_priority = audit_syslog_priority(handle);
+
#ifdef WITH_SYSLOG
openlog("smbd_audit", 0, pd->syslog_facility);
#endif