summaryrefslogtreecommitdiff
path: root/bus
AgeCommit message (Collapse)AuthorFilesLines
2014-06-05Imported Upstream version 1.8.4upstream/1.8.4Simon McVittie3-11/+24
2014-04-30Imported Upstream version 1.8.2upstream/1.8.2Simon McVittie1-0/+1
2014-04-28Add "Documentation=man:dbus-daemon(1)" line to systemd serviceCameron Norman1-0/+1
Enhances usability under systemd by making the documentation available with systemctl status or systemctl help. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77447 Reviewed-by: Simon McVittie
2014-01-20Imported Upstream version 1.8.0upstream/1.8.0Simon McVittie3-192/+194
2014-01-17Rename bus-test-launch-helper to test-bus-launch_helper to match common test ↵Ralf Habacker2-5/+5
application naming scheme. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename bus-test-system to test-bus-system to match common test application ↵Ralf Habacker2-4/+4
naming scheme. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17Rename bus-test to test-bus to match common test application naming scheme.Ralf Habacker2-4/+4
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-14Don't forget allow_anonymous when merging configsMatt Hoosier1-0/+3
The algorithm to collapse a subsidiary config file's data into the master data structure forgot to examine this flag. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73475 Reviewed-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-06Imported Upstream version 1.7.10upstream/1.7.10Simon McVittie10-149/+342
2014-01-06kqueue: open watched directories with close-on-exec flagChengwei Yang1-1/+1
[FreeBSD and OpenBSD contributors clarified that O_CLOEXEC has been supported for ~ 2 years on both, so for the moment we're assuming that every platform with kqueue also has working O_CLOEXEC. Please reopen the bug, with a tested patch that uses _dbus_fd_set_close_on_exec() instead, if this assumption turns out to be false. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=72213 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-06BusTransaction: remove confusing getter of connectionsChengwei Yang4-9/+2
There is a DBusList* member of BusTransaction named "connections", while its getter function bus_transaction_get_connections() returns context->connections which in fact is a BusConnections pointer, this is quite confusing. Because this is what bus_context_get_connections() returns. This patch call out to bus_context_get_connections() directly and remove the then unused bus_transaction_get_connections(). https://bugs.freedesktop.org/show_bug.cgi?id=71597 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-06Fix memory leak for kqueue: shutdown kqueue correctlyChengwei Yang1-13/+74
There are memory blocks leak when doing bus-test, both dispatch-sha1 and dispatch test cases complain memory blocks leak. This patch also fix fd leaks. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69332 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-06kqueue: replace tab with spaceChengwei Yang1-51/+51
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69332 [altered commit message to not say it fixes memory leaks -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-06Reload policy rules for completed connectionsChengwei Yang3-0/+50
The message bus which can monitor its conf dirs for changes and reload confs immediately if dir monitor enabled, for example, inotify in Linux, kqueue in *BSD. However, it doesn't apply policy rules change for completed connections, so to apply policy rules change, the client connection has to disconnect first and then re-connect to message bus. For imcomplete connections, it always has the latest review of policy rules. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39463 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-11-12Merge branch 'dbus-1.6'Simon McVittie2-2/+2
2013-11-12fixed memory freeing if error during listing servicesRadoslaw Pajak2-2/+2
Signed-off-by: Radoslaw Pajak <r.pajak@samsung.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71526
2013-11-07selinux: Use selinux_set_mapping() to avoid hardcoded constants for policyosmond sun2-4/+28
Previous to the introduction of selinux_set_mapping(), DBus pulled constants generated from the system's policy at build time. But this means it's impossible to replace the system policy without rebuilding userspace components. This patch maps from arbitrary class/perm indices used by D-Bus and the policy values and handles all the translation at runtime on avc_has_perm() calls. Bug: https://bugs.freedesktop.org/attachment.cgi?id=88719 Reviewed-By: Colin Walters <walters@verbum.org> Tested-By: Colin Walters <walters@verbum.org>
2013-11-01Imported Upstream version 1.7.8upstream/1.7.8Simon McVittie6-160/+129
2013-11-01bus/selinux: Fix previous commit for CAP_AUDIT_WRITE retentionColin Walters1-1/+7
As soon as capng_clear() is called, we won't appear to have CAP_AUDIT_WRITE. Fix this by checking for it before resetting the libcap state. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49062 Tested-by: Laurent Bigonville <bigon@debian.org> Reviewed-by: Laurent Bigonville <bigon@debian.org> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Lennart Poettering <lennart@poettering.net>
2013-11-01DBusBabysitter: change executable to log_nameChengwei Yang1-1/+3
DBusBabysitter->executable is defined as executable name to use in error messages. However, if servicehelper used, then the executable name is servicehelper. It's not much help because we couldn't figure out which service we're trying to activated if error happens. In the following patch, we'll use service name to be activated as the child log identifier and add a parameter to _dbus_spawn_async_with_babysitter() to pass the log identifier. Since this is not the case in test, so executable changed to log_name. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68559 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-11-01transaction_free: factor outSimon McVittie1-10/+12
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60859 Reviewed-by: Chengwei Yang [removed unused variable based on review -smcv]
2013-11-01Use SIGHUP without check in UNIX environmentChengwei Yang1-4/+0
As Simon's comment https://bugs.freedesktop.org/show_bug.cgi?id=66068#c8 we can do this in UNIX environment. Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-23Merge branch 'dbus-1.6'Simon McVittie1-1/+29
2013-10-23path_namespace='/' should match everythingSimon McVittie1-1/+29
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=70799 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Ryan Lortie <desrt@desrt.ca>
2013-10-09Imported Upstream version 1.7.6upstream/1.7.6Simon McVittie25-407/+259
2013-10-09Remove unused key-word of DBus .service fileChengwei Yang1-1/+0
Key-word "Group" of DBus .service file hasn't been used since it was introduced in 2007, so it's fine to remove it. https://bugs.freedesktop.org/show_bug.cgi?id=19158 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-10-09launch-helper: fix error code parsingChengwei Yang3-2/+10
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66728 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-23bus-test: only expect GetConnectionUnixProcessID to succeed sometimesSimon McVittie1-0/+6
On platforms that use getpeereid(), this can't work. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60340 Reviewed-by: Colin Walters <walters@verbum.org>
2013-09-13selinux: when dropping capabilities only include AUDIT caps if we have themLennart Poettering1-2/+3
When we drop capabilities we shouldn't assume we can keep CAP_AUDIT_WRITE unconditionally, since it will not be available when running in containers. This patch only adds CAP_AUDIT_WRITE to the list of caps we keep if we actually have it in the first place. This makes audit/selinux enabled D-Bus work in a Linux container. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49062 Acked-by: Thiago Macieira <thiago@kde.org> Acked-by: Colin Walters <walters@verbum.org> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-09-03Allow dbus-daemon --nofork on WindowsSimon McVittie1-2/+2
On Windows, the dbus-daemon is not able to fork (daemonize). If someone explicitly requests forking, it should fail, but if someone explicitly requests *not* forking, there seems no harm in allowing it. A few of the regression tests specifically require a dbus-daemon that will not fork, so allowing this option on Windows means those tests don't need an extra OS condition. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-08-30Fix unused function when SELinux is not enabledSimon McVittie1-3/+4
It must be one of the "only smcv tests this" configurations...
2013-08-29_dbus_get_tmpdir: be thread-safeSimon McVittie1-1/+7
Sharing a static variable between threads is not safe in general, and this function is used in the shared libdbus (for nonce files), so it can't rely on being single-threaded. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68610 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-08-23Cleanup: simplify assertion checkChengwei Yang1-14/+3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68303 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-23fix whitespaceSimon McVittie1-1/+1
2013-08-23Cleanup: polish inotify backendChengwei Yang1-9/+7
At previous, it will do get pid and print a verbose string per inotify event, and then do send signal to the daemon. This patch changes the behavior to get pid and print a verbose string one time. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68303 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-23Cleanup: polish verbose mode checkingChengwei Yang2-16/+5
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-23Export dbus_setenv() as a utility functionSimon McVittie4-9/+13
It's sufficiently portable that GLib has an equivalent, and I really don't want to have to either open-code it in dbus-run-session or link dbus-run-session statically. We have enough statically-linked rubbish already. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39196 Reviewed-by: Colin Walters <walters@verbum.org>
2013-08-23Revert "Factor out DBusAuthorization from DBusTransport"Simon McVittie1-11/+0
This reverts commit 600621dbc8073527a958091316eddfbb490c1032.
2013-08-23Factor out DBusAuthorization from DBusTransportCosimo Alfarano1-0/+11
In order to authorize/reject a connection in a polite way, instead of cutting it off after authentication succeed and Hello() is sent, because authorization failed, we need to factor out some authorization bits from DBusTransport and pass them to DBusAuth. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39720 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-22GetConnectionCredentials: addSimon McVittie1-0/+77
The initial set of credentials is just UnixUserID and ProcessID. The rest can follow when someone is sufficiently interested to actually test them. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> [rename a function that Ralf found unclear -smcv] Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-22Fix build with "--enable-stats"Chengwei Yang1-1/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-28tests to embedded tests: replaced in automake filesChengwei Yang1-2/+2
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-28tests to embedded tests: replaced in dbus-daemonChengwei Yang13-30/+30
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-28dir-watch: remove dnotify backendChengwei Yang3-104/+0
dnotify as a dir watch backend is broken since Jan 2010 (almost 3.5 years). According to fd.o: #33001, it's no harm to remove dnotify from this project. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33001 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-26kqueue: remove unused variableChengwei Yang1-1/+1
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66035
2013-06-25Convert a{sv} helpers from Stats into generic utility codeSimon McVittie1-187/+52
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-06-24Fix build failure if build with "--enable-stats"Chengwei Yang1-2/+3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66004 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-20Let dbus-daemon not print unavailable options on windows.Ralf Habacker1-5/+23
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42441 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-17Make taking a global lock automatically initialize locking if neededSimon McVittie1-2/+2
This lets them be thread-safe by default, at the cost that they can now fail. init_uninitialized_locks() and init_global_locks() must now both reimplement the equivalent of _dbus_register_shutdown_func(), by using _dbus_platform_rmutex_lock() on the same underlying mutex around a call to _dbus_register_shutdown_func_unlocked(). This is because if they used the usual _DBUS_LOCK() API (as _dbus_register_shutdown_func() does), it would automatically try to initialize global locking, leading to infinite recursion. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk> Reviewed-by: Anas Nashif <anas.nashif@intel.com>
2013-06-12Imported Upstream version 1.7.4upstream/1.7.4Simon McVittie6-482/+179