summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-07-11dbus-launch: add --exit-with-x11 optionHEADmasterSimon McVittie2-13/+60
This is more suitable for distributions' Xsession scripts: it verifies that X is already available, and so never results in an attempt to poll stdin. We read the machine UUID because it is needed to set the X atoms. x11_init() assumes that the machine UUID (global variable) has been set, either via read_machine_uuid_if_needed() or save_machine_uuid(). This is pretty tangled, but to make The Right Thing happen automatically, we'd need to redo dbus-launch in terms of DBusError. Reviewed-by: Will Thompson Reviewed-by: Thiago Macieira Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39197 Signed-off-by: Simon McVittie <smcv@debian.org>
2016-07-01Be explicit about enum comparison in bus_config_load()Deepika Aggarwal1-1/+1
XML_Parse() can potentially return values other than OK (1) or ERROR (0), and they aren't errors. Signed-off-by: Deepika Aggarwal <deepika.a@samsung.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93205 [smcv: improve commit message, fix whitespace] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-07-01bus: reassure static analysis tool that server slot allocation can't failDeepika Aggarwal1-9/+5
The NULL-dereference is not actually possible in this case, because we know that the allocation and setup were done previously. Signed-off-by: Deepika Aggarwal <deepika.a@samsung.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93210
2016-07-01Add an invalid state in DBusAuthState to use for invalid lines in auth scripts.Nick Lewycky3-2/+7
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93909 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-06-30NEWS for 1.11.xSimon McVittie1-0/+18
2016-06-30Merge branch 'dbus-1.10'Simon McVittie1-1/+17
2016-06-30Update NEWSSimon McVittie1-1/+17
2016-06-30spec: Clarify the marshaling format in a few minor waysPhilip Withnall1-11/+45
This is an attempt to make that section a little clearer. I don’t think any factual inaccuracies have been fixed (because I couldn’t find any). Including some wording and an example by Simon McVittie. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93382 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-06-30Merge branch 'dbus-1.10'Simon McVittie2-9/+33
2016-06-30activation: set children oom_score_adj to 0WaLyong Cho1-0/+20
If dbus is running as systemd service, dbus daemon is running with oom_score_adj -900 by OOMScoreAdjust=-900. And children will also have same value with dbus daemon. To avoid this, set the child itself values after fork () to 0. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32851 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-06-30Use dbus_set_error_from_message() to check for an errorРуслан Ижбулатов1-9/+13
Do not rely on dbus_message_get_args() to turn an ERROR message into DBusError. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=96653 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-06-30Quote the DBUS_SESSION_BUS_ADDRESS variable in the shell fileThiago Macieira1-1/+1
Some D-Bus daemon versions set multiple addresses separated by semi-colon, which breaks sourcing of the file. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94746 Signed-off-by: Thiago Macieira <thiago@kde.org> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-06-30Quote the DBUS_SESSION_BUS_ADDRESS variable in the shell fileThiago Macieira1-1/+1
Some D-Bus daemon versions set multiple addresses separated by semi-colon, which breaks sourcing of the file. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94746 Signed-off-by: Thiago Macieira <thiago@kde.org> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-20Migrate platform specific spawn tests into cross platform tests.Ralf Habacker6-522/+293
Also enable segfault checks on windows because the reason why it has been disabled has been fixed with bug #95155. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-18test-segfault: add missing include of <stdio.h> on WindowsSimon McVittie1-0/+1
Needed for fprintf (stderr, ...). Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> (cherry picked from commit 07b7dcd7178f927cd0b3a3282396b7f99c0b1d29)
2016-05-18travis: compile with mingw in both production and debug flavoursSimon McVittie1-0/+1
This should detect anything that is only a build failure when embedded tests or verbose mode are enabled, such as the missing include fixed in commit 4858faf. I'm not enabling embedded tests and verbose mode orthogonally because we don't want CI builds to take too long. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-05-16test-segfault: add missing include of <stdio.h> on WindowsSimon McVittie1-0/+1
Needed for fprintf (stderr, ...). Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-05-16Fix memory leak issue in spawn code on Windows.Ralf Habacker1-30/+10
In _dbus_babysitter_block_for_child_exit () use spawning thread handle to have a reliable way to detect spawning thread termination. See https://bugs.freedesktop.org/show_bug.cgi?id=95191#c33 for more informations. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-16Fix compiling on windows/mingw with automake build system.Ralf Habacker1-0/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-16Merge branch 'dbus-1.10'Ralf Habacker1-3/+7
2016-05-16Fix ambiguous setup of DBusBabySitter struct member child_handle on Windows.Ralf Habacker1-3/+7
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-13dbus-spawn-win: Do not attempt to call child_setup (again)Simon McVittie1-6/+0
This reinstates part of commit 420f3474, fixing a mis-merge in commit 8c0d5980. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-13Merge branch 'dbus-1.10'Ralf Habacker3-9/+38
2016-05-13Prefix debug messages displayed with _dbus_verbose() with a timestamp.Ralf Habacker1-0/+3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-13Display thread id in _dbus_verbose to be able to see threading issues.Ralf Habacker5-12/+31
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-13On Windows make access to member 'refcount' of struct DBusBabysitter thread ↵Ralf Habacker3-7/+32
safe. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-13Eliminates a race condition accessing DBusBabysitter instance at startup of ↵Ralf Habacker1-3/+1
babysitter() on Windows. Ensure that the babysitter thread already owns its one reference to the babysitter when it starts up, and eliminates the race condition. This patch requires that DBusBabysitter refcounting is thread-safe and is based on an analysis and proposal of Simon Mc Vittie. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-10Fix memory leak in _dbus_replace_install_prefix() on success case on Windows.Ralf Habacker1-0/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-09Merge branch 'dbus-1.10'Ralf Habacker1-0/+25
2016-05-09Suppress Windows popups and jit debugger when app crashes with exception.Ralf Habacker1-0/+25
Based on a patch from Yiyang Fei. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95155 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-05-09sysdeps: increase listen() backlog of AF_UNIX sockets to SOMAXCONNLennart Poettering1-1/+1
Previously, the listen() backlog was set to an arbitrary 30. This means that if dbus-daemon is overloaded only 30 more connections may be queued by the kernel, before connect() fails with EAGAIN. (Note that EAGAIN != EINPROGRESS -- the latter is what is returned if a connection is queued and being processed for asynchronous sockets; EAGAIN in this case is really an error, that cannot be recovered from). Most software simply sets SOMAXCONN as backlog for AF_UNIX sockets, to allow queuing of as many connections as the kernel allows. SOMAXCONN is 128 on Linux, which is not particularly high, but at least higher than 30. This patch changes dbus-daemon to do the same. I noticed this when flooding dbus-daemon with a lot of connections, where it pretty quickly ceased to respond, much earlier than it really should. Note that the backlog has nothing to do with the number of concurrent connections allowed, it simply controls how many queued, but not accept()ed connections there may be on the listening socket. https://bugs.freedesktop.org/show_bug.cgi?id=95264
2016-05-02Merge branch 'dbus-1.10'Ralf Habacker1-1/+2
2016-04-29Fix crash in test-spawn unit test app on Windows.Yiyang Fei1-1/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95160 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-04-29Fix assert in test-spawn caused by missing initialization of DBusError ↵Ralf Habacker1-1/+1
instance on gcc builds. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95160 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> (cherry picked from commit 9323a621e868d6a5b628b89696b1efe0300ff939)
2016-04-29Fix assert in test-spawn caused by missing initialization of DBusError ↵Ralf Habacker1-1/+1
instance on gcc builds. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95160 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-04-14dbus_internal_do_not_use_try_message_data: Calling ↵Ralf Habacker1-1/+0
_dbus_message_loader_get_max_message_size(loader) is only useful for its return value, which is ignored (CID 54725). Reported by Coverity: CID 54725: Useless call (USELESS_CALL) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90021
2016-03-071.11.3Simon McVittie2-1/+6
2016-03-071.11.2Simon McVittie2-3/+5
2016-03-07Merge branch 'dbus-1.10'Simon McVittie0-0/+0
2016-03-071.10.9Simon McVittie2-1/+6
2016-03-071.10.8Simon McVittie2-2/+4
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-03Merge branch 'dbus-1.10-ci'Simon McVittie1-0/+2
2016-03-02Disable travis-ci apt source for Google ChromeSimon McVittie1-0/+2
This prevents adding i386 as a foreign architecture. We don't need Chrome anyway. Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-02Update NEWS for 1.11.2Simon McVittie1-0/+24
2016-03-02Merge branch 'dbus-1.10'Simon McVittie6-5/+66
2016-03-02Merge branch 'dbus-1.10' into dbus-1.10-ciSimon McVittie6-5/+66
2016-03-02update NEWSSimon McVittie1-0/+8
2016-03-02dbus-test-tool echo: fix sleep documentationDmitri Iouchtchenko2-3/+3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94244 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-03-02Statically assert that the DBusMessageIter struct has no paddingSimon McVittie1-0/+5
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Thiago Macieira <thiago@kde.org> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136
2016-03-02DBusMessageIter: eliminate padding on 64-bit platformsSimon McVittie2-1/+30
Previously, 64-bit (LP64 or LLP64) platforms would have had 32 bits of padding between pad2 and pad3. We want to guarantee that an ISO C compiler will copy the entire struct when assigning between structs, but padding is not guaranteed to be copied, so we want to ensure that the struct is "packed". Statically assert that the old ABI is compatible with the new ABI. Reviewed-by: Thiago Macieira <thiago@kde.org> [smcv: change >= to == as Thiago requested] Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136