Adrian Szyndela [Fri, 15 Apr 2016 10:51:58 +0000 (12:51 +0200)]
refactoring: using local types where available
Change-Id: I91cb72a2c52d1d55fdfd8afb1e6599483d637ea1
Adrian Szyndela [Fri, 15 Apr 2016 09:41:18 +0000 (11:41 +0200)]
refactoring: low-level API types changed to low-level
Change-Id: I934800df6da5ad5fa34366683541782eb88daa9f
Adrian Szyndela [Fri, 15 Apr 2016 09:24:25 +0000 (11:24 +0200)]
refactoring: coding style
Change-Id: I2a39f9b86a5ebbde11ee496ecc40a6cc08e6a1a1
Adrian Szyndela [Thu, 14 Apr 2016 12:35:57 +0000 (14:35 +0200)]
fix for memleaks
Freeing non-converted message after conversion
Freeing string objects
Freeing unique name in kdbus transport at end-of-life
Freeing matchmaker in kdbus transport at end-of-life
Change-Id: Iae4e231c52b78af3efd5a8a366fc01e50b03feeb
Adrian Szyndela [Mon, 11 Apr 2016 12:31:59 +0000 (14:31 +0200)]
checking policy: don't check 'ins' if not a method call
Change-Id: I666bc6474475906aa0ca2de96e47bfaa2c402ce2
Adrian Szyndela [Thu, 18 Feb 2016 14:17:01 +0000 (15:17 +0100)]
Update to dbus-1.10.6
Note: from version 1.10 it's required to have systemd support to be enabled not
only in dbus-daemon code but also in libdbus. This is because maintainers removed
built-in systemd support code (dbus/sd-daemon.c) and now depend on libsystemd-
provided functionality.
Additionally, update pkgconfig name to libsystemd (as required by configure.ac)
Change-Id: I2056086a9281543695643ac31fd3ab8648a4d205
Hyotaek, Shim [Fri, 18 Mar 2016 06:21:43 +0000 (15:21 +0900)]
MOVe License patch (LGPL2.1+, BSD2.0 license files)
Signed-off-by: Hyotaek, Shim <hyotaek.shim@samsung.com>
Change-Id: Ie0e4364412bdf83cde0dd33faddef7a22b856f58
Adrian Szyndela [Tue, 15 Dec 2015 13:25:50 +0000 (14:25 +0100)]
add dbuspolicy support
Change-Id: I1bef17d3930a2ca626d3c002eaa10cf6f16c8aac
sanghyeok.oh [Thu, 4 Feb 2016 06:36:53 +0000 (15:36 +0900)]
dbus:modified to default allow own & send method_call for system bus
Change-Id: I439cfcbf9c8e44217f6a906836c579dd952b9ec7
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
Adrian Szyndela [Tue, 2 Feb 2016 13:27:50 +0000 (14:27 +0100)]
Fixed remarshalling and getting signature
A few fixes:
- remarshalling to GVariant lacked locking of messages. It caused
missing signature and offsets.
- dbus_message_get_signature returned signature with outer parentheses.
- removed unused param in _dbus_header_load_gvariant().
- editorial corrections in kdbus_decode_dbus_message().
Change-Id: I29ca21cef6769b725be0c98580f54313bda842c8
Adrian Szyndela [Mon, 25 Jan 2016 08:38:10 +0000 (09:38 +0100)]
Remembering last offset and position at the message level
In GVariant, offsets in structs are stored for every end
of variable-sized elements except the last one.
We never know if an element we just added is the last one.
Therefore, the offset may be added when next element is added.
However, some users use multiple iterators. This change fixes
it at the root level - last offset value and position is kept
in the message.
Change-Id: I954657424d9da075edb10e5630b27df5bca8f917
INSUN PYO [Mon, 18 Jan 2016 10:10:51 +0000 (19:10 +0900)]
Disable GVARIANT feature temporally
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I84cf169d64f59b6b2086ade14a827b252ab44b97
Adrian Szyndela [Thu, 7 Jan 2016 13:48:48 +0000 (14:48 +0100)]
Add kdbus transport
This reverts commit
197db0df78e0a9f82df4162885854f99ff749505,
which reverts commit
771f5155c9a393a242329988d56661a51fc04e6c.
Change-Id: I4133020c585a6f9b42f487ffae4d2005b25a1d08
sanghyeok.oh [Wed, 30 Dec 2015 07:12:18 +0000 (16:12 +0900)]
dbus:MOVe:modify license ID
Change-Id: Iea6db9311c918f99059bb98e8bd396b36387d902
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
Hyotaek, Shim [Wed, 16 Dec 2015 06:27:54 +0000 (15:27 +0900)]
Revert "Add kdbus transport"
This reverts commit
771f5155c9a393a242329988d56661a51fc04e6c.
Change-Id: I73b6adc6b76b63e972f7228c88c18dabda81b006
Adrian Szyndela [Fri, 30 Oct 2015 10:19:33 +0000 (11:19 +0100)]
Add kdbus transport
This commit introduces ABI break due to size change of DBusMessageIter
structure. Consequently, all packages depending on libdbus need to be rebuilt.
Other authors:
Paweł Szewczyk <p.szewczyk@samsung.com>
Karol Lewandowski <k.lewandowsk@samsung.com>
and possibly others
Change-Id: Ie04b34295c38e5aaac63982996fa9eddc97dd696
Lukasz Skalski [Wed, 23 Sep 2015 09:24:29 +0000 (11:24 +0200)]
Revert "Perform Cynara runtime policy checks by default"
This reverts commit
e8610297cf7031e94eb314a2e8c11246f4405403.
Change-Id: Ifb60464c705f5b4e92f02f9e809d23e982d31c3d
Signed-off-by: Lukasz Skalski <l.skalski@samsung.com>
Jacek Bukarewicz [Tue, 23 Jun 2015 09:08:48 +0000 (11:08 +0200)]
Perform Cynara runtime policy checks by default
This change introduces http://tizen.org/privilege/internal/dbus privilege
which is supposed to be available only to trusted system resources.
Checks for this privilege are used in place of certain allow rules to
make security policy more strict.
For system bus sending and receiving signals now requires
http://tizen.org/privilege/internal/dbus privilege. Requesting name
ownership and sending methods is still denied by default.
For session bus http://tizen.org/privilege/internal/dbus privilege
is now required for requesting name, calling methods, sending and receiving
signals.
Services are supposed to override these default settings to implement their
own security policy.
Change-Id: Ifb4a160bf6e0638404e0295a2e4fa3077efd881c
Signed-off-by: Jacek Bukarewicz <j.bukarewicz@samsung.com>
José Bollo [Wed, 29 Apr 2015 13:58:13 +0000 (15:58 +0200)]
packaging: remove character class negation for sed
When running the command sed provided by toybox, the expression
[^[:cntrl:]] is not understood, what forbids to detect DBUS and
cause further errors.
This patch removes this expression.
Change-Id: If30543fadddf8b6811e14b548a747be99612894b
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
Jacek Bukarewicz [Fri, 20 Mar 2015 11:16:55 +0000 (12:16 +0100)]
Do not package libdbus-1.la file
Change-Id: I8de1d91e6ab3c891de9549bfb94ae637d7ff664a
Jacek Bukarewicz [Fri, 14 Nov 2014 09:47:29 +0000 (10:47 +0100)]
Add missing security manifests
Change-Id: I765c1f189a4496620e5edc8c02b3055db5b45c09
Jacek Bukarewicz [Tue, 3 Mar 2015 16:37:39 +0000 (17:37 +0100)]
Do not rely on Cynara cache when processing check rules
Cynara cache was required when processing messages that have been
blocked at the sender's message queue. Reliance on cache turned out to be
unacceptable due to the fact that some policies are not cacheable. For example
responses provided by Cynara askuser plugin might be single-use and thus cannot
be cached.
The solution is to attach deferred message to the message object when policy result
is unavailable. Upon next bus_check_privilege call use response from Cynara which
is saved in deferred message object.
Change-Id: I17152343540d7b8d13ad3540c25c043d57aa5949
Jacek Bukarewicz [Mon, 9 Feb 2015 15:25:31 +0000 (16:25 +0100)]
Fix several BusResult/dbus_bool_t mismatches
They were found by temporarily redefining BusResult in the following way:
typedef enum { BUS_RESULT_TRUE_E, BUS_RESULT_FALSE_E, BUS_RESULT_LATER_E } bus_result_t;
typedef struct { bus_result_t result; } BusResult;
#define BUS_RESULT_TRUE ((BusResult){BUS_RESULT_TRUE_E})
#define BUS_RESULT_FALSE ((BusResult){BUS_RESULT_FALSE_E})
#define BUS_RESULT_LATER ((BusResult){BUS_RESULT_LATER_E})
It doesn't compile because equality operator is not defined for structs.
Also, structs are not allowed in switch statement. However, some errors
indicated type mismatches which are now fixed.
Change-Id: I0eb5368359f342e0f4239a2ad95d34b9a8e10a23
Signed-off-by: Jacek Bukarewicz <j.bukarewicz@samsung.com>
Jacek Bukarewicz [Thu, 27 Nov 2014 10:26:21 +0000 (11:26 +0100)]
Add <check own="..." > support
Policy result unavailability is handled like send rules - dispatching
messages from the sender is blocked and resumed when result becomes
available.
Handler of "RequestName" method needs to return BUS_RESULT_LATER when
policy result is not known therefore its return type is modified.
Since bus message handlers are put into function pointer array other
message handler function singatures are also affected.
Change-Id: I4c2cbd4585e41fccd8a30f825a8f0d342ab56755
Jacek Bukarewicz [Fri, 28 Nov 2014 11:39:33 +0000 (12:39 +0100)]
Handle receive rule result unavailability and message broadcasts
When message is sent to the addressed recipient and receive rule
result is unavailable we don't want to block the sender
as it most likely will be the privileged service, so instead we queue
it at the recipient. Any further messages sent to it will be queued to
maintain message order. Once the answer from Cynara arrives messages are
dispatched from the recipient queue. In such case full dispatch is
performed - messages are sent to addressed recipient and other
interested connections.
Messages sent to non-addressed recipients (eavesdroppers or broadcast
message recipients) are handled in a similar way. The difference is
that it is not full dispatch meaning message is sent to a single recipient.
Change-Id: Iecd5395f75a4c7811fa97247a37d8fc4d42e8814
Jacek Bukarewicz [Fri, 28 Nov 2014 11:07:39 +0000 (12:07 +0100)]
Disable message dispatching when send rule result is not known
When unicast message to addressed recipient is sent and policy result
is not available message dispatch from the sender is disabled.
This also means that any further messages from the given connection are
put into the incoming queue. If response is received message dispatching
is resumed. This time answer is expected to be in cache so the message is
processed synchronously.
Receive rule result unavailability is not yet handled - such messages are
rejected. Also, if message is sent to non-addressed recipient message
is silently dropped.
Change-Id: Ia45905baf667ca42f386c1def108eca190d615bb
Jacek Bukarewicz [Thu, 27 Nov 2014 17:11:05 +0000 (18:11 +0100)]
Integration of asynchronous security checks
This commit introduces basic framework for asynchronous policy
checks and Cynara integration code. Functions for checking security
policy can now return third value - BUS_RESULT_LATER denoting check
result unavailability. Whenever policy checker cannot decide on the
result of the check it is supposed to allocate DeferredMessage structure
that will be passed to the upper layers which can decide what should be
done in such situation.
Proper handling of such case will be implemented in subsequent commits.
Currently such return value results in message denial.
Change-Id: I324b6ab68442e493853d8fe219c7a37fbd831872
Patrick Ohly [Wed, 30 Jul 2014 08:00:59 +0000 (10:00 +0200)]
policy: add <check> element
The new <check> element is almost the same as <allow> and <deny>. The
difference is that it has an additional "privilege" parameter which
will be tested at runtime. Depending on the outcome of the check, the
rule turns into an allow or deny rule.
Executing these checks will be implemented separately. At the moment,
a <check> is basically the same as <deny>.
The representation of a rule grows by one additional pointer and needs
one additional bit to represent <check> in addition to <allow>/<deny>.
Reordering elements might mitigate this effect.
Change-Id: I25baa802fdf41413a78200273c3a0b17ae7f1cfa
Patrick Ohly [Fri, 20 Jun 2014 14:55:00 +0000 (16:55 +0200)]
GetConnectionCredentials - add smack support
A process should never change its Smack label while connected to
D-Bus. If it did, we would end up with race conditions around
permission checking. Therefore we can retrieve the Smack label once,
when the process connects, and use that label whenever it is needed.
A new public libdbus API also gets added: dbus_connection_get_smack_label()
This is primarily for dbus-daemon, but may also be useful for other applications
creating direct connections.
Change-Id: I16ec50a031809aab879a543ec2d7effd56768bf1
Rafal Krypa [Wed, 29 Oct 2014 10:39:37 +0000 (11:39 +0100)]
Drop capabilities in user dbus session
In the systemd user service file, drop all process capabilities. The
capabilities will be inherited from parent process (systemd --user). They
are meant to be inherited by launcher process, but are of no use for
dbus. Since they would give unneeded privileges to dbus, they should be
dropped.
Change-Id: I89a1a1b21d07380f68c9933aab272ebe2b08a889
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Patrick Ohly [Fri, 20 Jun 2014 13:29:53 +0000 (15:29 +0200)]
Update packaging to 1.8.2
Change-Id: I8c0bdcaa11802e992c43c629d3f413d21bd9d159
Stephane Desneux [Thu, 23 Oct 2014 11:21:39 +0000 (13:21 +0200)]
add a small script in /etc/profile.d/dbus.sh to export DBUS_SESSION_BUS_ADDRESS
If the dbus session address is not defined, this small script will try to
pick the address from the environment of the systemd --user process for the current
user.
Typically, this allows to log on a target through ssh, then run su - <user> and
have the same environment as the shells inside the user session.
Change-Id: Id6133077bf9943c4203f7d993b8942dc1455bef5
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Jacek Bukarewicz [Thu, 4 Sep 2014 08:50:59 +0000 (10:50 +0200)]
Make dbus-1 dependency provided by dbus
dbus-1 was originally provided by dbus package. Commit
8eeae5fd70
fixed circular dependency between dbus and systemd. It also moved
dbus-1 provision from dbus to dbus-devel probably by mistake.
Certain packages like gumd or polkit have explicit dependency on
dbus-1 which makes them install dbus-devel unnecessarily.
Change-Id: I77a6561eff6f8c6ce84d849df936dda2c290a4d2
Signed-off-by: Jacek Bukarewicz <j.bukarewicz@samsung.com>
Ronan Le Martret [Wed, 29 Jan 2014 11:06:31 +0000 (12:06 +0100)]
dbus-x11 should not try to build into a pure wayland platform.
This package is designed for an X server platform.
In a system released, based exclusively on Wayland platform, it should be in a excluded status.
Tizen devel | Tizen release
_____________|______________
succeeded | succeeded
excluded | excluded
broken |
failed |
unresolvable |
blocked |
locked |
note:
- The disabled status is only
allowed for OBS administration.
Change-Id: I1495b66a2e32b580223229ead6bc66426ff680a6
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
Adrian Negreanu [Mon, 25 Nov 2013 12:11:14 +0000 (14:11 +0200)]
libdbus:build-require pkg-config
otherwise, configure fails to find libsmack, which
happens to be the first lib searched with pkg-config
checking for _NSGetEnviron... no
checking for LIBSMACK... configure: error: libsmack is
required to enable smack support
error: Bad exit status from /var/tmp/rpm-tmp.VUiY9N
Change-Id: Ibf01a52ae6274503e2490f835fbd686e985807e8
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
Patrick McCarty [Mon, 7 Oct 2013 19:39:15 +0000 (12:39 -0700)]
packaging: enable Smack support
Change-Id: Ib400feec8193bb5c98347b778e0aa92a30d954c3
Signed-off-by: Patrick McCarty <patrick.mccarty@linux.intel.com>
Chengwei Yang [Tue, 10 Sep 2013 10:26:16 +0000 (18:26 +0800)]
Install dbus directories
At previous, these directories owned by libdbus. However, the previous
commit 8eeae5f split libdbus into a separate .spec and doesn't install
these directoris.
These directoris are critical to dbus, for example, without
/etc/dbus-1/{system.d,session.d}, the dbus-daemon system bus and session
bus can not launch.
Change-Id: Ia98bd56171492c90e4a078b39adf08cc802cb955
Adrian Negreanu [Tue, 6 Aug 2013 12:02:04 +0000 (15:02 +0300)]
fix systemd->dbus->systemd circular dependency
extract libdbus and dbus-devel as separate packages
Change-Id: Ia097a2b3fee2911ee89000dd2d5762a112bf17f6
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
Michael Leibowitz [Mon, 22 Jul 2013 12:56:06 +0000 (05:56 -0700)]
updating changelog
Brian McGillion [Mon, 6 Feb 2012 16:48:30 +0000 (18:48 +0200)]
Enforce smack policy from conf file
Brian McGillion [Mon, 6 Feb 2012 16:46:05 +0000 (18:46 +0200)]
Enable checking of smack context from DBus interface
Conflicts:
bus/driver.c
cmake/CMakeLists.txt
Change-Id: Ibc9d1ccb86c3b28d8df3a4becf33ba30234832d8
Alexandru Cornea [Fri, 28 Jun 2013 20:42:49 +0000 (23:42 +0300)]
resetting manifest requested domain to floor
Anas Nashif [Wed, 19 Jun 2013 10:16:37 +0000 (06:16 -0400)]
Update to dbus 1.6.12
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Simon McVittie [Wed, 19 Jun 2013 14:31:03 +0000 (15:31 +0100)]
update changelog
- TZPC-3044, CVE-2013-2168: fix local denial of service (backport from 1.6.12)
- TZPC-1971: make libdbus thread-safe by default (backport from 1.7.4/1.7.6)
Patrick McCarty [Fri, 7 Jun 2013 22:53:20 +0000 (15:53 -0700)]
packaging: ensure ownership for /var/lib/dbus
For x86_64 builds, %{_localstatedir}%{_libdir}/dbus expands to
/var/usr/lib64/dbus, which is incorrect.
This commit fixes the path in the spec to make sure the intended
directory, /var/lib/dbus, is created and owned by this package.
Change-Id: I60947c4e2c221ad2f83d01bd87dc76fc8f5e4433
Anas Nashif [Mon, 27 May 2013 03:43:02 +0000 (23:43 -0400)]
Update to 1.6.10
Anas Nashif [Sun, 26 May 2013 18:52:43 +0000 (14:52 -0400)]
update to 1.6.10
Simon McVittie [Tue, 16 Apr 2013 17:34:16 +0000 (18:34 +0100)]
Adapt for rebase onto upstream dbus-1.6.8 git tag
When building from git we need a BuildRequires on xmlto, since we can
no longer rely on the pre-generated HTML documentation from the tarball.
That pulls in libxslt-tools, which means dbus.devhelp is generated, so
the build fails because we weren't accounting for that; so explicitly
require libxslt-tools too (dbus uses it both via xmlto, and directly),
and package dbus.devhelp.
Change-Id: I7505fc6fd1e7c4fc23a53f349a4fdd18d88237ec
Anas Nashif [Thu, 28 Mar 2013 13:15:58 +0000 (06:15 -0700)]
Cleanup lib name in spec
Anas Nashif [Thu, 28 Mar 2013 13:15:12 +0000 (06:15 -0700)]
use libname directly
Anas Nashif [Fri, 22 Mar 2013 18:36:11 +0000 (11:36 -0700)]
Fixed package groups
Anas Nashif [Wed, 16 Jan 2013 03:13:39 +0000 (19:13 -0800)]
No OOMScoreAdjust for user session
Anas Nashif [Mon, 31 Dec 2012 15:56:22 +0000 (07:56 -0800)]
add user session units
Anas Nashif [Mon, 31 Dec 2012 15:50:37 +0000 (07:50 -0800)]
add user session units
Simon McVittie [Fri, 30 Nov 2012 16:52:54 +0000 (16:52 +0000)]
initial changelog
Simon McVittie [Thu, 29 Nov 2012 11:10:36 +0000 (11:10 +0000)]
regenerate packaging/dbus-x11.spec with ( cd packaging && sh pre_checkin.sh )
Otherwise, local builds with 'gbs build' try to apply the nonexistent
patch 0001-fix-sba-for-dbus-activation.patch, and fail.
Anas Nashif [Fri, 16 Nov 2012 18:45:18 +0000 (10:45 -0800)]
fixed splitting
Anas Nashif [Fri, 16 Nov 2012 18:25:40 +0000 (10:25 -0800)]
fixed splitting
Anas Nashif [Fri, 16 Nov 2012 18:24:32 +0000 (10:24 -0800)]
fixed splitting
Anas Nashif [Fri, 16 Nov 2012 17:26:26 +0000 (09:26 -0800)]
Fixed package splitting
split dbus-x11 correctly
Anas Nashif [Fri, 16 Nov 2012 01:50:16 +0000 (17:50 -0800)]
spec cleanup and removed patches
Anas Nashif [Tue, 30 Oct 2012 23:28:05 +0000 (16:28 -0700)]
add packaging
Simon McVittie [Tue, 1 Dec 2015 18:19:17 +0000 (18:19 +0000)]
1.10.6
Simon McVittie [Mon, 23 Nov 2015 21:10:09 +0000 (21:10 +0000)]
NEWS for 1.10 branch
Simon McVittie [Fri, 20 Nov 2015 17:19:51 +0000 (17:19 +0000)]
uid-permissions test: don't assert that root can UpdateActivationEnvironment
Since 1.10.4 this is hard-coded to be disallowed when an activation
helper is used. That would be a security flaw waiting to happen,
and makes little sense anyway, because the activation helper sanitises
its environment.
Use BecomeMonitor() instead, as our way to assert that root and
messagebus are privileged.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93036
Reviewed-by: Iain Lane
Simon McVittie [Tue, 17 Nov 2015 16:42:01 +0000 (16:42 +0000)]
name-test: don't run these tests with autotools if targeting Windows.
The wrapper shell script that sets up their environment is nowhere
near being portable. In particular, it uses dbus-run-session,
which is Unix-specific.
[rh: Add autotools scope in commit title]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Rewieved-by: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Wed, 18 Nov 2015 22:38:20 +0000 (23:38 +0100)]
Windows _dbus_get_autolaunch_address: don't leak shm_name
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Tue, 17 Nov 2015 23:46:34 +0000 (23:46 +0000)]
1.10.5
Simon McVittie [Tue, 17 Nov 2015 21:40:36 +0000 (21:40 +0000)]
dbus 1.10.4
Simon McVittie [Tue, 17 Nov 2015 18:22:37 +0000 (18:22 +0000)]
NEWS
Jan Alexander Steffens (heftig) [Sat, 14 Nov 2015 15:32:43 +0000 (16:32 +0100)]
bus-driver: Support returning org.freedesktop.DBus UID and PID
Attempting to call SetEnvironment on systemd causes it to inquire
about the caller's connection UID and PID. If this check fails,
the call is rejected.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92857
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[smcv: go back to DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN as the error code
for failure to determine the pid]
Jan Alexander Steffens (heftig) [Sat, 14 Nov 2015 15:32:42 +0000 (16:32 +0100)]
test/sd-activation: Test UpdateActivationEnvironment forwarding
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92857
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Jan Alexander Steffens (heftig) [Sun, 15 Nov 2015 15:00:33 +0000 (16:00 +0100)]
bus_driver_handle_update_activation_environment: Forward to systemd
If we use systemd activation, forward all UpdateActivationEnvironment
requests to org.freedesktop.systemd1.Manager.SetEnvironment, in order
to ensure variables needed by D-Bus services are available when these
services are launched by systemd.
Since UpdateActivationEnvironment is not available on the system bus,
this only applies to user buses.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92857
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Jan Alexander Steffens (heftig) [Sat, 14 Nov 2015 15:32:37 +0000 (16:32 +0100)]
bus_driver_handle_update_activation_environment: Error on system buses
The default policy already disallows calls on system buses. Since any
bus with a service helper cleans the environment anyway, there's no
point in allowing this to be called.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92857
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Tue, 17 Nov 2015 13:23:30 +0000 (13:23 +0000)]
fdpass test: assert that TCP connections don't say they can pass fds
As well as slightly increasing our test coverage, this ensures
that at least one test-case in this test is not skipped, working
around CMake's lack of support for the Automake-style exit code
produced by GTest executables (they exit 77 if everything was skipped).
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92887
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Ralf Habacker [Sun, 15 Nov 2015 18:54:03 +0000 (19:54 +0100)]
Fix recursive loop in backtrace generator on windows.
Backtrace generator called _dbus_warn(), which calls
backtrace generator recursively with DBUS_FATAL_WARNINGS=1.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Fri, 13 Nov 2015 18:48:16 +0000 (19:48 +0100)]
Do not fail with fatal message skipping GetConnectionUnixProcessID test-bus test on windows.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Fri, 13 Nov 2015 18:41:43 +0000 (19:41 +0100)]
Fix test-bus test for GetConnectionUnixUser driver method on windows.
Because GetConnectionUnixUser is not supported on windows it fails with
DBUS_ERROR_FAIL.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Thu, 12 Nov 2015 11:49:46 +0000 (12:49 +0100)]
Skip launch helper activation tests on windows silently.
The system bus is unsupported there and Windows does not
have any concept of setuid binaries, so it can't ever
actually work.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Wed, 11 Nov 2015 14:02:44 +0000 (15:02 +0100)]
Fix memory leak in _dbus_win_set_error_from_win_error().
There is no need to make a local (leaked) copy of the message,
because dbus_set_error() already makes a copy of its parameters.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Wed, 11 Nov 2015 14:02:00 +0000 (15:02 +0100)]
Fix memory leaks in bus_activation_service_reload_test() in case of errors.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Wed, 11 Nov 2015 14:01:11 +0000 (15:01 +0100)]
Revert "Fix memory leaks in bus_activation_service_reload_test() in case of errors."
This reverts commit
d8569ac647da4d62c7a251d8e809f2d545a77837.
Ralf Habacker [Mon, 9 Nov 2015 12:38:59 +0000 (13:38 +0100)]
Fix memory leaks in bus_activation_service_reload_test() in case of errors.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Ralf Habacker [Mon, 9 Nov 2015 19:38:03 +0000 (20:38 +0100)]
Fix test-bus segfault_service_no_auto_start test on windows.
Windows returns unhandled exceptions from a running child
by specific exit codes and not by signals as on UNIX.
Therefore we use DBUS_ERROR_SPAWN_CHILD_EXITED for propagating
unhandled exceptions to the parent too.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Fri, 6 Nov 2015 17:26:40 +0000 (18:26 +0100)]
update NEWS
Ralf Habacker [Fri, 6 Nov 2015 13:03:23 +0000 (14:03 +0100)]
Fix test cases running client and server dispatch design issue.
DBus test cases running the server *and* client loop in the same
process assumed that all messages send from the server has to be
received in one client dispatch, which is not the case in all
environments.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Fri, 6 Nov 2015 13:02:29 +0000 (14:02 +0100)]
Fix bug unrefing connection too early in check_hello_message().
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Wed, 4 Nov 2015 13:21:20 +0000 (14:21 +0100)]
Compile fix on Windows.
This commit fixes a regression introduced with commit
04b8a7a772cfa9ae8ea6ce452d1fb7f23e25fd3f.
Ralf Habacker [Mon, 2 Nov 2015 20:56:32 +0000 (21:56 +0100)]
Fix warning: variable 'ret' set but not used [-Wunused-but-set-variable].
Only set valid child status in case exit code has been gotten from
child process, otherwise signal failure through thread return value.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Mon, 2 Nov 2015 23:23:56 +0000 (00:23 +0100)]
Test system bus config files on Unix only
Previously, we didn't consistently test parsing of every file in
valid-config-files-system/ everywhere that we tested valid-config-files/.
We now test it on Unix.
The system bus is not supported on Windows, so we do not test
valid-config-files-system/ there.
valid-config-files/many-rules.conf contains <user> and <group> rules
which are not applicable to Windows. Copy the original many-rules.conf
to valid-config-files-system/ so that it will be tested on Unix, and
remove the non-portable rules from valid-config-files/many-rules.conf.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[rh:base patch came from Simon]
Simon McVittie [Mon, 2 Nov 2015 18:19:02 +0000 (18:19 +0000)]
Don't use _dbus_warn() for intentionally-skipped tests
The tests are run with _dbus_warn() fatal, so if a particular test is
not applicable on the current platform, we shouldn't call it.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Mon, 2 Nov 2015 14:24:51 +0000 (14:24 +0000)]
test_default_session_servicedirs: use the intended data directory
If D-Bus was configured for /usr/local and built in Z:/build,
the previous code would use
Z:/build/dbus/.libs/usr/local/share/dbus-1/services
whereas the intention was to replace the configured prefix /usr/local
with the detected location, more like
Z:/build/dbus/.libs/share/dbus-1/services
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Simon McVittie [Mon, 2 Nov 2015 14:15:14 +0000 (14:15 +0000)]
test_default_session_servicedirs: simplify to a single exit code-path
A similar simplification was already done on master as part of commit
f830e14, Bug #83539.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Ralf Habacker [Sat, 31 Oct 2015 20:06:04 +0000 (21:06 +0100)]
Fix warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement].
Includes minor indention fix.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Sat, 31 Oct 2015 20:05:03 +0000 (21:05 +0100)]
Fix typo and missing eol on debug message.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92721
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Thu, 29 Oct 2015 05:31:38 +0000 (06:31 +0100)]
refs test: reduce number of repeats under Wine
Under Wine, the API calls we use to do this are implemented via IPC
to wineserver, which makes it unreasonably slow to try to brute-force
bugs by having many threads stress-test refcounting. Do a few
repetitions just to verify that refcounting basically works, but
don't do the full stress-test.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92538
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
[rh: add WINESERVERSOCKET related hint]
Simon McVittie [Mon, 19 Oct 2015 15:02:36 +0000 (16:02 +0100)]
When running TAP tests, filter out trailing \r from Windows .exe
If we're running Windows executables using Wine, then tap-driver.sh
won't accept "1..4\r\n" as TAP syntax.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92538
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Ralf Habacker [Tue, 3 Feb 2015 18:56:32 +0000 (19:56 +0100)]
Fix crash running test-syslog on windows/wine.
Use seperate buffer in _dbus_system_logv() to avoid crash in vsprintf().
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92538
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Ralf Habacker [Sun, 4 Oct 2015 08:33:32 +0000 (10:33 +0200)]
Display autolaunch scope on verbose print of daemon found message on windows.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92080
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Simon McVittie [Mon, 26 Oct 2015 18:54:04 +0000 (18:54 +0000)]
1.10.3