Commit graph

3202 commits

Author SHA1 Message Date
Simon McVittie
fccb5a0fe1 Explicitly don't search XDG_DATA_DIRS for system services, and document it
In practice, it never works, because the activation helper doesn't
respect environment variables for security reasons.
If you want to vary the search path, alter system.conf instead, to
replace or augment <standard_system_servicedirs/> with your preferred
search path.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=21620
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-08 16:11:35 +00:00
Simon McVittie
6b01c6cdfd spec: document how to install session .service files
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35306
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-08 15:46:37 +00:00
Simon McVittie
ae3faad91d spec: document the search path for session services
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35306
2012-02-08 15:30:06 +00:00
Lennart Poettering
5a548fbf64 systemd: drop machine UUID generation for unit file
To optimize startup a bit, drop machine UUID generation from the unit
file. Since a while D-Bus was already capable of making use of the
/etc/machine-id file, which is guaranteed to exist on systemd systems
(since the first released versions already), hence there's no need to
ever generate a D-Bus specific machine ID.

In times where userspace takes < 800ms to boot up getting rid of this
process optimizes boot time further.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45520
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-07 16:40:36 +00:00
Simon McVittie
3d29eaaf89 NEWS 2012-02-07 16:09:21 +00:00
Simon McVittie
3872970597 Check for a new enough systemd that sd_uid_get_seats (., ., NULL) is valid
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39609
2012-02-07 16:07:04 +00:00
Lennart Poettering
ba71873c72 at_console: ask systemd whether a user is at the console
systemd manages seats and users. This patch optionally asks systemd
whether a user is at the console. It used libsystemd-login for that, a
low-level library that allows querying this kind of information without
expensive round trips.

In order to be nice to the Debian folks this patch falls back to
traditional modes of operation if systemd is not found to be around.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39609
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-02-07 16:06:33 +00:00
Simon McVittie
7eca1ce532 NEWS 2012-02-07 15:21:45 +00:00
Simon McVittie
88498b706a Merge branch 'socket-set-33337'
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
2012-02-07 15:04:25 +00:00
Simon McVittie
b816cb6e90 NEWS 2012-01-23 12:03:20 +00:00
Simon McVittie
5a9149a334 talk about stable branches a bit more 2012-01-23 12:01:56 +00:00
Simon McVittie
b080ba1eab Merge branch 'dbus-1.4' rejecting commit 4ebb275ab7
Conflicts:
	configure.ac
2012-01-23 11:14:45 +00:00
Simon McVittie
4ebb275ab7 Don't warn about deprecated declarations in this stable branch
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44413
2012-01-23 11:13:42 +00:00
Simon McVittie
11b31b864f Port to glib 2.31.x g_thread API
g_thread_init() is deprecated since glib 2.24, call g_type_init() instead.
Bump glib requirement accordingly.

g_thread_create is deprecated since 2.31, use g_thread_new() instead. When
building with a glib earlier than 2.31, provide a backwards compatibility shim.

[Added a comment about why we're using g_type_init() in a test that
doesn't otherwise use GObject -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44413
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-01-23 11:11:24 +00:00
Simon McVittie
6175893100 Merge branch 'dbus-1.4', rejecting commit 08dd53c14b 2012-01-23 10:33:35 +00:00
Simon McVittie
08dd53c14b Revert addition of files which were only meant to exist on master, too
This completes the reversion started in 5df8c3db12.
2012-01-23 10:27:32 +00:00
Simon McVittie
5480536c0b update NEWS 2012-01-23 10:20:54 +00:00
Simon McVittie
26b57efe43 dbus-daemon: fix forgotten counter increase while copying configured auth mechanisms
Previously, only one auth mechanism was used.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45106
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-01-23 10:20:48 +00:00
Simon McVittie
09207d4d4a Revert "windows fix: use install root as base path for relative pathes in dbus service file"
This reverts commit 10fae23527 and
reopens <https://bugs.freedesktop.org/show_bug.cgi?id=44030>.
2012-01-04 20:04:59 +00:00
Simon McVittie
0a314ddbf8 Revert "keep cmake in sync with automake related to default bus addresses"
This reverts commit fdab4af0f4.
Further discussion required.

Related to https://bugs.freedesktop.org/show_bug.cgi?id=38201
2012-01-04 19:14:14 +00:00
Simon McVittie
f56a55af1a Revert "made session service dirs customizable: cmake part"
This reverts commit 89e453216c.
It makes the tests fail under autotools.
2012-01-04 18:20:15 +00:00
Simon McVittie
4f404b5603 Revert "made session service dirs customizable: autotools part"
This reverts commit 61760cf7de.
2012-01-04 18:19:58 +00:00
Simon McVittie
68ecce599a Merge branch 'dbus-1.4' 2012-01-04 18:15:39 +00:00
Simon McVittie
01f6419ecc Merge commit '5df8c3db12590edd68e968975a335da9d0415e5a' into new-master
Reject its changes so that git merge-tracking will not want to revert the
changes that were unsuitable for 1.4.
2012-01-04 18:14:37 +00:00
Simon McVittie
99bd4a517a NEWS so far 2012-01-04 17:52:14 +00:00
eXeC001er
f50ea3140e Remove some dead code related to fd.o #37258
This would now just attempt to close fd -1, which is useless.

[commit message added by smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37258
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-01-04 17:52:11 +00:00
Simon McVittie
5df8c3db12 Revert all changes since a36d4918a6
Someone seems to have merged part of master into 1.4. Again. Let's go
back to the "last known good" point (the branch-point of some 1.4
branches I had locally), then we can cherry-pick the changes that
should have gone in.
2012-01-04 17:44:23 +00:00
Ralf Habacker
b8ce351806 Merge branch 'dbus-1.4'
Conflicts:
	dbus/dbus-spawn-win.c
2011-12-25 14:34:59 +01:00
Ralf Habacker
5ec835dac9 1.4 branch need a fix to be compilable with msvc 2011-12-25 14:31:05 +01:00
Ralf Habacker
e15ebf32a9 keep cmake in sync with automake related to default bus addresses
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38201
2011-12-22 12:51:27 +01:00
Ralf Habacker
16e6236b83 windows fix: use install root as base path for relative pathes in dbus service file
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44030
2011-12-22 12:51:21 +01:00
Ralf Habacker
fdab4af0f4 keep cmake in sync with automake related to default bus addresses
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38201
2011-12-22 12:42:52 +01:00
Ralf Habacker
10fae23527 windows fix: use install root as base path for relative pathes in dbus service file 2011-12-21 21:34:36 +01:00
Ralf Habacker
66a4f22841 Merge branch 'dbus-1.4' 2011-12-21 20:42:21 +01:00
Ralf Habacker
ef8d0d75d5 Merge branch 'dbus-1.4' of ssh://git.freedesktop.org/git/dbus/dbus into dbus-1.4 2011-12-21 20:40:22 +01:00
Siraj Razick
25d6d2d429 Adds a configure time key --with-dbus-session-bus-default-address
With this key we can specifiy the default session bus address
at compile time with autotool builds made with mingw32.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=43639
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2011-12-21 20:28:00 +01:00
Ralf Habacker
59a378fce2 Merge branch 'dbus-1.4' of ssh://git.freedesktop.org/git/dbus/dbus into dbus-1.4 2011-12-21 20:22:53 +01:00
Ralf Habacker
c4e5c2ec7a added notes about supported compilers 2011-12-21 08:50:08 +01:00
Ralf Habacker
61760cf7de made session service dirs customizable: autotools part 2011-11-21 12:21:10 +01:00
Ralf Habacker
89e453216c made session service dirs customizable: cmake part 2011-11-21 12:21:01 +01:00
Simon McVittie
3f4ed9def3 _dbus_loop_new: don't crash on OOM allocating socket set
Also don't leak the socket set if allocating watches failed, or
vice versa. Based on review feedback from wjt.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
2011-11-02 15:50:45 +00:00
Simon McVittie
a2c623b881 Merge branch 'dbus-1.4' 2011-11-02 15:31:09 +00:00
Simon McVittie
a36d4918a6 corrupt test: compile successfully against older GLib (Debian stable)
We don't really need g_socket_send_with_blocking here.

Also, don't leak the GLib socket objects.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41219
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2011-11-02 15:20:51 +00:00
Simon McVittie
c587e56b8a Set DBUS_TEST_HOMEDIR when running installcheck
This avoids spamming ~/.dbus and ~/.dbus-keyrings with filesystem activity
while running the tests.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41218
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2011-11-02 15:19:54 +00:00
Simon McVittie
ec350d8d06 _dbus_listen_tcp_socket: avoid leaking listen_fd in unlikely circumstances
If getaddrinfo (with port == 0) succeeds, the kernel gives us a port when
we first listen on a socket, we jump back to redo_lookup_with_port,
and getaddrinfo (with the nonzero port) fails, we leak listen_fd and all
the fds in it.

From the department of "without static analysis we'd never have spotted
this", or possibly "backward goto considered harmful".

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881
Bug-NB: NB#180486 CID-2389
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-11-02 15:19:30 +00:00
Ralf Habacker
7aed4eb923 refactored cmake version extracting from configure.ac 2011-10-29 00:25:18 +02:00
Ralf Habacker
2214ad00c3 Merge branch 'dbus-1.4' 2011-10-28 21:41:55 +02:00
Ralf Habacker
93e9941de6 Optimized error handling of previous patch 2011-10-28 21:22:53 +02:00
Jesper Dam
d52b86d3e7 Find dbus-daemon executable next to dbus shared libaray on windows.
If the dbus shared library and the daemon executable are both in a dir
that is not part of the default search path and dbus-1.dll is dynamically
loaded with LoadLibrary(), it will fail to locate and launch the daemon
without this patch.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41558
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2011-10-28 21:01:02 +02:00
Ralf Habacker
797b511deb Install empty session.d config directory using cmake, otherwise dbus-daemon will not start
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319
2011-10-17 15:45:49 +02:00