Radoslaw Pajak [Mon, 2 Sep 2013 06:37:52 +0000 (08:37 +0200)]
Small fixes for dbus-kdbus translations
- autostart flag from dbus message translated to kdbus
- errno EADDRNOTAVAIL handled when sending message
- fixed KDBUS_MSG_REPLY_DEAD translation to dbus error
Change-Id: Ia4a31adc1cb3a956efc515a94114dad3d7ba1026
Radoslaw Pajak [Mon, 26 Aug 2013 12:40:55 +0000 (14:40 +0200)]
dbus daemon emulation exteneded
- added handling of dbus daemon method GetConnectionSELinuxSecurityContext
- added error reply for not supported method GetAdtAuditSessionData
Change-Id: I5efeb6d1fe15c6ff86e56a8393a3ff8caa101a6e
Michal Eljasiewicz [Mon, 26 Aug 2013 08:21:27 +0000 (10:21 +0200)]
Added latency pingpong dbus test and script
Script for automatic Foxp testing adapted for latency tests.
Change-Id: Icee320ec1a6d40e88ad3de335eee5a65803bd6eb
Michal Eljasiewicz [Fri, 23 Aug 2013 13:54:24 +0000 (15:54 +0200)]
Memfd memory leak fix
memfd file descriptors were not closed, thats why memory was not free'd
Change-Id: I553e91d8caf8ba5a21578f88aa8d21a644c7e505
Radoslaw Pajak [Fri, 23 Aug 2013 10:40:57 +0000 (12:40 +0200)]
dbus-daemon emulation improved and refactored
- added handling of GetId method of org.freedesktop.DBus
- errors of org.freedesktop.DBus methods expanded to equal that of dbus-daemon
- org.freedesktop.DBus emulation refactored and optimized
- some minor fixes
Change-Id: I1d9e670e36d6bc568518feacb6b14efc052ce735
Radoslaw Pajak [Tue, 13 Aug 2013 10:17:36 +0000 (12:17 +0200)]
Next 2 org.freedesktop.DBus method, comments, cleanups
- added handling of next 2 org.freedesktop.DBus methods: GetConnectionUnixUser, GetConnectionUnixProcessID
- comments added
- some cleanups
Change-Id: Ie840bfce48b849e037a128b2a76587d3e0f80197
Michal [Mon, 12 Aug 2013 15:10:54 +0000 (17:10 +0200)]
Documentation expanded
Change-Id: I91b6e1de13794e5fc585b16c08c1d4a85cb4f966
Radoslaw Pajak [Tue, 13 Aug 2013 07:58:55 +0000 (09:58 +0200)]
Fix for long id continued, iprovements, comments
- fix for long id continued (in next lines)
- bloom size changed from define to actual value sent by bus
- unnecessary parameters removed from functions
- some comments added
Change-Id: I8547b7253ef1a518a950d290bb07f3a5b257c212
Michal [Mon, 12 Aug 2013 13:24:32 +0000 (15:24 +0200)]
Memfd: fix big messages receiving.
Memory buffer needs to be bigger
Change-Id: Ibb19986c267a7e80bcbfe47c74f270e7acd47ea2
Radoslaw Pajak [Mon, 12 Aug 2013 12:10:42 +0000 (14:10 +0200)]
Fixed error with id >0x7FFFFFFFFFFFFFFF and others
- fixed error with id > 0x7FFFFFFFFFFFFFFF because of wrong string to unsigned long long int conversion
- KDBUS_MSG_REPLY_DEAD reply error mapped to dbus reply error
- removed unused function parameters
- another part of currently unused authentication related code put into #ifdef DBUS_AUTHENTICATION
- some comments added
- removed unnecesery code commented out in past
Change-Id: I19012c23e4afc808ff3e2607a237303bd5552822
Radoslaw Pajak [Thu, 8 Aug 2013 08:19:59 +0000 (10:19 +0200)]
Added NameList method handling, small improvemnets and cleanups
- Addded handling of org.freedesktop.DBus method "NameList"
- Element not found added to error messages
- in hello message commented out flags for sending unnecessary kdbus message parts
- change in kdbus message decoding - if part size is incorrect, stop decoding
- some small cleanups and improvements
Change-Id: I8ee4cf8301f1f3876f614c25798abc63c4ebe634
Radoslaw Pajak [Tue, 6 Aug 2013 13:27:20 +0000 (15:27 +0200)]
Added fd passing and small corrections
- added passing fd through kdbus
- fixed sizes of mapped area when receiving memfd and receive pool
- unnecessary authentication code disabled by definition DBUS_AUTHENTICATION
- small fixes and cleanups
Change-Id: Ibe505c5ccb2790a054eb37a3f899ed5b2a378bc6
Jacek Janczyk [Tue, 6 Aug 2013 13:49:28 +0000 (15:49 +0200)]
Fix_for_32bit: added data alignment for some kdbus structures
Added alignments required by kdbus architecture in structures
passed to ioctl.
Change-Id: I4ab48709a4f6f43091f3fffa299e75ee1801ccc1
Signed-off-by: Jacek Janczyk <j.janczyk@samsung.com>
Michal Eljasiewicz [Tue, 6 Aug 2013 11:28:37 +0000 (13:28 +0200)]
refactored memfd
setup at every message. Pool sizes changed
Change-Id: Ia0bc93ceb0928fb241f6ed0c638c7b89e8cca73f
Radoslaw Pajak [Mon, 5 Aug 2013 06:50:06 +0000 (08:50 +0200)]
Pool sizes redefined and cleanup
- POOL_SIZE split into RECEIVE_POOL_SIZE and MEMFD_POOL_SIZE
- deleted some unused lines already commented out
- fixed dbus_bus_register
Change-Id: I981e00b795856e83000445bc68df208e01257594
Radoslaw Pajak [Wed, 24 Jul 2013 13:17:26 +0000 (15:17 +0200)]
- fixed detecting whether emulate org.freedesktop.DBus interface (dbus daemon)
when sending message
- improved dbus_bus_add_match for kdbus - now distinguish sender key (mapped to src_name),
interface key (mapped to bloom) and detects org.freedesktop.DBus's name related members
- bloom filled in kdbus_write... functions because of above dbus_bus_add_match improvement
- added dbus_bus_remove_match - but it ignire rules and deletes everythig for given connection id
Change-Id: I09e658f748ba9230601c128c3e67a0cb6ce8340d
Michal Eljasiewicz [Tue, 23 Jul 2013 10:30:49 +0000 (12:30 +0200)]
kdbus_write_msg refactored.
kdbus_write_msg_encoded merged into single
function kdbus_write_msg.
added MEMFD handling.
FIX refactored out concatenating msg header & body
FIX encoded data is sent with memfd too
Radoslaw Pajak [Fri, 19 Jul 2013 13:38:17 +0000 (15:38 +0200)]
- fixed dbus_bus_request_name
- fixed error handling when writing to not existinig recipient
- added handling of org.freedesktop.DBus methods: GetNameOwner and NameHasOwner
- some small optimizations
Change-Id: I4ffdce1a7b089bedb065efe2247a22c44ccf9d86
Radoslaw Pajak [Tue, 16 Jul 2013 11:39:29 +0000 (13:39 +0200)]
Minor fixes and improvements. Deleted some not needed debug verboses.
Change-Id: I43ed82dd0f103d96e7df48ee7e6cd859dcb640af
Radoslaw Pajak [Thu, 11 Jul 2013 12:57:19 +0000 (14:57 +0200)]
- fixed sending messages without body
- fixed sending messages without requesting name
Change-Id: Ib2c5de13829b51b1a2ddac78511f6e4c83dc6c22
Radoslaw Pajak [Wed, 10 Jul 2013 13:14:22 +0000 (15:14 +0200)]
- kdbus reply timeout translated to DBus message
- kdbus message sending error ENXIO (no recipient on the bus) translated to corresponding DBus error message ServiceU$
- compatibility with 32bit machines improved
Michal Eljasiewicz [Tue, 9 Jul 2013 13:37:58 +0000 (15:37 +0200)]
refactoring: function prototypes unnecessary
Change-Id: Ib41be287421d45c0ba284fd88cb9dff59c85eccc
Signed-off-by: Michal Eljasiewicz <m.eljasiewic@samsung.com>
Radoslaw Pajak [Tue, 9 Jul 2013 11:31:48 +0000 (13:31 +0200)]
Only comments - commit needed to overcome git/gerrit problems
Radoslaw Pajak [Tue, 9 Jul 2013 07:37:37 +0000 (09:37 +0200)]
Added translation of system broadcast (new id, id remove, new name, name removed)
from kdbus format to dbus messages(signals).
do_io_error in do_reading don't need to be commented out any more.
todo message replay timeout to be translated form kdbus to dbus
Radoslaw Pajak [Fri, 5 Jul 2013 12:46:33 +0000 (14:46 +0200)]
Working - send method call and reply with serverClient
added sender to message header when kdbus
header aligned by upper layers - do not need to align in kdbus
do_io_error stil must be commented out in do reading when bytes_read == 0
todo - translate kdbus "system" broadcasts into dbus messages
Radoslaw Pajak [Fri, 5 Jul 2013 08:01:13 +0000 (10:01 +0200)]
Working - simple message passing with serverClient signal send-receive
BUT do_io_error must be commented out in do_reading when bytes_read == 0 to filter out kdbus "system" broadcasts (new id, new name, name remove, id remove)
TODO - translate kdbus "system" broadcasts into dbus messages
- test messages with header not aligned
Radoslaw Pajak [Wed, 3 Jul 2013 07:47:11 +0000 (09:47 +0200)]
Working: - dbus authorization replaced by kdbus policies
- sending message
To do: dbus authorization replaced by kdbus policies to be refactored when kdbus policies will be documented
Radoslaw Pajak [Thu, 27 Jun 2013 09:23:29 +0000 (11:23 +0200)]
Updated dbus_bus_request_name
Added dbus_bus_add_match - because of differences and lack of documentation of kdus match adding it adds match to everything
Radoslaw Pajak [Wed, 26 Jun 2013 13:53:12 +0000 (15:53 +0200)]
working:
- request name (without some flags not supperted by kdbus now)
- upload policy for kdbus (probably to use in different place)
new useful function - dbus_transport_is_kdbus - tells whether transfor is kdbus
Radoslaw Pajak [Wed, 26 Jun 2013 07:35:37 +0000 (09:35 +0200)]
_dbus_transport_new_for_socket replaced by _dbus_transport_new_for_socket_kdbus in dbus-transport-kdbus.c
Inside this, socket_vtable replaced by kdbus_vtable, but kdbus_vtable is fiiled with socket_... functions, that have to be checked and modified when appropriate.
When checking and modifying that functions and functions below them, please do modify the name from socket_... to kdbus_...
modified: dbus/dbus-transport-kdbus.c
Radoslaw Pajak [Tue, 25 Jun 2013 11:34:15 +0000 (13:34 +0200)]
Beginning of kdbus support
Working:
- connecting to the bus
- bus registration (hello message)
Tested on the serverClient program made by L.Stempien
Not working:
- all the rest
Ralf Habacker [Tue, 18 Jun 2013 12:07:38 +0000 (14:07 +0200)]
Fix of cmake xmldoc dependencies chain.
This patch fixes an issues that xml documentation is generated on all builds regardless
if related files has been changed or not.
The patch adds a global xmldoc make target to which all generated html or man files are
added as build dependency. Each dependency itself depends on related CMakeLists.txt and
the xml file generated from the related xml.in file.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64058
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Tue, 18 Jun 2013 11:42:34 +0000 (13:42 +0200)]
Fixed wrong path for generated xml files when creating man pages with cmake.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64058
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Tue, 16 Apr 2013 15:48:11 +0000 (16:48 +0100)]
Add a statically-initialized implementation of _dbus_lock() on glibc systems
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>
Simon McVittie [Tue, 16 Apr 2013 15:37:51 +0000 (16:37 +0100)]
Always initialize threading before allocating a dynamic mutex
Dynamic allocation of mutexes can fail anyway, so this is easy.
Justification for not keeping the dummy mutex code-paths, even as an
opt-in thing for processes known to be high-performance and
single-threaded: real mutexes only cut the throughput of
test/dbus-daemon.c by a couple of percent on my laptop (from around
6700 to around 6600 messages per second), and libdbus crashes caused
by not calling dbus_threads_init_default() are sufficiently widespread
that they're wasting a lot of everyone's time.
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>
Simon McVittie [Tue, 16 Apr 2013 15:28:44 +0000 (16:28 +0100)]
Make taking a global lock automatically initialize locking if needed
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>
Simon McVittie [Tue, 16 Apr 2013 14:39:54 +0000 (15:39 +0100)]
Replace individual global-lock variables with an array of DBusRMutex *
This means we can use a much simpler code structure in data-slot
allocators: instead of giving them a DBusRMutex ** at first-allocation,
we can just give them an index into the array, which can be done
statically.
It doesn't make us any more thread-safe-by-default - the mutexes will
only actually be used if threads were already initialized - but it's
substantially better than nothing.
These locks really do have to be recursive: for instance,
internal_bus_get() calls dbus_bus_register() under the bus lock,
and dbus_bus_register() can call _dbus_connection_close_possibly_shared(),
which takes the bus lock.
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: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Anas Nashif <anas.nashif@intel.com>
Simon McVittie [Thu, 2 May 2013 13:50:24 +0000 (14:50 +0100)]
start spec 0.22 development
Simon McVittie [Thu, 13 Jun 2013 15:18:30 +0000 (16:18 +0100)]
Fix Werror=unused-function if build without X11
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65712
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Thu, 13 Jun 2013 12:47:19 +0000 (13:47 +0100)]
Start on 1.7.5, add release name for 1.7.4
Simon McVittie [Wed, 12 Jun 2013 18:49:44 +0000 (19:49 +0100)]
Prepare 1.7.4 for tomorrow
Simon McVittie [Wed, 12 Jun 2013 18:14:40 +0000 (19:14 +0100)]
Move libdbus-init-win.cpp to its own convenience library
Otherwise libdbus-1 ends up linked as if it contained C++, even
on Unix, where it doesn't; in turn, that makes it export all the
underscore-prefixed symbols that aren't meant to be exported.
Reviewed-by: Thiago Macieira <thiago@kde.org>
Reviewed-by: David Zeuthen <davidz@redhat.com>
Simon McVittie [Wed, 12 Jun 2013 18:01:07 +0000 (19:01 +0100)]
NEWS
Simon McVittie [Wed, 12 Jun 2013 16:27:54 +0000 (17:27 +0100)]
Fix an incorrect comment
_dbus_threads_lock_platform_specific() is implemented on Windows now.
Simon McVittie [Wed, 12 Jun 2013 16:25:29 +0000 (17:25 +0100)]
Revert "start spec 0.22 development"
This reverts commit
82b3d94ab10f16e6c6c18eb3bc76594cd63e3854.
Simon McVittie [Tue, 11 Jun 2013 18:20:55 +0000 (19:20 +0100)]
_dbus_system_logv: copy the va_list here too
This would crash if HAVE_SYSLOG_H is defined, HAVE_DECL_LOG_PERROR
is false, and the platform calling convention is that va_list is a
struct. Verified on Linux by undefining HAVE_DECL_LOG_PERROR.
Reviewed-by: Colin Walters <walters@verbum.org>
Simon McVittie [Wed, 12 Jun 2013 13:49:37 +0000 (14:49 +0100)]
Merge branch 'dbus-1.6'
Conflicts:
NEWS
configure.ac
Simon McVittie [Wed, 12 Jun 2013 13:46:24 +0000 (14:46 +0100)]
Start 1.6.13
Simon McVittie [Wed, 12 Jun 2013 13:02:31 +0000 (14:02 +0100)]
Prepare embargoed release for tomorrow
Simon McVittie [Wed, 12 Jun 2013 12:56:39 +0000 (13:56 +0100)]
Add a test-case for CVE-2013-2168
Reviewed-by: Thiago Macieira <thiago@kde.org>
[build system adjusted to compile it even if we don't have GLib -smcv]
Simon McVittie [Mon, 10 Jun 2013 17:06:47 +0000 (18:06 +0100)]
CVE-2013-2168: _dbus_printf_string_upper_bound: copy the va_list for each use
Using a va_list more than once is non-portable: it happens to work
under the ABI of (for instance) x86 Linux, but not x86-64 Linux.
This led to _dbus_printf_string_upper_bound() crashing if it should
have returned exactly 1024 bytes. Many system services can be induced
to process a caller-controlled string in ways that
end up using _dbus_printf_string_upper_bound(), so this is a denial of
service.
Reviewed-by: Thiago Macieira <thiago@kde.org>
Simon McVittie [Wed, 12 Jun 2013 12:42:58 +0000 (13:42 +0100)]
NEWS for 1.6.x
Chengwei Yang [Thu, 6 Jun 2013 05:25:10 +0000 (13:25 +0800)]
Fix dbus-daemon crash due to invalid service file
dbus-daemon will crash due to invalid service file which key/value
starts before section. In that situation, new_line() will try to access
invalid address.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60853
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Thu, 6 Jun 2013 12:18:06 +0000 (13:18 +0100)]
NEWS
Also update README to not mention libxml2.
Chengwei Yang [Thu, 6 Jun 2013 08:58:11 +0000 (16:58 +0800)]
dbus-send: check usage a bit strictly
This commit does several more strictly check for dbus-send as its usage
suggested.
* now --address is an invalid option but --address=, this just like the
others, say --reply-timeout=, --dest=, --type=
* --print-reply= only take an optional argument "=literal"
* --print-reply= will cause error with missing MSEC and invalid MSEC
will cause invalid value error
* --dest= will cause error with missing a NAME and also call
dbus_validate_bus_name to verify the NAME
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65424
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Thu, 6 Jun 2013 08:11:16 +0000 (16:11 +0800)]
Assign default value to enable compiler coverage
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65424
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Thu, 6 Jun 2013 08:12:01 +0000 (16:12 +0800)]
Fix a typo: enable_x11 -> have_x11
From git history, enable_x11 was used to track have_x11, but it's
useless now.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65443
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Thu, 6 Jun 2013 07:59:20 +0000 (15:59 +0800)]
XML: hard depends on expat and delete libxml
[The libxml code path has been broken for at least 2.5 years, and Expat
is tiny, so there seems no point in supporting both. -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=20253
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Thu, 6 Jun 2013 05:25:10 +0000 (13:25 +0800)]
Fix dbus-daemon crash due to invalid service file
dbus-daemon will crash due to invalid service file which key/value
starts before section. In that situation, new_line() will try to access
invalid address.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60853
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Thu, 6 Jun 2013 03:36:22 +0000 (11:36 +0800)]
Do not suggest user to do 'make' if configure failed
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65415
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Tue, 7 Feb 2012 19:58:44 +0000 (19:58 +0000)]
massively simplify run-with-tmp-session-bus.sh by using dbus-run-session
It turns out that if you don't second-guess the system by catching
SIGINT, the right things happen: it's received by every program in the
foreground process group, including dbus-run-session and dbus-daemon.
Neither of those catch SIGINT (unlike dbus-launch) so they'll exit
gracefully without the wrapper script needing to do anything special.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39196
Reviewed-by: Colin Walters <walters@verbum.org>
Simon McVittie [Wed, 5 Jun 2013 16:51:55 +0000 (17:51 +0100)]
Recomend dbus-run-session over dbus-launch for starting text-mode sessions
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39196
Reviewed-by: Colin Walters <walters@verbum.org>
[reformatted from roff to Docbook -smcv]
Simon McVittie [Wed, 5 Jun 2013 16:55:03 +0000 (17:55 +0100)]
Put dbus-run-session through doclifter and adjust to match other man pages
Simon McVittie [Tue, 7 Feb 2012 17:45:16 +0000 (17:45 +0000)]
Add dbus-run-session
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39196
Reviewed-by: Colin Walters <walters@verbum.org>
Chengwei Yang [Fri, 31 May 2013 07:02:45 +0000 (15:02 +0800)]
Fix build error: unused-result
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Wed, 29 May 2013 12:50:21 +0000 (20:50 +0800)]
When "activating" systemd, handle its special case better
When dbus-daemon receives a request to activate a systemd service before
systemd has connected to it, it enqueues a fake request to "activate"
systemd itself (as a way to get a BusPendingActivationEntry to track the
process of waiting for systemd). When systemd later joins the bus,
dbus-daemon sends the actual activation message; any future activation
messages are sent directly to systemd.
In the "pending" code path, the activation messages are currently
dispatched as though they had been sent by the same process that sent
the original activation request, which is wrong: the bus security
policy probably doesn't allow that process to talk to systemd directly.
They should be dispatched as though they had been sent by the
dbus-daemon itself (connection == NULL), the same as in the non-pending
code path.
In the worst case, if the attempt to activate systemd timed out, the
dbus-daemon would crash with a (fatal) warning, because in this special
case, activation_message is a signal with no serial number, whereas the
code to send an error reply is expecting a method call with a serial
number.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=50199
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Tested-by: Ma Yu <yu.ma@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Wed, 5 Jun 2013 16:00:40 +0000 (17:00 +0100)]
NEWS
Chengwei Yang [Fri, 31 May 2013 07:02:45 +0000 (15:02 +0800)]
Fix build error: unused-result
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Fri, 31 May 2013 09:36:04 +0000 (17:36 +0800)]
doc: fix a little bit for dbus-send
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Chengwei Yang [Wed, 29 May 2013 12:50:21 +0000 (20:50 +0800)]
When "activating" systemd, handle its special case better
When dbus-daemon receives a request to activate a systemd service before
systemd has connected to it, it enqueues a fake request to "activate"
systemd itself (as a way to get a BusPendingActivationEntry to track the
process of waiting for systemd). When systemd later joins the bus,
dbus-daemon sends the actual activation message; any future activation
messages are sent directly to systemd.
In the "pending" code path, the activation messages are currently
dispatched as though they had been sent by the same process that sent
the original activation request, which is wrong: the bus security
policy probably doesn't allow that process to talk to systemd directly.
They should be dispatched as though they had been sent by the
dbus-daemon itself (connection == NULL), the same as in the non-pending
code path.
In the worst case, if the attempt to activate systemd timed out, the
dbus-daemon would crash with a (fatal) warning, because in this special
case, activation_message is a signal with no serial number, whereas the
code to send an error reply is expecting a method call with a serial
number.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=50199
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Tested-by: Ma Yu <yu.ma@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Tue, 16 Apr 2013 11:14:02 +0000 (12:14 +0100)]
Remove unused global mutexes for win_fds, sid_atom_cache
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: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Tue, 16 Apr 2013 11:14:14 +0000 (12:14 +0100)]
Turn a runtime assertion into a compile-time assertion
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: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Fri, 10 May 2013 11:59:35 +0000 (12:59 +0100)]
NEWS for part 1 of fd.o#54972
Simon McVittie [Tue, 16 Apr 2013 11:07:23 +0000 (12:07 +0100)]
dbus_threads_init_default, dbus_threads_init: be safe to call at any time
On Unix, we use a pthreads mutex, which can be allocated and
initialized in global memory.
On Windows, we use a CRITICAL_SECTION, together with a call to
InitializeCriticalSection() from the constructor of a global static
C++ object (thanks to Ralf Habacker for suggesting this approach).
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: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Wed, 8 May 2013 14:26:14 +0000 (15:26 +0100)]
Fix compiler warnings when X11 autolaunch and launchd are both disabled
From the department of "if it isn't tested, it doesn't work". I tried
compiling dbus without an assortment of optional features:
in_builddir ~/build/dbus/legacy ${MR_REPO}/configure \
--enable-developer --enable-maintainer-mode --enable-tests \
dbus_cv_sync_sub_and_fetch=no \
--disable-selinux \
--disable-inotify \
--disable-dnotify \
--disable-epoll \
--disable-kqueue \
--disable-launchd \
--disable-systemd \
--disable-libaudit \
--without-valgrind \
--disable-x11-autolaunch \
&& ...
and it resulted in -Wunused warnings.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64362
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Thiago Macieira <thiago@kde.org>
Simon McVittie [Mon, 15 Apr 2013 12:54:39 +0000 (13:54 +0100)]
dbus_threads_init: call _dbus_threads_init_platform_specific()
This reverses the relationship between these two functions.
Previously, dbus_threads_init() wouldn't allocate dbus_cond_event_tls
on Windows, call check_monotonic_clock on Unix, or call
_dbus_check_setuid on Unix.
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: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Mon, 15 Apr 2013 12:51:19 +0000 (13:51 +0100)]
DBusAtomic: on Unix, use pthreads mutexes for fallback
On pthreads platforms, POSIX guarantees that we can "allocate" mutexes
as library-global variables, without involving malloc. This means we
don't need to error-check their allocation - if the dynamic linker
succeeds, then we have enough memory for all our globals - which is an
important step towards being thread-safe by default. In particular,
making atomic operations never rely on DBusMutex means that we are free
to implement parts of DBusMutex in terms of DBusAtomic, if it would help.
We do not currently support any non-Windows platform that does not have
pthreads. This is unlikely to change.
On Windows, we already used real atomic operations; we can just
delete the unused global variable.
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: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Mon, 15 Apr 2013 19:40:21 +0000 (20:40 +0100)]
Add _DBUS_GNUC_WARN_UNUSED_RESULT, similar to GLib's
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Simon McVittie [Wed, 8 May 2013 13:30:46 +0000 (14:30 +0100)]
NEWS
Simon McVittie [Thu, 2 May 2013 13:50:24 +0000 (14:50 +0100)]
start spec 0.22 development
Simon McVittie [Thu, 2 May 2013 13:50:16 +0000 (14:50 +0100)]
start 1.7.4 development
Ralf Habacker [Mon, 29 Apr 2013 18:27:12 +0000 (20:27 +0200)]
Fixed cmake windows build system bug not installing runtime part of shared libraries into bin dir.
This patch also take care of different install directories on unix like os.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Thu, 25 Apr 2013 12:12:15 +0000 (13:12 +0100)]
prepare version 1.7.2 and spec 0.21
Simon McVittie [Wed, 24 Apr 2013 19:31:28 +0000 (20:31 +0100)]
Merge branch 'dbus-1.6'
Conflicts:
NEWS
configure.ac
Simon McVittie [Wed, 24 Apr 2013 19:30:00 +0000 (20:30 +0100)]
development version
Simon McVittie [Wed, 24 Apr 2013 11:14:57 +0000 (12:14 +0100)]
Prepare release 1.6.10
Simon McVittie [Tue, 23 Apr 2013 18:16:23 +0000 (19:16 +0100)]
NEWS for 1.7
Simon McVittie [Tue, 16 Apr 2013 16:45:36 +0000 (17:45 +0100)]
Disable sd-daemon.c's support for POSIX message queues
This fixes build failures with recent glibc while avoiding an
otherwise useless librt dependency.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63166
Reviewed-by: Thiago Macieira <thiago@kde.org>
Simon McVittie [Mon, 22 Apr 2013 15:21:02 +0000 (16:21 +0100)]
NEWS for 1.7
Cristian RodrÃguez [Sun, 14 Apr 2013 06:57:40 +0000 (03:57 -0300)]
dbus.service.in: Do not order after syslog.target
It is no longer required or recommended in fact it no longer
exists since
http://cgit.freedesktop.org/systemd/systemd/commit/?id=
5d4caf565471ff3401bd9b53aa814c8545a18a93
[Clarification: there are two reasons why we do not need that dependency.
First, we do not have DefaultDependencies=no, so we only get run after
sockets.target. Second, syslog.socket doesn't provide /dev/log, which is
part of systemd-journald.socket. -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63531
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 22 Apr 2013 14:30:33 +0000 (15:30 +0100)]
Specification: explicitly allow the Unicode noncharacters
This follows Unicode Corrigendum #9.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63072
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 22 Apr 2013 15:16:03 +0000 (16:16 +0100)]
Merge branch 'dbus-1.6'
Conflicts:
NEWS
Simon McVittie [Mon, 22 Apr 2013 15:15:34 +0000 (16:15 +0100)]
NEWS for 1.6
Simon McVittie [Mon, 22 Apr 2013 14:36:32 +0000 (15:36 +0100)]
Accept non-characters when validating Unicode
Unicode Corrigendum #9 clarifies that the non-characters U+nFFFE
(for n in the range 0 to 0x10), U+nFFFF (for n in the same range),
and U+FDD0..U+FDEF are valid for interchange, and their presence
does not make a string ill-formed.
GLib 2.36 made the corresponding change in its definition of UTF-8
as used by g_utf8_validate() and similar functions.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63072
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Fri, 22 Feb 2013 16:32:18 +0000 (17:32 +0100)]
Unify docbook dtd version to 4.4.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Thu, 18 Apr 2013 18:26:59 +0000 (19:26 +0100)]
NEWS
Simon McVittie [Thu, 18 Apr 2013 11:35:07 +0000 (12:35 +0100)]
Rename default_message_unix_fds to DEFAULT_MESSAGE_UNIX_FDS
As Ralf pointed out, we usually use upper-case when substituting
variables (apart from "somethingdir", which Autoconf conventionally
makes lower-case for some reason).
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63682
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Thu, 18 Apr 2013 11:21:58 +0000 (12:21 +0100)]
cmake: define default_message_unix_fds so it can be substituted in session.conf
This fixes a regression since 1.7.0: session.conf would be invalid when
generated by cmake.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63682
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Tue, 16 Apr 2013 16:40:41 +0000 (17:40 +0100)]
sd-daemon.c: update from systemd for better portability
Simon McVittie [Thu, 11 Apr 2013 13:00:15 +0000 (14:00 +0100)]
NEWS for 1.7