summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authortprouty <tprouty@b72e2a10-2d34-0410-9a71-d3beadf02b57>2009-08-26 01:38:14 +0000
committerTim Prouty <tprouty@samba.org>2009-08-26 10:41:54 -0700
commit3ad9d108a7404d625454efda0d000e4caa543e7a (patch)
treefc683940170ab25a915f945bc43b0ab269dc9ad8 /source3/lib
parent22ee1cd7dbcd07470c915343872ee83ae90e3511 (diff)
downloadsamba-3ad9d108a7404d625454efda0d000e4caa543e7a.tar.gz
samba-3ad9d108a7404d625454efda0d000e4caa543e7a.tar.bz2
samba-3ad9d108a7404d625454efda0d000e4caa543e7a.zip
s3: Allow full_audit to play nice with smbd if it's using syslog
Explictly pass the facility from both smbd and full_audit to syslog. Really the only major change is to not call openlog() in full_audit if WITH_SYSLOG is defined, which implies that smbd is already using syslog. This allows full audit to piggy-back on the same ident as smbd, while still differentiating the logging via the facility.
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/debug.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index e7dcfb4fdf..2e19f89863 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -856,6 +856,12 @@ void check_log_size( void )
else
priority = priority_map[syslog_level];
+ /*
+ * Specify the facility to interoperate with other syslog
+ * callers (vfs_full_audit for example).
+ */
+ priority |= SYSLOG_FACILITY;
+
va_start(ap, format_str);
ret = vasprintf(&msgbuf, format_str, ap);
va_end(ap);