On Linux, we previously called openlog() (with different options!) while
initializing SELinux; leave SELinux messages as LOG_USER|LOG_INFO in case
anyone was relying on that, but let the rest of our log messages come
out as LOG_DAEMON.
Also enable LOG_PERROR (copy syslog messages to stderr) unconditionally;
we can make this an autoconf check if anyone's pet Unix doesn't have
LOG_PERROR.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35358
Reviewed-by: Colin Walters <walters@verbum.org>
retval = FALSE;
auth_mechanisms = NULL;
+ _dbus_init_system_log ();
+
context->systemd_activation = systemd_activation;
/* Check for an existing pid file. Of course this is a race;
}
#endif /* HAVE_LIBAUDIT */
- vsyslog (LOG_INFO, fmt, ap);
+ vsyslog (LOG_USER | LOG_INFO, fmt, ap);
va_end(ap);
}
}
else
{
- openlog ("dbus", LOG_PERROR, LOG_USER);
_dbus_verbose ("Access Vector Cache (AVC) started.\n");
}
void
_dbus_init_system_log (void)
{
- openlog ("dbus", LOG_PID, LOG_DAEMON);
+ openlog ("dbus", LOG_PID | LOG_PERROR, LOG_DAEMON);
}
/**
* Log a message to the system log file (e.g. syslog on Unix).