Commit ec3035d8 authored by Simon McVittie's avatar Simon McVittie

Merge branch 'upstream-experimental' into upstream

Conflicts:
	NEWS
	bus/Makefile.am
	bus/Makefile.in
	bus/bus.c
	bus/main.c
	cmake/CMakeLists.txt
	config.h.in
	configure
	configure.ac
	dbus-1-uninstalled.pc.in
	dbus/Makefile.am
	dbus/Makefile.in
	dbus/dbus-connection.c
	dbus/dbus-marshal-basic.c
	dbus/dbus-marshal-header.c
	dbus/dbus-message-private.h
	dbus/dbus-message.c
	dbus/dbus-pending-call.c
	dbus/dbus-server.c
	dbus/dbus-sysdeps-unix.c
	dbus/dbus-test.c
	doc/dbus-faq.html
	doc/dbus-launch.1
	doc/dbus-send.1
	doc/dbus-specification.html
	doc/dbus-test-plan.html
	test/Makefile.am
	test/Makefile.in
	test/data/valid-config-files/incoming-limit.conf
	test/dbus-daemon.c
	test/internals/refs.c
	test/marshal.c
	test/name-test/Makefile.in
	tools/Makefile.in
	tools/dbus-monitor.c
parents 240a7a11 e47c893c
......@@ -13,6 +13,7 @@ Christian Ehrlicher <Ch.Ehrlicher@gmx.de>
Christian Persch (GNOME) <chpe@gnome.org>
Colin Walters <walters@verbum.org>
Colin Watson <cjwatson@ubuntu.com>
Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Cristian Rodríguez <cristian.rodriguez@opensuse.org>
Cyril Brulebois <kibi@debian.org>
Daniel P. Berrange <dan@berrange.com>
......
......@@ -154,6 +154,10 @@ To make a release of D-Bus, do the following:
- update the file NEWS based on the git history
- verify that the version number of dbus-specification.xml is
changed if it needs to be; if changes have been made, update the
release date in that file
- update the AUTHORS file with "make update-authors" if necessary
- the version number should have major.minor.micro, even
......@@ -175,7 +179,8 @@ To make a release of D-Bus, do the following:
- bump the version number up in configure.ac (so the micro version is odd),
and commit it. Make sure you do this *after* tagging the previous
release! The idea is that git has a newer version number
than anything released.
than anything released. Similarly, bump the version number of
dbus-specification.xml and set the release date to "(not finalized)".
- merge the branch you've released to the chronologically-later
branch (usually "master"). You'll probably have to fix a merge
......@@ -203,16 +208,19 @@ To make a release of D-Bus, do the following:
- post to dbus@lists.freedesktop.org announcing the release.
After making a ".0" stable release
Making a ".0" stable release
===
We create a branch for each stable release; sometimes the branch is
not done immediately, instead it's possible to wait until someone has
a not-suitable-for-stable change they want to make and then branch to
allow committing that change.
We create a branch for each stable release. The branch name should be
dbus-X.Y which is a branch that has releases versioned X.Y.Z;
changes on a stable branch should be limited to significant bug fixes.
Because we won't make minor changes like keeping up with the latest
deprecations on a stable branch, stable branches should turn off the
gcc warning for deprecated declarations (e.g. see commit 4ebb275ab7).
The branch name should be dbus-X.Y which is a branch that has
releases versioned X.Y.Z
Be extra-careful not to merge master (or any branch based on master) into a
stable branch.
To branch:
git branch dbus-X.Y
......
......@@ -207,6 +207,7 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ADT_LIBS = @ADT_LIBS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
......@@ -227,10 +228,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_BINDIR = @DBUS_BINDIR@
DBUS_BUS_CFLAGS = @DBUS_BUS_CFLAGS@
DBUS_BUS_LIBS = @DBUS_BUS_LIBS@
DBUS_CLIENT_CFLAGS = @DBUS_CLIENT_CFLAGS@
DBUS_CLIENT_LIBS = @DBUS_CLIENT_LIBS@
DBUS_CONSOLE_AUTH_DIR = @DBUS_CONSOLE_AUTH_DIR@
DBUS_CONSOLE_OWNER_FILE = @DBUS_CONSOLE_OWNER_FILE@
DBUS_DAEMONDIR = @DBUS_DAEMONDIR@
......@@ -242,8 +239,6 @@ DBUS_INT16_TYPE = @DBUS_INT16_TYPE@
DBUS_INT32_TYPE = @DBUS_INT32_TYPE@
DBUS_INT64_CONSTANT = @DBUS_INT64_CONSTANT@
DBUS_INT64_TYPE = @DBUS_INT64_TYPE@
DBUS_LAUNCHER_CFLAGS = @DBUS_LAUNCHER_CFLAGS@
DBUS_LAUNCHER_LIBS = @DBUS_LAUNCHER_LIBS@
DBUS_LIBEXECDIR = @DBUS_LIBEXECDIR@
DBUS_MAJOR_VERSION = @DBUS_MAJOR_VERSION@
DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@
......@@ -255,8 +250,8 @@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
DBUS_SYSTEM_PID_FILE = @DBUS_SYSTEM_PID_FILE@
DBUS_SYSTEM_SOCKET = @DBUS_SYSTEM_SOCKET@
DBUS_TEST_CFLAGS = @DBUS_TEST_CFLAGS@
DBUS_TEST_LIBS = @DBUS_TEST_LIBS@
DBUS_TEST_DATA = @DBUS_TEST_DATA@
DBUS_TEST_EXEC = @DBUS_TEST_EXEC@
DBUS_UINT64_CONSTANT = @DBUS_UINT64_CONSTANT@
DBUS_USER = @DBUS_USER@
DBUS_VERSION = @DBUS_VERSION@
......@@ -294,6 +289,7 @@ LAUNCHCTL = @LAUNCHCTL@
LAUNCHD_AGENT_DIR = @LAUNCHD_AGENT_DIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDBUS_LIBS = @LIBDBUS_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -310,6 +306,7 @@ MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NETWORK_libs = @NETWORK_libs@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
......@@ -334,26 +331,25 @@ RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
SED = @SED@
SELINUX_LIBS = @SELINUX_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
SYSTEMD_LIBS = @SYSTEMD_LIBS@
TEST_BUS_BINARY = @TEST_BUS_BINARY@
TEST_EXIT_BINARY = @TEST_EXIT_BINARY@
TEST_INVALID_SERVICE_DIR = @TEST_INVALID_SERVICE_DIR@
TEST_INVALID_SERVICE_SYSTEM_DIR = @TEST_INVALID_SERVICE_SYSTEM_DIR@
TEST_LAUNCH_HELPER_BINARY = @TEST_LAUNCH_HELPER_BINARY@
TEST_PRIVSERVER_BINARY = @TEST_PRIVSERVER_BINARY@
TEST_SEGFAULT_BINARY = @TEST_SEGFAULT_BINARY@
TEST_SERVICE_BINARY = @TEST_SERVICE_BINARY@
TEST_SHELL_SERVICE_BINARY = @TEST_SHELL_SERVICE_BINARY@
TEST_SLEEP_FOREVER_BINARY = @TEST_SLEEP_FOREVER_BINARY@
TEST_LISTEN = @TEST_LISTEN@
TEST_SOCKET_DIR = @TEST_SOCKET_DIR@
TEST_VALID_SERVICE_DIR = @TEST_VALID_SERVICE_DIR@
TEST_VALID_SERVICE_SYSTEM_DIR = @TEST_VALID_SERVICE_SYSTEM_DIR@
THREAD_LIBS = @THREAD_LIBS@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VERSION = @VERSION@
WINDRES = @WINDRES@
XMKMF = @XMKMF@
XMLTO = @XMLTO@
XML_CFLAGS = @XML_CFLAGS@
XML_LIBS = @XML_LIBS@
XSLTPROC = @XSLTPROC@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
......
This diff is collapsed.
......@@ -11,6 +11,10 @@ DBus comes with a test suite which is used on unix to guarantate
production quality and this test suite runs mostly. There are some
test not running yet and there is help needed to get them running.
Supported compilers
-------------------
On windows Microsoft Visual Studio 2010 (Express and professional variants)
and mingw-w64|32 are known to work.
Building
--------
......
configdir=$(sysconfdir)/dbus-1
dbus_daemon_execdir = $(DBUS_DAEMONDIR)
INCLUDES = -I$(top_srcdir) \
$(DBUS_BUS_CFLAGS) \
DBUS_BUS_LIBS = \
$(XML_LIBS) \
$(SELINUX_LIBS) \
$(THREAD_LIBS) \
$(ADT_LIBS) \
$(NETWORK_libs) \
$(NULL)
DBUS_LAUNCHER_LIBS = \
$(XML_LIBS) \
$(THREAD_LIBS) \
$(NETWORK_libs) \
$(NULL)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(XML_CFLAGS) \
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
-DDBUS_COMPILATION
-DDBUS_COMPILATION \
-DDBUS_STATIC_BUILD \
$(NULL)
# if assertions are enabled, improve backtraces
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
EFENCE=
......@@ -73,6 +93,8 @@ BUS_SOURCES= \
services.h \
signals.c \
signals.h \
stats.c \
stats.h \
test.c \
test.h \
utils.c \
......@@ -83,14 +105,11 @@ dbus_daemon_SOURCES= \
$(BUS_SOURCES) \
main.c
dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD
dbus_daemon_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(EFENCE) \
$(DBUS_BUS_LIBS)
dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@
LAUNCH_HELPER_SOURCES= \
$(XML_SOURCES) \
config-parser-common.c \
......@@ -110,13 +129,10 @@ dbus_daemon_launch_helper_SOURCES= \
activation-helper-bin.c \
$(LAUNCH_HELPER_SOURCES)
dbus_daemon_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD
dbus_daemon_launch_helper_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(DBUS_LAUNCHER_LIBS)
dbus_daemon_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@
## we build another binary so we can do the launch testing without root privs.
## DO NOT INSTALL THIS FILE
dbus_daemon_launch_helper_test_SOURCES= \
......@@ -127,8 +143,8 @@ dbus_daemon_launch_helper_test_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(DBUS_LAUNCHER_LIBS)
dbus_daemon_launch_helper_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
dbus_daemon_launch_helper_test_CPPFLAGS= -DDBUS_STATIC_BUILD \
dbus_daemon_launch_helper_test_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DACTIVATION_LAUNCHER_TEST
## we build yet another binary so we can do the OOM tests
......@@ -141,8 +157,8 @@ bus_test_launch_helper_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(DBUS_LAUNCHER_LIBS)
bus_test_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@
bus_test_launch_helper_CPPFLAGS= -DDBUS_STATIC_BUILD \
bus_test_launch_helper_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DACTIVATION_LAUNCHER_TEST \
-DACTIVATION_LAUNCHER_DO_OOM
......@@ -183,17 +199,13 @@ bus_test_system_SOURCES= \
utils.h \
test-system.c
bus_test_system_CPPFLAGS = -DDBUS_STATIC_BUILD
bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
bus_test_system_LDFLAGS=@R_DYNAMIC_LDFLAG@
bus_test_SOURCES= \
$(BUS_SOURCES) \
test-main.c
bus_test_CPPFLAGS = -DDBUS_STATIC_BUILD
bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
## mop up the gcov files
clean-local:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -144,10 +144,10 @@ out_all:
static dbus_bool_t
clear_environment (DBusError *error)
{
const char *debug_env = NULL;
const char *starter_env = NULL;
#ifdef DBUS_ENABLE_VERBOSE_MODE
const char *debug_env = NULL;
/* are we debugging */
debug_env = _dbus_getenv ("DBUS_VERBOSE");
#endif
......@@ -184,6 +184,7 @@ clear_environment (DBusError *error)
static dbus_bool_t
check_permissions (const char *dbus_user, DBusError *error)
{
#ifndef ACTIVATION_LAUNCHER_TEST
uid_t uid, euid;
struct passwd *pw;
......@@ -191,7 +192,6 @@ check_permissions (const char *dbus_user, DBusError *error)
uid = 0;
euid = 0;
#ifndef ACTIVATION_LAUNCHER_TEST
/* bail out unless the dbus user is invoking the helper */
pw = getpwnam(dbus_user);
if (!pw)
......@@ -403,12 +403,15 @@ get_correct_parser (BusConfigParser **parser, DBusError *error)
{
DBusString config_file;
dbus_bool_t retval;
#ifdef ACTIVATION_LAUNCHER_TEST
const char *test_config_file;
#endif
retval = FALSE;
test_config_file = NULL;
#ifdef ACTIVATION_LAUNCHER_TEST
test_config_file = NULL;
/* there is no _way_ we should be setuid if this define is set.
* but we should be doubly paranoid and check... */
if (getuid() != geteuid())
......
......@@ -143,16 +143,6 @@ bus_pending_activation_entry_free (BusPendingActivationEntry *entry)
dbus_free (entry);
}
static void
handle_timeout_callback (DBusTimeout *timeout,
void *data)
{
BusPendingActivation *pending_activation = data;
while (!dbus_timeout_handle (pending_activation->timeout))
_dbus_wait_for_memory ();
}
static BusPendingActivation *
bus_pending_activation_ref (BusPendingActivation *pending_activation)
{
......@@ -179,8 +169,7 @@ bus_pending_activation_unref (BusPendingActivation *pending_activation)
if (pending_activation->timeout_added)
{
_dbus_loop_remove_timeout (bus_context_get_loop (pending_activation->activation->context),
pending_activation->timeout,
handle_timeout_callback, pending_activation);
pending_activation->timeout);
pending_activation->timeout_added = FALSE;
}
......@@ -895,8 +884,6 @@ bus_activation_new (BusContext *context,
DBusError *error)
{
BusActivation *activation;
DBusList *link;
char *dir;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
......@@ -1337,22 +1324,16 @@ handle_servicehelper_exit_error (int exit_code,
}
}
static dbus_bool_t
babysitter_watch_callback (DBusWatch *watch,
unsigned int condition,
void *data)
static void
pending_activation_finished_cb (DBusBabysitter *babysitter,
void *data)
{
BusPendingActivation *pending_activation = data;
dbus_bool_t retval;
DBusBabysitter *babysitter;
dbus_bool_t uses_servicehelper;
babysitter = pending_activation->babysitter;
_dbus_assert (babysitter == pending_activation->babysitter);
_dbus_babysitter_ref (babysitter);
retval = dbus_watch_handle (watch, condition);
/* There are two major cases here; are we the system bus or the session? Here this
* is distinguished by whether or not we use a setuid helper launcher. With the launch helper,
* some process exit codes are meaningful, processed by handle_servicehelper_exit_error.
......@@ -1363,15 +1344,7 @@ babysitter_watch_callback (DBusWatch *watch,
*/
uses_servicehelper = bus_context_get_servicehelper (pending_activation->activation->context) != NULL;
/* FIXME this is broken in the same way that
* connection watches used to be; there should be
* a separate callback for status change, instead
* of doing "if we handled a watch status might
* have changed"
*
* Fixing this lets us move dbus_watch_handle
* calls into dbus-mainloop.c
*/
/* strictly speaking this is redundant with the check in dbus-spawn now */
if (_dbus_babysitter_get_child_exited (babysitter))
{
DBusError error;
......@@ -1431,8 +1404,6 @@ babysitter_watch_callback (DBusWatch *watch,
}
_dbus_babysitter_unref (babysitter);
return retval;
}
static dbus_bool_t
......@@ -1441,9 +1412,9 @@ add_babysitter_watch (DBusWatch *watch,
{
BusPendingActivation *pending_activation = data;
return _dbus_loop_add_watch (bus_context_get_loop (pending_activation->activation->context),
watch, babysitter_watch_callback, pending_activation,
NULL);
return _dbus_loop_add_watch (
bus_context_get_loop (pending_activation->activation->context),
watch);
}
static void
......@@ -1453,7 +1424,17 @@ remove_babysitter_watch (DBusWatch *watch,
BusPendingActivation *pending_activation = data;
_dbus_loop_remove_watch (bus_context_get_loop (pending_activation->activation->context),
watch, babysitter_watch_callback, pending_activation);
watch);
}
static void
toggle_babysitter_watch (DBusWatch *watch,
void *data)
{
BusPendingActivation *pending_activation = data;
_dbus_loop_toggle_watch (bus_context_get_loop (pending_activation->activation->context),
watch);
}
static dbus_bool_t
......@@ -1701,7 +1682,6 @@ bus_activation_activate_service (BusActivation *activation,
char **envp = NULL;
int argc;
dbus_bool_t retval;
DBusHashIter iter;
dbus_bool_t was_pending_activation;
DBusString command;
......@@ -1863,10 +1843,7 @@ bus_activation_activate_service (BusActivation *activation,
}
if (!_dbus_loop_add_timeout (bus_context_get_loop (activation->context),
pending_activation->timeout,
handle_timeout_callback,
pending_activation,
NULL))
pending_activation->timeout))
{
_dbus_verbose ("Failed to add timeout for pending activation\n");
......@@ -2136,10 +2113,14 @@ bus_activation_activate_service (BusActivation *activation,
_dbus_assert (pending_activation->babysitter != NULL);
_dbus_babysitter_set_result_function (pending_activation->babysitter,
pending_activation_finished_cb,
pending_activation);
if (!_dbus_babysitter_set_watch_functions (pending_activation->babysitter,
add_babysitter_watch,
remove_babysitter_watch,
NULL,
toggle_babysitter_watch,
pending_activation,
NULL))
{
......@@ -2567,14 +2548,18 @@ bus_activation_service_reload_test (const DBusString *test_data_dir)
_dbus_assert_not_reached ("could not initiate service reload test");
if (!do_service_reload_test (&directory, FALSE))
; /* Do nothing? */
{
/* Do nothing? */
}
/* Do OOM tests */
if (!init_service_reload_test (&directory))
_dbus_assert_not_reached ("could not initiate service reload test");
if (!do_service_reload_test (&directory, TRUE))
; /* Do nothing? */
{
/* Do nothing? */
}
/* Cleanup test directory */
if (!cleanup_service_reload_test (&directory))
......
......@@ -102,19 +102,6 @@ server_get_context (DBusServer *server)
return context;
}
static dbus_bool_t
server_watch_callback (DBusWatch *watch,
unsigned int condition,
void *data)
{
/* FIXME this can be done in dbus-mainloop.c
* if the code in activation.c for the babysitter
* watch handler is fixed.
*/
return dbus_watch_handle (watch, condition);
}
static dbus_bool_t
add_server_watch (DBusWatch *watch,
void *data)
......@@ -124,9 +111,7 @@ add_server_watch (DBusWatch *watch,
context = server_get_context (server);
return _dbus_loop_add_watch (context->loop,
watch, server_watch_callback, server,
NULL);
return _dbus_loop_add_watch (context->loop, watch);
}
static void
......@@ -138,17 +123,19 @@ remove_server_watch (DBusWatch *watch,
context = server_get_context (server);
_dbus_loop_remove_watch (context->loop,
watch, server_watch_callback, server);
_dbus_loop_remove_watch (context->loop, watch);
}
static void
server_timeout_callback (DBusTimeout *timeout,
void *data)
toggle_server_watch (DBusWatch *watch,
void *data)
{
/* can return FALSE on OOM but we just let it fire again later */
dbus_timeout_handle (timeout);
DBusServer *server = data;
BusContext *context;
context = server_get_context (server);
_dbus_loop_toggle_watch (context->loop, watch);
}
static dbus_bool_t
......@@ -160,8 +147,7 @@ add_server_timeout (DBusTimeout *timeout,
context = server_get_context (server);
return _dbus_loop_add_timeout (context->loop,
timeout, server_timeout_callback, server, NULL);
return _dbus_loop_add_timeout (context->loop, timeout);
}
static void
......@@ -173,8 +159,7 @@ remove_server_timeout (DBusTimeout *timeout,
context = server_get_context (server);
_dbus_loop_remove_timeout (context->loop,
timeout, server_timeout_callback, server);
_dbus_loop_remove_timeout (context->loop, timeout);
}
static void
......@@ -255,7 +240,7 @@ setup_server (BusContext *context,
if (!dbus_server_set_watch_functions (server,
add_server_watch,
remove_server_watch,
NULL,
toggle_server_watch,
server,
NULL))
{
......@@ -284,7 +269,7 @@ static dbus_bool_t
process_config_first_time_only (BusContext *context,
BusConfigParser *parser,
const DBusString *address,
dbus_bool_t systemd_activation,
BusContextFlags flags,
DBusError *error)
{
DBusString log_prefix;
......@@ -300,17 +285,24 @@ process_config_first_time_only (BusContext *context,
retval = FALSE;
auth_mechanisms = NULL;
pidfile = NULL;
_dbus_init_system_log ();
context->systemd_activation = systemd_activation;
if (flags & BUS_CONTEXT_FLAG_SYSTEMD_ACTIVATION)
context->systemd_activation = TRUE;
else
context->systemd_activation = FALSE;
/* Check for an existing pid file. Of course this is a race;
* we'd have to use fcntl() locks on the pid file to
* avoid that. But we want to check for the pid file
* before overwriting any existing sockets, etc.
*/
pidfile = bus_config_parser_get_pidfile (parser);
if (flags & BUS_CONTEXT_FLAG_WRITE_PID_FILE)
pidfile = bus_config_parser_get_pidfile (parser);
if (pidfile != NULL)
{
DBusString u;
......@@ -509,7 +501,6 @@ process_config_every_time (BusContext *context,
DBusString full_address;
DBusList *link;
DBusList **dirs;
BusActivation *new_activation;
char *addr;
const char *servicehelper;
char *s;
......@@ -709,17 +700,18 @@ process_config_postinit (BusContext *context,
BusContext*
bus_context_new (const DBusString *config_file,
ForceForkSetting force_fork,
BusContextFlags flags,
DBusPipe *print_addr_pipe,
DBusPipe *print_pid_pipe,
const DBusString *address,
dbus_bool_t systemd_activation,
DBusError *error)
{
DBusString log_prefix;
BusContext *context;
BusConfigParser *parser;
_dbus_assert ((flags & BUS_CONTEXT_FLAG_FORK_NEVER) == 0 ||
(flags & BUS_CONTEXT_FLAG_FORK_ALWAYS) == 0);
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
context = NULL;
......@@ -768,7 +760,7 @@ bus_context_new (const DBusString *config_file,
goto failed;
}
if (!process_config_first_time_only (context, parser, address, systemd_activation, error))
if (!process_config_first_time_only (context, parser, address, flags, error))
{
_DBUS_ASSERT_ERROR_IS_SET (error);
goto failed;
......@@ -863,7 +855,8 @@ bus_context_new (const DBusString *config_file,
if (context->pidfile)
_dbus_string_init_const (&u, context->pidfile);
if ((force_fork != FORK_NEVER && context->fork) || force_fork == FORK_ALWAYS)
if (((flags & BUS_CONTEXT_FLAG_FORK_NEVER) == 0 && context->fork) ||
(flags & BUS_CONTEXT_FLAG_FORK_ALWAYS))
{
_dbus_verbose ("Forking and becoming daemon\n");
......@@ -1421,9 +1414,6 @@ bus_context_check_security_policy (BusContext *context,
dbus_bool_t log;
int type;
dbus_bool_t requested_reply;
const char *sender_name;
const char *sender_loginfo;
const char *proposed_recipient_loginfo;
type = dbus_message_get_type (message);
dest = dbus_message_get_destination (message);
......@@ -1589,9 +1579,6 @@ bus_context_check_security_policy (BusContext *context,
proposed_recipient,
message, &toggles, &log))
{
const char *msg = "Rejected send message, %d matched rules; "
"type=\"%s\", sender=\"%s\" (%s) interface=\"%s\" member=\"%s\" error name=\"%s\" requested_reply=%d destination=\"%s\" (%s))";
complain_about_message (context, DBUS_ERROR_ACCESS_DENIED,
"Rejected send message", toggles,
message, sender, proposed_recipient, requested_reply,
......
......@@ -66,17 +66,18 @@ typedef struct
typedef enum
{
FORK_FOLLOW_CONFIG_FILE,
FORK_ALWAYS,
FORK_NEVER
} ForceForkSetting;
BUS_CONTEXT_FLAG_NONE = 0,
BUS_CONTEXT_FLAG_FORK_ALWAYS = (1 << 1),
BUS_CONTEXT_FLAG_FORK_NEVER = (1 << 2),
BUS_CONTEXT_FLAG_WRITE_PID_FILE = (1 << 3),
BUS_CONTEXT_FLAG_SYSTEMD_ACTIVATION = (1 << 4)
} BusContextFlags;