summaryrefslogtreecommitdiff
path: root/bus
AgeCommit message (Collapse)AuthorFilesLines
2012-02-13Replace a series of booleans, all (apparently) alike, with flagsSimon McVittie4-38/+63
This makes it a bit clearer what's going on. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10Merge branch 'system-search-paths-21620'Simon McVittie1-2/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=21620 Reviewed-by: Lennart Poettering <lennart@poettering.net>
2012-02-10bus: introduce --nopidfile switch to disable writing of PID filesLennart Poettering5-6/+17
When used with init systems such as systemd (where PID files are redundant) this allows us to disable PID files even if a path is configured for them in the normal bus configuration files. Make use of this new switch in the systemd unit file. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45520 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-08Explicitly don't search XDG_DATA_DIRS for system services, and document itSimon McVittie1-2/+2
In practice, it never works, because the activation helper doesn't respect environment variables for security reasons. If you want to vary the search path, alter system.conf instead, to replace or augment <standard_system_servicedirs/> with your preferred search path. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=21620 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-07systemd: drop machine UUID generation for unit fileLennart Poettering1-1/+0
To optimize startup a bit, drop machine UUID generation from the unit file. Since a while D-Bus was already capable of making use of the /etc/machine-id file, which is guaranteed to exist on systemd systems (since the first released versions already), hence there's no need to ever generate a D-Bus specific machine ID. In times where userspace takes < 800ms to boot up getting rid of this process optimizes boot time further. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45520 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-07Merge branch 'socket-set-33337'Simon McVittie4-4/+42
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
2012-01-23Merge branch 'dbus-1.4', rejecting commit 08dd53c14b53b88cSimon McVittie1-0/+1
2012-01-23Revert addition of files which were only meant to exist on master, tooSimon McVittie2-390/+0
This completes the reversion started in 5df8c3db12590edd68e968.
2012-01-23dbus-daemon: fix forgotten counter increase while copying configured auth ↵Simon McVittie1-0/+1
mechanisms Previously, only one auth mechanism was used. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45106 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-01-04Revert "made session service dirs customizable: cmake part"Simon McVittie1-1/+1
This reverts commit 89e453216c02bb85c5e53d459997f8bc3b2c73d4. It makes the tests fail under autotools.
2012-01-04Revert "made session service dirs customizable: autotools part"Simon McVittie1-2/+0
This reverts commit 61760cf7de5af3452423244a8b6f5f1b5d00512b.
2012-01-04Revert all changes since a36d4918a6f646e085Simon McVittie20-922/+468
Someone seems to have merged part of master into 1.4. Again. Let's go back to the "last known good" point (the branch-point of some 1.4 branches I had locally), then we can cherry-pick the changes that should have gone in.
2011-11-21made session service dirs customizable: autotools partRalf Habacker1-0/+2
2011-11-21made session service dirs customizable: cmake partRalf Habacker1-1/+1
2011-09-28Merge tests' cmake and autotools bus configurationSimon McVittie1-19/+12
In Unix, the tests listened on both debug-pipe (which is a socketpair, or a TCP emulation of socketpair on Windows) and a Unix socket. In the Windows port, the tests were hard-coded to listen on a particular port, which allowed the dispatch test to connect to that port, as long as no two tests ran simultaneously (which I don't think was ever guaranteed - make -j can violate this). That's valid out-of-process, and also fully-specified, so they only needed one <listen> directive, so the CMake input only had one. To make the tests work under CMake on Unix, there was a hack: the string substituted for the content of the <listen> directive contained </listen><listen> to get the other address in, which is pretty nasty. Instead of doing that, I've made both build systems, on both Unix and Windows, use both debug-pipe and a more normal transport (Unix or TCP). debug-pipe has a Windows implementation and it's used in dbus-spawn-win.c, so it'd better work. The use of debug-pipe is now hard-coded rather than being a configure parameter (there's no reason to vary it in different builds), and I used TEST_LISTEN as the name of the Unix/TCP address, because it's a "vague" address (no specific Unix path, no TCP port), that you can listen on but not connect to. This in turn means that we can merge the Autoconf .in and CMake .cmake files, similar to Bug #41033. You might wonder why I've kept debug-pipe. I did try to get rid of it, but it turns out that the tests in dispatch.c rely on dbus_connection_open_private() not blocking, and normal socket connections block on connect(). Until we fix that by adding an async version of dbus_connection_open_private(), it won't be safe to have a test like dispatch.c that "talks to itself", unless it uses a transport as trivial as debug-pipe in which neither end has to block on the other. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-21Imported Upstream version 1.5.8upstream/1.5.8Simon McVittie15-105/+135
2011-09-21Merge branch 'more-unused-39231'Simon McVittie6-45/+25
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21Merge branch 'remove-stub-tests-41012'Simon McVittie3-25/+0
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41012 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21Merge branch 'dbus-1.4'Simon McVittie1-4/+7
Conflicts: NEWS
2011-09-21update_desktop_file_entry: initialize return value properly, and actually ↵Simon McVittie1-1/+2
return it Since 1.4.4 (commit 75cfd97f) this function always returned FALSE. As far as I can see this was actually harmless, because both of its callers ignore any error that is not NoMemory (and treat it the same as success). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39230 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21update_desktop_file_entry: if the service name already existed, set errorSimon McVittie1-1/+4
If we're going to return FALSE for this (which has apparently always been the case), then we should set an error properly. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39230 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21update_desktop_file_entry: don't leak file_path on one particular OOMSimon McVittie1-2/+1
Revenge of #33126: most, but not all, temporary variables were freed on this code path. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39230 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-19bus_policy_test: remove stubSimon McVittie3-25/+0
2011-09-19Use {}, not semicolon, when the statement of an "if" does nothingSimon McVittie1-2/+6
The uses in bus/activation.c are also probably wrong because they ignore the result of the test, but that's orthogonal. (<https://bugs.freedesktop.org/show_bug.cgi?id=39858>)
2011-09-19Fix an assortment of variables that aren't used when not checking/assertingSimon McVittie1-8/+15
2011-09-19BusConnections: don't assert about BusConnectionData in functions that don't ↵Simon McVittie1-11/+0
need it
2011-09-19bus_driver_handle_message: remove unused labelSimon McVittie1-1/+0
2011-09-19activation helper: remove unused variable when not being verboseSimon McVittie1-2/+2
2011-09-19bus_registry_acquire_service: remove unnecessary variableSimon McVittie1-5/+2
2011-09-19Remove a never-used callbackSimon McVittie1-8/+0
2011-09-19Remove more never-used variablesSimon McVittie1-8/+0
2011-08-26Merge branch 'dbus-1.4'Simon McVittie1-2/+5
2011-08-26Don't build any of the reload-pipe code on non-UnixSimon McVittie1-2/+5
In commit ab7b3f9, Ralf notes that handle_reload_watch() is (in principle) cross-platform. However, there's no way to trigger it on Windows, because nothing ever writes to the pipe. Make the entire pipe-to-self trick Unix-specific instead. Reviewed-by: Will Thompson <will.thompson@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40002
2011-08-13Fix compilation on MSVC, which doesn't understand "inline" with its C99 meaning.Ralf Habacker1-6/+1
This fix is limited to msvc compilers only. Reviewed-by:Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-08-11capng: Drop supplemental groups when switching to daemon userSteve Grubb1-1/+1
This patch ensures the daemon process doesn't inherit any supplemental groups for the root user from an administrator login via an init script. This is only an issue for pre-systemd systems. https://bugzilla.redhat.com/show_bug.cgi?id=726953
2011-08-05Win32 compile fix.Ralf Habacker1-1/+6
msvc compilers define 'inline' only for c++ code, so wrap it with a platform independent DBUS_INLINE define in cmake generated config.h.
2011-08-05Win32 compile fix.Ralf Habacker1-1/+1
Do not limit ACTION_RELOAD to unix only because it is used in the crossplattform function handle_reload_watch().
2011-08-05Merge branch 'dbus-1.4'Simon McVittie1-9/+75
Conflicts: bus/main.c
2011-08-05bus signal_handler: call _exit in the unlikely event that the pipe is full ↵Simon McVittie1-2/+8
or invalid On OSs with abstract sockets, this is close enough. On OSs without abstract sockets, this results in failing to clean up Unix sockets in /tmp if someone has sent us thousands of SIGHUP signals since we last entered the main loop - I think that's acceptable. The reload pipe should never get closed, but if it is for some reason, we want a SIGTERM after that to cause an exit too. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05bus signal_handler: comment why it's OK if the reload pipe gets fullSimon McVittie1-0/+13
Backported to dbus-1.4, originally part of commit c7ef3ead558e147. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33336 Reviewed-by: Thiago Macieira <thiago@kde.org>
2011-08-05bus signal_handler: don't pretend to be portable away from UnixSimon McVittie1-0/+8
Signals are POSIX but not ISO C, so guard it with DBUS_UNIX. dbus-sysdeps-util-win doesn't actually implement _dbus_set_signal_handler anyway, so not compiling this code on non-Unix seems more honest. Backported to dbus-1.4, originally part of commit c7ef3ead558e147. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33336 Reviewed-by: Thiago Macieira <thiago@kde.org>
2011-08-05Conditionalize inclusion of unistd.hSimon McVittie1-0/+2
Windows doesn't have it, for instance. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05Handle SIGTERM again, to avoid leaving /tmp/dbus-XXX sockets on SolarisBrian Cameron1-11/+73
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-08-05config-parser: don't try to get CommonProgramFiles from the environment on UnixSimon McVittie1-3/+8
It's unused on Unix, and gcc warns. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05activation-helper: remove unused variable from the real buildSimon McVittie1-1/+4
It's only used in the test build. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05activation-helper: check_permissions: in the test build, don't have unused ↵Simon McVittie1-1/+1
variables In the real build they're used to check permissions. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05Remove various never-used variablesSimon McVittie4-14/+0
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231 Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-01capng: Drop supplemental groups when switching to daemon userSteve Grubb1-1/+1
This patch ensures the daemon process doesn't inherit any supplemental groups for the root user from an administrator login via an init script. This is only an issue for pre-systemd systems. https://bugzilla.redhat.com/show_bug.cgi?id=726953
2011-07-29Imported Upstream version 1.5.6upstream/1.5.6Simon McVittie19-1475/+902
2011-07-29bus: use AM_CPPFLAGS to simplify preprocessor invocationSimon McVittie1-8/+9
Everything in this directory is statically linked to libdbus-internal, so we can make -DDBUS_STATIC_BUILD global. Also, merge INCLUDES into AM_CPPFLAGS (it's an older name for the same functionality).