Simon McVittie
9fce738033
Capture all messages received or sent, and send them to monitors
...
Unlike eavesdropping, the point of capture is when the message is
received, except for messages originating inside the dbus-daemon.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-04 17:15:17 +00:00
Simon McVittie
00af6389be
Add support for morphing a D-Bus connection into a "monitor"
...
This is a special connection that is not allowed to send anything,
and loses all its well-known names.
In future commits, it will get a new set of match rules and the
ability to eavesdrop on messages before the rest of the bus daemon
has had a chance to process them.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
2015-02-04 17:15:08 +00:00
Simon McVittie
4a0f1849be
Merge branch 'dbus-1.8'
2015-02-04 17:07:25 +00:00
Simon McVittie
3a78d91694
NEWS for 1.8 branch
2015-02-04 16:44:31 +00:00
Simon McVittie
1f05dc9744
_dbus_listen_tcp_socket: comment on another reason to ignore EADDRINUSE
...
Not being aware of the second reason described here caused bug #87999
in the equivalent code on Windows.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87999
2015-02-04 15:19:43 +00:00
Simon McVittie
d70675e940
_dbus_listen_tcp_socket: use NI_NUMERICSERV to determine port number
...
If we happen to have been given (say) port 30865, we want to
represent that as host=localhost,port=30865 and not
host=localhost,port=csync2.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87999
2015-02-04 15:19:42 +00:00
Ralf Habacker
ffa69bcb55
Provide appropriate DBUS_USER and DBUS_TEST_USER under CMake
...
[separated out from a larger commit -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88964
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-02-04 15:14:00 +00:00
Ralf Habacker
b36747519a
Link tests to test-utils-glib.c under CMake too
...
[Separated out from a larger commit -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88964
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-02-04 15:11:48 +00:00
Simon McVittie
9806240b78
dbus-monitor: use common code from dbus-test-tool
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46787
Reviewed-by: Philip Withnall
[also sync up the cmake build system -smcv]
2015-02-04 14:18:39 +00:00
Simon McVittie
ca63ef7133
1.9.9
2015-02-03 23:13:51 +00:00
Simon McVittie
d7b3dba1bd
1.9.8 development release
2015-02-03 19:36:07 +00:00
Simon McVittie
3cf71c2707
Treat root as a valid candidate for TEST_USER_ME
...
If spawn_dbus_daemon() can fail for TEST_USER_ME, then we'd have to
go through all the tests adding the ability to skip tests after
it fails, which is a fairly extensive change.
The tests have historically all run as whatever uid is supplied, and
if the tests are being run as root for some reason - perhaps in a CI
framework for an embedded platform that doesn't have non-root users,
or in an environment where you can be root or non-root but not both -
there is no particular reason to skip them.
2015-02-03 19:35:39 +00:00
Simon McVittie
b1c54b5a75
NEWS
2015-02-03 16:25:56 +00:00
Simon McVittie
cf35dad25a
Add a regression test for systemd activation
...
4.5 years after it was implemented, here is the regression test.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=57952
Reviewed-by: Philip Withnall
2015-02-03 16:20:01 +00:00
Simon McVittie
652a324fb6
bus_context_log_and_set_error: add and use
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:24 +00:00
Simon McVittie
c6e024834b
_dbus_set_error_valist: add
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:20 +00:00
Simon McVittie
3861a42655
bus_context_log_literal: add simplified version of bus_context_log
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:17 +00:00
Simon McVittie
5b89e2a839
bus: put the printf attribute in the header where it will do more good
...
Now we can actually notice incorrect format strings in other
translation units.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:14 +00:00
Simon McVittie
1f716452e7
bus driver: factor out bus_driver_check_caller_is_privileged, and allow root
...
Unlike the initial mitigation for CVE-2014-8148, we now allow
uid 0 to call UpdateActivationEnvironment. There's no point in root
doing that, but there's also no reason why it's particularly bad -
if an attacker is uid 0 we've already lost - and it simplifies
use of this function for future things that do want to be callable
by root, like BecomeMonitor for #46787 .
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:11 +00:00
Simon McVittie
98ae1149ad
Add a test for uid-controlled permissions
...
This is technical debt from mitigating CVE-2014-8148, which should
really have had a regression test at the time.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:08 +00:00
Simon McVittie
6a49ced2dd
Add infrastructure to run bits of tests under an alternative uid
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:05 +00:00
Simon McVittie
1e21cc86bf
test: implement GLib-style "installed tests"
...
We run each test twice:
* once with the system's session.conf, as an integration test
(test-cases that need a special configuration are automatically
skipped)
* once with our special test configuration files, which provide better
coverage
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:01 +00:00
Simon McVittie
ee032f5a11
Generate test configuration files via build-time sed, not configure
...
This means we can generate a version that works when installed,
from the same source files.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:19:00 +00:00
Simon McVittie
8b238f3f0d
Factor out some utility functions from test/dbus-daemon*
...
In the process, make test_kill_pid() safer: do not try to terminate
more than one pid, or the NULL handle.
Also stop leaking the address_fd in spawn_dbus_daemon, a pre-existing
bug that was spotted by Philip Withnall during review.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:18:57 +00:00
Simon McVittie
6976a7f199
Bump required GLib version to 2.36
...
This is for g_close(), which the next commit will use. It also lets us
rely on g_type_init() being a no-op (since 2.32 the type system is
always initialized by a global constructor).
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
2015-02-03 16:18:47 +00:00
Lukasz Skalski
9668c61726
Update .gitignore files
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88943
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-02-03 15:40:01 +00:00
Simon McVittie
9e0f5ae7d3
NEWS
2015-02-02 18:52:08 +00:00
Simon McVittie
1acc7b09ed
lcov: use builddir, not srcdir
...
It seems lcov (or gcc?) has changed its paths since last time this
worked.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88808
Reviewed-by: Philip Withnall
2015-02-02 18:38:07 +00:00
Simon McVittie
7cf5d2fac4
Enable subdir-objects Automake option
...
It has been supported since at least 1.10, and its absence is
deprecated since 1.14.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88808
Reviewed-by: Philip Withnall
2015-02-02 18:38:07 +00:00
Simon McVittie
ef06f2a233
bus: exit on fatal errors even if not syslogging
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88808
Reviewed-by: Philip Withnall
2015-02-02 18:38:07 +00:00
Ralf Habacker
795ea3007e
Fix 'dbus-daemon on Windows: Failed to bind socket "localhost:xxxx": Address already in use'.
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87999
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-30 22:07:10 +01:00
Ralf Habacker
91dbd2eff5
In _dbus_listen_tcp_socket() set socket family to ipv4 in unspecified case for now.
...
This fix is required to support at least ipv4 tcp support calling
_dbus_listen_tcp_socket() without family.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87999
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-30 20:29:49 +01:00
Ralf Habacker
fa1ada44ea
Add manual tcp test case.
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87999
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-30 09:33:40 +01:00
Simon McVittie
b5bf338953
_dbus_string_append_printf_valist: avoid leaking copy of varargs
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88087
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-29 12:09:40 +00:00
Simon McVittie
04056bba41
Use pygi instead of pygobject 2
...
pygobject 2 is obsolete and unmaintained, and anyway this is for
optional functionality (full regression test coverage) rather than
anything that will be needed in production builds.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=85969
2015-01-27 14:29:59 +00:00
Thiago Macieira
180f3a8061
Fix build with --enable-maintainer-mode --disable-embedded-tests
...
Otherwise, we get:
dbus/dbus-object-tree.c:323:1: error: 'find_subtree' defined but not used [-Werror=unused-function]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=87837
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-27 14:18:03 +00:00
Simon McVittie
254b47aa68
When generating random messages, exercise empty signature as intended
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88089
2015-01-06 22:45:27 +00:00
Simon McVittie
778c4ee281
_dbus_marshal_validate_test: test both /foo/ and foo/
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88089
2015-01-06 22:45:27 +00:00
Simon McVittie
c89cbed909
selinux: avoid leaking on systems where va_start allocates memory
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88087
2015-01-06 22:12:27 +00:00
Simon McVittie
1650d77bf1
Fix assertion in regression test to be equality test, not assignment
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88088
2015-01-06 22:08:47 +00:00
Simon McVittie
4a7cb0cb6f
Merge branch 'dbus-1.8'
...
Conflicts:
NEWS
configure.ac
2015-01-05 15:00:45 +00:00
Simon McVittie
d97e8f95aa
dbus-1.9.6
...
-----BEGIN PGP SIGNATURE-----
iQIVAwUAVKql4E3o/ypjx8yQAQhvWQ//RYjifPkMdE9ppXQsuLH65laZihPo04Fy
KqZapj7VUtFShJYB1MdAkvqi3+r/OtIg9pfEg23XB+va24/otZBxgi/r+1Bqi3ww
XJLHPeEFWVIARbbOFEa3QuUkJa/rhfgVxpj+b41UC7P772YmXcwOAlNhi/mlgxP9
HGU54e2ANM70/ineMHBM+MjRvxhs67fsZ+IDd3JPpF+W9U5x1OSwPGLx4LwAbKUm
PIxCLbw9A7zoDOCMUrQyO1SE2q/E9W/UShwMQWppFsyBbyfr7lIaTZSQx+af/eI6
RXsZVMFLIWXBIS8OoQWKDP3zaTJPvlqI1KUjsCpAUrBI+ExHYauigX9GD+W1T86X
I+BTFVL60XofCWws4ztk38wvzVYAgc3BW7aiLnl5d2UNIPMGZH2hFwMOxbyexINM
gbShSyhNVnN0uzpWZzrKqf2JG1NWmPqxoVaOtfHF1T+dbZv2FTbk6jSMzavlzAHZ
WVVlRWA+0hG4GCd8mSrFbncGwyfgqgfBxXpMVeaqhoiHAixwqT/y8HidTLHnhEHM
rNOgJrbF8Xd+Tzgh5VS8IGXZeY8Q3JM3QS5TstzJd5pSohQaE6UpPoIuhS1YGzmL
4YK/wUB6+EKh5p22f1H+VtIanq+l4b1bYok3pNnJhAcYmzHt5YRe3DAt3UBH9ACg
c6iQqVwZ/fc=
=jedl
-----END PGP SIGNATURE-----
Merge tag 'dbus-1.9.6'
dbus-1.9.6
Conflicts:
NEWS
configure.ac
2015-01-05 14:58:48 +00:00
Simon McVittie
a559ed3508
1.8.15
2015-01-05 14:57:26 +00:00
Simon McVittie
9a8bf9d810
dbus-1.8.14
...
-----BEGIN PGP SIGNATURE-----
iQIVAwUAVKql8U3o/ypjx8yQAQjkMRAAoFSUlMmZF52fRX/LIsLmsAU6btzYgU0A
Bj+JbpSCLBBd+Te0WDHugSol63cAbI+SWTxkdl0K/1+Bsr4MUEcMTf+6yVHArte4
+zUs2DAPrK7LYU6U2qiVWmIn3tBS7vf6RiGiqBZu0nm+//lc5IO7M31uVbXaiT/X
03wQ+RPV0J715wkNZTi1t+yTStRtGbuw7rTxYPtgJOa1fuOxGGh07wPFJUc/gbU3
kq9XSAsqDmDQjh1cufbnJOB+lsxAj8AYlz7Lb8O1nM1AwyuJa3CO4bk37XqFTxk9
q6rocequK/MeN3f3hMAQkEF4c1nq/9ibKeE+Pn1qZ+yUSPxXqjsdvlxEdbS5wx5R
q5A1z27o5b1KitMWSlMxzgwx2BP2oM/gDU1HuEIfFztE0HjLOc+pS1cv8iTojTVT
rzLqcNrhDCcZT9ocC/Y428y+WwYPEcjhuVB9TYo2Q42/Czexz0394Aze1lZzDtkl
E1Fz0o0PuYMjFh7E0VGQHGfucVJMLZE/pXwYafSU47R1htErhr/3se/CYn0SfUBN
9wkA9/E+V/7US2qdNOEfe8dx0y610Sk5y8BOW/AGIANTQjVLbQJp2lYjUnFaKgQL
D/pYPI9viGBYr2jAmQIarPAZjljOu+F9DD3mqStn6tuxxytl4kQtNKVonJ3hxVPV
9riJ4ce7iNM=
=UAl+
-----END PGP SIGNATURE-----
Merge tag 'dbus-1.8.14' into dbus-1.8
dbus-1.8.14
2015-01-05 14:56:44 +00:00
Ralf Habacker
fd4f3ca3f6
Fix usage of undefined variable DBUS_WIN32 on cmake build system
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88010
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-05 11:50:11 +01:00
Ralf Habacker
ea54a97f05
Merge branch 'dbus-1.8'
...
Conflicts:
NEWS
configure.ac
2015-01-05 11:49:48 +01:00
Ralf Habacker
01af167b55
Windows cmake cross compile fix
...
We need to include 'test' subdir in any case not only when using glib.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88009
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-05 11:47:13 +01:00
Ralf Habacker
2abe9ffeb7
Fix of 'dbus-daemon can only handle 64 simultaneous connections on Windows'.
...
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71297
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2015-01-05 11:47:02 +01:00
Simon McVittie
ae9d7149aa
Merge branch 'dbus-1.8' and prepare 1.9.6
...
Conflicts:
NEWS
configure.ac
test/dbus-daemon.c
2015-01-01 23:48:13 +00:00
Simon McVittie
abbbf449f1
Prepare release for Monday
2015-01-01 23:42:41 +00:00