| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33336
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Reviewed-by: Thiago Macieira <thiago@kde.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should mean we don't get invalid fds in the main loop.
The BSD (kqueue) and Windows code paths are untested, but follow the same
patterns as the tested Linux/generic Unix versions.
DBusTransportSocket was already OK (it called free_watches() before
_dbus_close_socket, and that did the remove, invalidate, unref dance).
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33336
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Reviewed-by: Thiago Macieira <thiago@kde.org>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The documentation claimed that INT_MAX (whatever that means) meant the
default, but the value that has actually always been checked for is
0x7fffffff (aka INT32_MAX on the competent platforms we sadly don't
restrict our portability to), so we should use that. (In practice D-Bus
probably never worked on platforms where int wasn't 32 bits, though.)
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
|
| |
| |
| |
| |
| |
| |
| |
| | |
It's entirely possible for a message to indicate how many bytes we need,
without actually being complete.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
struct member
This has been wrong approximately forever, for instance see:
http://lists.freedesktop.org/archives/dbus/2007-March/007357.html
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629938
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Trying to mix atomic operations with locked non-atomic operations is
broken: the atomic ops aren't necessarily atomic with respect to the
locked non-atomic ops, and the non-atomic ops aren't protected by the
lock because the atomic ops can change the refcount behind their back.
In theory we could use the connection lock if atomic ops aren't supported
(making a per-connection lock cheaper than the global lock used to
implement atomic ops) *and* our mutexes are recursive (making it safe
against deadlocks)... but life's too short.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Tested-by: Will Manley <freedesktop williammanley net>
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On Linux, we previously called openlog() (with different options!) while
initializing SELinux; leave SELinux messages as LOG_USER|LOG_INFO in case
anyone was relying on that, but let the rest of our log messages come
out as LOG_DAEMON.
Also enable LOG_PERROR (copy syslog messages to stderr) unconditionally;
we can make this an autoconf check if anyone's pet Unix doesn't have
LOG_PERROR.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35358
Reviewed-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| |
| | |
We don't need any initialization here, so there's nothing to fix.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35358
Reviewed-by: Colin Walters <walters@verbum.org>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
DBUS_ENABLE_X11_AUTOLAUNCH obviously requires DBUS_BUILD_X11. However,
the converse is not true.
If DBUS_BUILD_X11 is defined, dbus-launch will be able to connect to
the X server to determine when the session ends; most distributors will
want this, but it can be disabled with the standard Autoconf option
--without-x.
If DBUS_ENABLE_X11_AUTOLAUNCH is *also* defined, dbus-launch and libdbus
will be willing to perform autolaunch. Again, most distributors will want
this, but it can be disabled with --disable-x11-autolaunch.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997
Reviewed-by: Colin Walters <walters@verbum.org>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Doing a malloc and a hex-encoding pass just to produce a _dbus_verbose
message (i.e. a message that, in practice, nobody will see) seems like
overkill, and this block had incorrect error handling (not checking the
result of _dbus_string_init) which upsets static analysis tools.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881
Bug-NB: NB#180486
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's no way pending can be non-NULL here; if it was, we'd have jumped
straight past this block (getting filters from the connection), because
replies to pending calls don't go through filters.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33128
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In shell-like pseudocode, the desired result is:
if $use_subdir
dir = $tmpdir/dbus_nonce-$random
path = $dir/nonce
mkdir $dir
write file at $path
else
dir = $user_owned_place
path = $dir/dbus_nonce-$random
write file at $path
However, /nonce was accidentally appended to $dir instead of $path,
resulting in an attempt to mkdir /tmp/dbus_nonce-XXXX/nonce when
dbus_nonce-XXXX hadn't been created yet.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34569
Tested-by: David Zeuthen <davidz@redhat.com>
Reviewed-by: David Zeuthen <davidz@redhat.com>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
This is sufficiently unusual that it seems worth saying explicitly
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35182
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
available
Newer systemd-based systems support a global machine ID with the same
metrics as the D-Bus machine ID, but more powerful semantics (for
example on ro media) in /etc/machine-id.
If the D-Bus machine ID cannot be read, fall back to the systemd machine
ID.
This is a first step towards allowing D-Bus to be started up during
early boot where /var is not available.
[plus a whitespace fix -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35228
|
| |
| |
| |
| |
| | |
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35173
Reviewed-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is necessary to run the regression tests under valgrind (if
telling it to output to a dedicated fd), gdb, fakeroot etc.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35173
Reviewed-by: Colin Walters <walters@verbum.org>
|
|\ \
| |/
| |
| |
| | |
Conflicts:
NEWS
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's a minor security benefit, but not automatically beneficial (it
enables ASLR, but breaks prelinking, some buggy toolchains, and some gdb
versions). Distributions who know their infrastructure works well can
enable it just as easily via
./configure CFLAGS="-fPIE" LDFLAGS="-pie"
without extra support from us, and that's a generic solution applicable to
many packages.
Similarly, don't force libdbus and libdbus-internal to be PIC: libtool
knows better than we do whether that's necessary/beneficial on a
particular platform.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=16621
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27215
Bug-NB: NB#171940
Reviewed-by: Colin Walters <walters@verbum.org>
|
| |
| |
| |
| |
| | |
This reverts commits d1d395774435..09c9d6406b75f, keeping Lennart's
addition of UnknownInterface etc.
|
| |
| |
| |
| |
| | |
It's simply not true that the only possible error is a lack of resources
in the bus.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
I could be convinced that this is overkill, but it seems sensible to
forbid obviously-broken arg0namespace matches.
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
This makes use of UnknownInterface and UnknownObject where appropriate
in the D-Bus core.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34527
Reviewed-By: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
UnknownInterface, UnknownObject, UnknownProperty and PropertyReadOnly,
as discussed on the ML.
The first two are already used by various bindings, such as the Qt and
Java binding, but have never been made official.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34527
Reviewed-by: David Zeuthen <davidz@redhat.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is just as useful for bindings as dbus_signature_validate, and I
think it's a good design principle to say that anything checked in a
_dbus_return_if_fail should be something the caller could check
for themselves.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=20496
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As far as I can tell, we've never accepted out-of-range booleans and
canonicalized them, ever since this was first committed in 2004. If sent,
they'd be considered to be invalid by recipients, so they're unambiguously
an error.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35182
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This function specifically doesn't support Unix fds and is documented as
such.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35182
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
| |\ \
| | | |
| | | |
| | | | |
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The reasoning is the same as for dbus_message_iter_append_basic.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=16338
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Sending, for instance, ((dbus_bool_t) 666) is a programming error and
should be diagnosed as such.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=16338
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Strings: UTF-8 with no embedded NULs, by adding a new internal function,
_dbus_check_is_valid_utf8
Object paths, signatures: the obvious syntactic checks
This moves some of the burden of validation to the sender.
When sending <http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt>
10240 times with up to 1024 parallel calls pending, on a single-core ARM
Linux device, I found that user CPU time in dbus-spam increased by up to 80%
as a result of the validation. However, when sending messages to dbus-daemon,
overall throughput only reduced by 15%, and when sending messages to an echo
service, overall throughput actually improved by around 14% (presumably
because making the sender CPU-bound influenced kernel scheduling).
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=16338
Bug-NB: NB#223152
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, the comments said "this function will crash", but that's not
strictly true (checks can be disabled or made non-fatal). Their behaviour
is undefined if you do that, though.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=20496
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
|\ \ \
| |/ /
| | |
| | |
| | | |
Conflicts:
NEWS
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In an embedded system where the D-Bus session is a core part of the
environment, like Maemo, accidentally auto-launching a second session bus
(for instance for a concurrent ssh session) is a bad idea - it can lead
to a "split brain" situation where half the applications in the GUI are
using a different bus. In these controlled environments, it'd be useful
to prevent autolaunch from ever happening.
(As a side benefit, the changes to configure.in also mean that packagers
can explicitly --enable-x11-autolaunch, to make sure that failure to find
X will make compilation fail cleanly.)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997
Bug-NB: NB#219964
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The known use cases for autolaunching (ssh -Y firefox,
run konqueror in legacy DE) all need $DISPLAY too.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
According to the XDG Base Directory Specification, “the base directory
defined by $XDG_DATA_HOME is considered more important than any of the
base directories defined by $XDG_DATA_DIRS.” This makes it easier to
override a system service file as a normal user.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34496
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
|/ /
| |
| |
| |
| |
| | |
Reviewed-by: Havoc Pennington <hp@pobox.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=21261
|
| |
| |
| |
| | |
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There was previously a leak in _dbus_transport_get_is_authenticated, if
we hit OOM when copying the server's actual GUID. This would fail the
"SHA1 connection test" if _dbus_iterate was modified to allocate and free
one extra pointer per iteration.
Rather than adding OOM handling everywhere, if we avoid strdup'ing the
GUID, and just re-fetch the const string from the DBusAuth object on demand
instead, we go back to a situation where _dbus_transport_get_is_authenticated
can't fail.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33126
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's generated by configure and specific to a system, so there's no point.
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34292
|