From: Colin Walters Date: Tue, 16 Mar 2010 20:04:15 +0000 (-0400) Subject: Merge branch 'dbus-1.2' X-Git-Tag: dbus-1.3.1~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ebfa7c02fd67777684d39389e25346819836dcca;p=thirdparty%2Fdbus.git Merge branch 'dbus-1.2' Conflicts: bus/bus.c configure.in --- ebfa7c02fd67777684d39389e25346819836dcca diff --cc bus/bus.c index 69203a232,3e37e90a2..37777965b --- a/bus/bus.c +++ b/bus/bus.c @@@ -398,8 -403,7 +413,8 @@@ process_config_first_time_only (BusCont 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; diff --cc bus/bus.h index aade920cb,8a04daa16..14a809b17 --- a/bus/bus.h +++ b/bus/bus.h @@@ -29,7 -29,6 +29,8 @@@ #include #include #include +#include ++#include typedef struct BusActivation BusActivation; typedef struct BusConnections BusConnections; diff --cc configure.in index c037ec39b,f583b28e2..d856cf996 --- a/configure.in +++ b/configure.in @@@ -25,8 -23,8 +25,10 @@@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GE ## 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 diff --cc dbus/dbus-sysdeps-util-unix.c index 688ec19d1,93ad253e2..eaf327031 --- a/dbus/dbus-sysdeps-util-unix.c +++ b/dbus/dbus-sysdeps-util-unix.c @@@ -385,16 -391,37 +391,37 @@@ _dbus_system_log (DBusSystemLogSeverit } /** - * 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