platform/upstream/dbus.git
11 years agostart spec 0.22 development
Simon McVittie [Thu, 2 May 2013 13:50:24 +0000 (14:50 +0100)]
start spec 0.22 development

11 years agoFix Werror=unused-function if build without X11
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>
11 years agoStart on 1.7.5, add release name for 1.7.4
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

11 years agoPrepare 1.7.4 for tomorrow dbus-1.7.4
Simon McVittie [Wed, 12 Jun 2013 18:49:44 +0000 (19:49 +0100)]
Prepare 1.7.4 for tomorrow

11 years agoMove libdbus-init-win.cpp to its own convenience library
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>
11 years agoNEWS
Simon McVittie [Wed, 12 Jun 2013 18:01:07 +0000 (19:01 +0100)]
NEWS

11 years agoFix an incorrect comment
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.

11 years agoRevert "start spec 0.22 development"
Simon McVittie [Wed, 12 Jun 2013 16:25:29 +0000 (17:25 +0100)]
Revert "start spec 0.22 development"

This reverts commit 82b3d94ab10f16e6c6c18eb3bc76594cd63e3854.

11 years ago_dbus_system_logv: copy the va_list here too
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>
11 years agoMerge branch 'dbus-1.6'
Simon McVittie [Wed, 12 Jun 2013 13:49:37 +0000 (14:49 +0100)]
Merge branch 'dbus-1.6'

Conflicts:
NEWS
configure.ac

11 years agoStart 1.6.13
Simon McVittie [Wed, 12 Jun 2013 13:46:24 +0000 (14:46 +0100)]
Start 1.6.13

11 years agoPrepare embargoed release for tomorrow dbus-1.6.12
Simon McVittie [Wed, 12 Jun 2013 13:02:31 +0000 (14:02 +0100)]
Prepare embargoed release for tomorrow

11 years agoAdd a test-case for CVE-2013-2168
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]

11 years agoCVE-2013-2168: _dbus_printf_string_upper_bound: copy the va_list for each use
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>
11 years agoNEWS for 1.6.x
Simon McVittie [Wed, 12 Jun 2013 12:42:58 +0000 (13:42 +0100)]
NEWS for 1.6.x

11 years agoFix dbus-daemon crash due to invalid service file
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>
11 years agoNEWS
Simon McVittie [Thu, 6 Jun 2013 12:18:06 +0000 (13:18 +0100)]
NEWS

Also update README to not mention libxml2.

11 years agodbus-send: check usage a bit strictly
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>
11 years agoAssign default value to enable compiler coverage
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>
11 years agoFix a typo: enable_x11 -> have_x11
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>
11 years agoXML: hard depends on expat and delete libxml
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>
11 years agoFix dbus-daemon crash due to invalid service file
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>
11 years agoDo not suggest user to do 'make' if configure failed
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>
11 years agomassively simplify run-with-tmp-session-bus.sh by using dbus-run-session
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>
11 years agoRecomend dbus-run-session over dbus-launch for starting text-mode sessions
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]

11 years agoPut dbus-run-session through doclifter and adjust to match other man pages
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

11 years agoAdd dbus-run-session
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>
11 years agoFix build error: unused-result
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>
11 years agoWhen "activating" systemd, handle its special case better
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>
11 years agoNEWS
Simon McVittie [Wed, 5 Jun 2013 16:00:40 +0000 (17:00 +0100)]
NEWS

11 years agoFix build error: unused-result
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>
11 years agodoc: fix a little bit for dbus-send
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>
11 years agoWhen "activating" systemd, handle its special case better
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>
11 years agoRemove unused global mutexes for win_fds, sid_atom_cache
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>
11 years agoTurn a runtime assertion into a compile-time assertion
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>
11 years agoNEWS for part 1 of fd.o#54972
Simon McVittie [Fri, 10 May 2013 11:59:35 +0000 (12:59 +0100)]
NEWS for part 1 of fd.o#54972

11 years agodbus_threads_init_default, dbus_threads_init: be safe to call at any time
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>
11 years agoFix compiler warnings when X11 autolaunch and launchd are both disabled
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>
11 years agodbus_threads_init: call _dbus_threads_init_platform_specific()
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>
11 years agoDBusAtomic: on Unix, use pthreads mutexes for fallback
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>
11 years agoAdd _DBUS_GNUC_WARN_UNUSED_RESULT, similar to GLib's
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>
11 years agoNEWS
Simon McVittie [Wed, 8 May 2013 13:30:46 +0000 (14:30 +0100)]
NEWS

11 years agostart spec 0.22 development submit/tizen/20130527.033934
Simon McVittie [Thu, 2 May 2013 13:50:24 +0000 (14:50 +0100)]
start spec 0.22 development

11 years agostart 1.7.4 development
Simon McVittie [Thu, 2 May 2013 13:50:16 +0000 (14:50 +0100)]
start 1.7.4 development

11 years agoFixed cmake windows build system bug not installing runtime part of shared libraries...
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>
11 years agoprepare version 1.7.2 and spec 0.21 dbus-1.7.2
Simon McVittie [Thu, 25 Apr 2013 12:12:15 +0000 (13:12 +0100)]
prepare version 1.7.2 and spec 0.21

11 years agoMerge branch 'dbus-1.6'
Simon McVittie [Wed, 24 Apr 2013 19:31:28 +0000 (20:31 +0100)]
Merge branch 'dbus-1.6'

Conflicts:
NEWS
configure.ac

11 years agodevelopment version
Simon McVittie [Wed, 24 Apr 2013 19:30:00 +0000 (20:30 +0100)]
development version

11 years agoPrepare release 1.6.10 dbus-1.6.10 upstream/1.6.10
Simon McVittie [Wed, 24 Apr 2013 11:14:57 +0000 (12:14 +0100)]
Prepare release 1.6.10

11 years agoNEWS for 1.7
Simon McVittie [Tue, 23 Apr 2013 18:16:23 +0000 (19:16 +0100)]
NEWS for 1.7

11 years agoDisable sd-daemon.c's support for POSIX message queues
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>
11 years agoNEWS for 1.7
Simon McVittie [Mon, 22 Apr 2013 15:21:02 +0000 (16:21 +0100)]
NEWS for 1.7

11 years agodbus.service.in: Do not order after syslog.target
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>
11 years agoSpecification: explicitly allow the Unicode noncharacters
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>
11 years agoMerge branch 'dbus-1.6'
Simon McVittie [Mon, 22 Apr 2013 15:16:03 +0000 (16:16 +0100)]
Merge branch 'dbus-1.6'

Conflicts:
NEWS

11 years agoNEWS for 1.6
Simon McVittie [Mon, 22 Apr 2013 15:15:34 +0000 (16:15 +0100)]
NEWS for 1.6

11 years agoAccept non-characters when validating Unicode
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>
11 years agoUnify docbook dtd version to 4.4.
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>
11 years agoNEWS
Simon McVittie [Thu, 18 Apr 2013 18:26:59 +0000 (19:26 +0100)]
NEWS

11 years agoRename default_message_unix_fds to DEFAULT_MESSAGE_UNIX_FDS
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>
11 years agocmake: define default_message_unix_fds so it can be substituted in session.conf
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>
11 years agosd-daemon.c: update from systemd for better portability
Simon McVittie [Tue, 16 Apr 2013 16:40:41 +0000 (17:40 +0100)]
sd-daemon.c: update from systemd for better portability

11 years agoNEWS for 1.7
Simon McVittie [Thu, 11 Apr 2013 13:00:15 +0000 (14:00 +0100)]
NEWS for 1.7

11 years agoSet default maximum number of Unix fds according to OS
Matt Fischer [Wed, 20 Feb 2013 21:23:42 +0000 (15:23 -0600)]
Set default maximum number of Unix fds according to OS

QNX has an arbitrary limit to the number of file descriptors
which may be passed in a message, which is smaller than the
current default.  This patch therefore changes the default from
a hardcoded constant to a macro, which is determined at configure
time by looking at the host operating system.

[This reduces the limit from 4096 (session)/1024 (system) to 128 fds
per message on QNX, and 1024 fds per message on other operating systems.
I think the reduced session bus limit on other OSs is a reasonable change
too, given that the default hard/soft ulimits in Linux are only 4096/1024
fds per process. -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61176
Reviewed-by: Simon McVittie <simon.mcvittie.collabora.co.uk>
11 years agoDo not suppress syslog test's stderr just because init is systemd
Simon McVittie [Fri, 5 Apr 2013 12:28:54 +0000 (13:28 +0100)]
Do not suppress syslog test's stderr just because init is systemd

This causes the test to fail. The assumption implicitly being made was
"if pid 1 is systemd, then every caller of _dbus_init_system_log() is a
systemd service" which is not valid for the regression test.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63163
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
11 years agofix NEWS: a Windows "sid" is a security ID, not a session ID
Simon McVittie [Fri, 5 Apr 2013 16:01:29 +0000 (17:01 +0100)]
fix NEWS: a Windows "sid" is a security ID, not a session ID

11 years agoMerge branch 'dbus-1.6'
Simon McVittie [Fri, 5 Apr 2013 12:00:22 +0000 (13:00 +0100)]
Merge branch 'dbus-1.6'

Conflicts:
NEWS
configure.ac

11 years agoNEWS for 1.7
Simon McVittie [Fri, 5 Apr 2013 11:57:56 +0000 (12:57 +0100)]
NEWS for 1.7

11 years agoAllow use of GLib 2.32 functionality, which we do conditionally
Simon McVittie [Fri, 5 Apr 2013 11:54:57 +0000 (12:54 +0100)]
Allow use of GLib 2.32 functionality, which we do conditionally

11 years agoDon't warn for functions deprecated since GLib 2.26
Simon McVittie [Mon, 18 Feb 2013 14:27:48 +0000 (14:27 +0000)]
Don't warn for functions deprecated since GLib 2.26

Also warn if we inadvertently use a function introduced since then.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59971
Reviewed-by: Colin Walters <walters@verbum.org>
11 years agoNEWS for 1.6
Simon McVittie [Fri, 5 Apr 2013 11:47:07 +0000 (12:47 +0100)]
NEWS for 1.6

11 years agoDon't access random memory if data slot isn't allocated yet
Dan Williams [Thu, 4 Apr 2013 15:49:18 +0000 (10:49 -0500)]
Don't access random memory if data slot isn't allocated yet

If DBUS_DISABLE_ASSERTS was turned on, and a buggy program called
dbus_connection_get_data() with a slot number less than zero (eg,
before even allocating the data slot), random memory would be
accessed and a random value returned.  Anything less than zero
is not a valid slot number and should be rejected by libdbus.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63127
Signed-off-by: Dan Williams <dcbw@redhat.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoAdd function _dbus_get_peer_pid_from_tcp_handle() which returns pid and sid from...
Ralf Habacker [Fri, 8 Mar 2013 12:55:32 +0000 (13:55 +0100)]
Add function _dbus_get_peer_pid_from_tcp_handle() which returns pid and sid from tcp connection peer.

This function is called by _dbus_read_credentials_socket() to fetch client credentials.

Because Wine is used to check cross compiled dbus for windows, in calls to GetExtendedTcpTable()
we use table class TCP_TABLE_OWNER_PID_ALL instead of TCP_TABLE_OWNER_PID_CONNECTIONS.
This class is the only one which is available since wine 1.5.3.

https://bugs.freedesktop.org/show_bug.cgi?id=61787
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoMerge branch 'dbus-1.6'
Simon McVittie [Wed, 3 Apr 2013 11:22:24 +0000 (12:22 +0100)]
Merge branch 'dbus-1.6'

11 years agoNEWS for 1.6
Simon McVittie [Wed, 3 Apr 2013 11:20:57 +0000 (12:20 +0100)]
NEWS for 1.6

11 years agoIf alloca.h is available it is required (e.g. on Solaris 10)
Dagobert Michelsen [Wed, 3 Apr 2013 08:38:51 +0000 (10:38 +0200)]
If alloca.h is available it is required (e.g. on Solaris 10)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63071
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoHAVE_DECL_LOG_PERROR is 0 when unavailable
Dagobert Michelsen [Wed, 3 Apr 2013 10:38:38 +0000 (12:38 +0200)]
HAVE_DECL_LOG_PERROR is 0 when unavailable

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39987
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoUpdate sd-daemon.[hc] from upstream
Martin Pitt [Thu, 21 Mar 2013 08:37:48 +0000 (09:37 +0100)]
Update sd-daemon.[hc] from upstream

This fixes sd_booted() to actually mean "have systemd init", which we need for
_dbus_init_system_log() to decide whether systemd journal is being used.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=62585
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoFix test for logind availability
Martin Pitt [Thu, 21 Mar 2013 08:24:21 +0000 (09:24 +0100)]
Fix test for logind availability

sd_booted() is not an appropriate check for whether we should talk to logind,
test for /run/systemd/seats/ instead.

For details, see:
<https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html>

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=62585
[trivial whitespace fix -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoRename the term 'unix_pid' to 'pid' in variables and functions.
Ralf Habacker [Fri, 8 Mar 2013 12:15:36 +0000 (13:15 +0100)]
Rename the term 'unix_pid' to 'pid' in variables and functions.

Windows also has numeric process IDs that fit in an unsigned long, so
there's no reason this has to be Unix-specific.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61787
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoDo not retrieve credential information from the wrong side of the connection.
Ralf Habacker [Fri, 8 Mar 2013 09:44:30 +0000 (10:44 +0100)]
Do not retrieve credential information from the wrong side of the connection.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61787
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoDebug message eol fix.
Ralf Habacker [Thu, 7 Mar 2013 09:42:26 +0000 (10:42 +0100)]
Debug message eol fix.

11 years agoCMake linux fixes when using meinproc4 doc generator.
Ralf Habacker [Thu, 28 Feb 2013 12:22:33 +0000 (12:22 +0000)]
CMake linux fixes when using meinproc4 doc generator.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61637
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoFix cmake linux build: dbus-1 and dbus-internal require to link to rt library
Ralf Habacker [Mon, 4 Mar 2013 14:24:19 +0000 (15:24 +0100)]
Fix cmake linux build: dbus-1 and dbus-internal require to link to rt library

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61637
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agobus driver: factor out common code to get a named connection
Simon McVittie [Wed, 28 Nov 2012 12:01:37 +0000 (12:01 +0000)]
bus driver: factor out common code to get a named connection

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445
Reviewed-by: Thiago Macieira <thiago@kde.org>
11 years agoinclude sd-daemon.h for sd_booted()
Simon McVittie [Wed, 27 Feb 2013 19:32:15 +0000 (19:32 +0000)]
include sd-daemon.h for sd_booted()

11 years agosysdeps: Don't use LOG_PERROR if systemd is booted
Colin Walters [Sun, 24 Feb 2013 13:46:48 +0000 (08:46 -0500)]
sysdeps: Don't use LOG_PERROR if systemd is booted

Otherwise we get duplicated log output, since stdout/stderr are
connected to the journal by default.

https://bugs.freedesktop.org/show_bug.cgi?id=61399

11 years agobump version to 1.7.1
Simon McVittie [Fri, 22 Feb 2013 21:01:07 +0000 (21:01 +0000)]
bump version to 1.7.1

11 years agoPrepare release 1.7.0 (and specification 0.20) dbus-1.7.0
Simon McVittie [Fri, 22 Feb 2013 14:47:07 +0000 (14:47 +0000)]
Prepare release 1.7.0 (and specification 0.20)

11 years agoInclude config.h as the first thing in every .c file
Simon McVittie [Mon, 18 Feb 2013 14:30:22 +0000 (14:30 +0000)]
Include config.h as the first thing in every .c file

...except for CheckForAbstractSockets.c, which runs before config.h is
generated, and sd-daemon.c, which is externally-maintained.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59971
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
11 years agoDon't warn for functions deprecated since GLib 2.26
Simon McVittie [Mon, 18 Feb 2013 14:27:48 +0000 (14:27 +0000)]
Don't warn for functions deprecated since GLib 2.26

Also warn if we inadvertently use a function introduced since then.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59971
Reviewed-by: Colin Walters <walters@verbum.org>
11 years agoAdd support for systems without syslog.h
Matt Fischer [Wed, 20 Feb 2013 21:27:20 +0000 (15:27 -0600)]
Add support for systems without syslog.h

This patch disables the use of syslog for systems which
do not have it, such as QNX.  Log messages are still
printed to stderr.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61176
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoFix inotify usage for QNX
Matt Fischer [Tue, 5 Feb 2013 00:30:14 +0000 (18:30 -0600)]
Fix inotify usage for QNX

QNX's copy of sys/inotify.h is broken, and doesn't include
stdint.h even though it refers to types from it.  Therefore,
it must be included manually.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61176
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoNEWS
Simon McVittie [Mon, 18 Feb 2013 14:22:09 +0000 (14:22 +0000)]
NEWS

11 years agoEliminate unwanted whitespace from the man pages' XML source
Simon McVittie [Thu, 14 Feb 2013 13:30:19 +0000 (13:30 +0000)]
Eliminate unwanted whitespace from the man pages' XML source

As demanded by the git commit hook set up by autogen.sh, this eliminates
trailing whitespace on each line, and blank lines at EOF. We might as
well do this now, since every line in these files has changed anyway.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
11 years agoRemove doclifter "signature" from Docbook man pages' source
Simon McVittie [Thu, 14 Feb 2013 13:39:15 +0000 (13:39 +0000)]
Remove doclifter "signature" from Docbook man pages' source

This no longer serves any purpose, and might mislead contributors
into thinking that this XML is not the source for the man pages.
(The man(7)-formatted man pages used to be the canonical source for
the XML, but now it's the other way round.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
11 years agoRemoved precarious cross compile shell script.
Ralf Habacker [Sat, 16 Feb 2013 10:06:43 +0000 (11:06 +0100)]
Removed precarious cross compile shell script.

CMake provides a standardized way to cross compile packages by
using -DCMAKE_TOOLCHAIN_FILE at configure time.

Also recent distributions like opensuse provides up to date native mingw
binary packages and cross compile packages which reduces the cross
compile setup to package installation and setup of a cross tool chain file
as documented at http://www.vtk.org/Wiki/CMake_Cross_Compiling.

https://bugs.freedesktop.org/show_bug.cgi?id=59733
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoMore NEWS
Simon McVittie [Thu, 14 Feb 2013 13:49:02 +0000 (13:49 +0000)]
More NEWS

11 years agoAdd @DBUS_VERSION@ to the generated man pages
Simon McVittie [Thu, 14 Feb 2013 13:23:52 +0000 (13:23 +0000)]
Add @DBUS_VERSION@ to the generated man pages

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
[split out of previous patch -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agoTurn all man pages' source into configure-generated files
Simon McVittie [Thu, 14 Feb 2013 13:26:57 +0000 (13:26 +0000)]
Turn all man pages' source into configure-generated files

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
[dropped whitespace changes per Ralf's review -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>