context->fork = bus_config_parser_get_fork (parser);
context->syslog = bus_config_parser_get_syslog (parser);
context->keep_umask = bus_config_parser_get_keep_umask (parser);
-
+ context->allow_anonymous = bus_config_parser_get_allow_anonymous (parser);
+
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
retval = TRUE;
#include <dbus/dbus.h>
#include <dbus/dbus-string.h>
#include <dbus/dbus-mainloop.h>
+#include <dbus/dbus-pipe.h>
++#include <dbus/dbus-sysdeps.h>
typedef struct BusActivation BusActivation;
typedef struct BusConnections BusConnections;
## must come before we use the $USE_MAINTAINER_MODE variable later
AM_MAINTAINER_MODE
+ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
+AC_DEFINE_UNQUOTED(DBUS_DAEMON_NAME,"dbus-daemon",[Name of executable])
+
# libtool versioning - this applies to libdbus
#
# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
}
/**
- * Log a security-related message. Intended for use primarily by
- * the system bus.
+ * Log a message to the system log file (e.g. syslog on Unix).
*
+ * @param severity a severity value
* @param msg a printf-style format string
* @param args arguments for the format string
+ *
+ * If the FATAL severity is given, this function will terminate the program
+ * with an error code.
*/
- void
- _dbus_log_security (const char *msg, va_list args)
+ void
+ _dbus_system_logv (DBusSystemLogSeverity severity, const char *msg, va_list args)
{
- vsyslog (LOG_AUTH|LOG_NOTICE, msg, args);
+ int flags;
+ switch (severity)
+ {
+ case DBUS_SYSTEM_LOG_INFO:
+ flags = LOG_DAEMON | LOG_NOTICE;
+ break;
+ case DBUS_SYSTEM_LOG_SECURITY:
+ flags = LOG_AUTH | LOG_NOTICE;
+ break;
+ case DBUS_SYSTEM_LOG_FATAL:
+ flags = LOG_DAEMON|LOG_CRIT;
+ default:
+ return;
+ }
+
+ vsyslog (flags, msg, args);
-
++
+ if (severity == DBUS_SYSTEM_LOG_FATAL)
+ exit (1);
}
/** Installs a UNIX signal handler