1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
The systemd System and Service Manager
Go to file
David Herrmann 11f254be0c bus-proxy: make StartServiceByName synchronous
The StartServiceByName() call was provided by dbus-daemon to activate a
service without sending a message. On receiption, dbus-daemon schedules
an activation request (different modes are supported) and sends back the
reply once activation is done.

With kdbus, we marked StartServiceByName() as deprecated. There is no
real reason to start services explicitly. Instead, applications should
just *use* the service and rely on it being activated implicitly.
However, we provide compatibility with dbus-daemon and implement
StartServiceByName() on the proxy via a call to
org.freedesktop.DBus.Peer.Ping() on the destination. This will activate
the peer implicitly as part of the no-op Ping() method call (regardless
whether the peer actually implements that call).

Now, the problem is, StartServiceByName() was synchronous on dbus-daemon
but isn't on bus-proxy. Hence, on return, there is no guarantee that
ListNames includes the activated name. As this is required by some
applications, we need to make this synchronous.

This patch makes the proxy track the Ping() method call and send the
reply of StartServiceByName() only once Ping() returned. We do not look
at possible errors of Ping(), as there is no strict requirement for the
peer to implement org.freedesktop.DBus.Peer. Furthermore, any interesting
error should have already been caught by sd_bus_send() before.

Note:
        This race was triggered by gdbus. The gdbus-proxy implementation
        relies on a name to be available after StartServiceByName()
        returns. This is highly fragile and should be dropped by gdbus.
        Even if the call is synchronous, there is no reason whatsoever to
        assume the service did not exit-on-idle before ListNames()
        returns.
        However, this race is much less likely than the startup race, so
        we try to be compatible to dbus-daemon now.
2015-07-31 13:56:39 +02:00
catalog l10n: Add Belarusian translation 2015-06-15 00:13:43 +03:00
docs docs: add .gitignore 2015-07-06 17:47:38 +02:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb hwdb: Add mouse DPI info for Logitech G402. 2015-07-31 10:34:27 +02:00
m4 remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
man Merge pull request #784 from eworm-de/typo 2015-07-30 13:22:50 +02:00
network network: fix 'LinkLocal' -> 'LinkLocalAddressing' in network files 2015-02-14 15:31:26 +01:00
po po: run make update-po 2015-06-19 12:47:39 +02:00
rules rules: block - add dasd to whitelist 2015-07-05 16:22:30 +02:00
shell-completion zsh-completion: _loginctl/_systemd/_systemd-inhibit improvements 2015-06-22 18:07:32 -04:00
src bus-proxy: make StartServiceByName synchronous 2015-07-31 13:56:39 +02:00
sysctl.d sysctl: add some hints how to override settings 2015-02-26 19:07:38 -05:00
system-preset preset: enable machines.target by default 2014-12-29 17:36:57 +01:00
sysusers.d turn kdbus support into a runtime option 2015-06-17 18:01:49 +02:00
test sysv-generator test: Fix random ordering failure 2015-07-01 07:34:23 +02:00
tmpfiles.d tmpfiles: don't recursively descend into journal directories in /var 2015-07-09 18:46:01 -03:00
tools terminal: drop unfinished code 2015-07-27 20:15:34 +02:00
units terminal: drop unfinished code 2015-07-27 20:15:34 +02:00
xorg push xorg information to the systemd --user instance 2015-01-09 21:39:31 +01:00
.dir-locals.el Keep emacs configuration in one configuration file. 2011-03-08 01:53:46 +01:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore gpt-auto-generator: merge efi-boot-generator 2015-07-29 18:16:48 +02:00
.mailmap prepare NEWS 2014-02-18 02:51:47 +01:00
.travis.yml remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
.vimrc vimrc: disable -fdiagnostics-color output 2013-10-20 04:29:39 +02:00
.ycm_extra_conf.py ycm: update flag blacklist 2014-06-04 15:41:10 -04:00
autogen.sh terminal: drop unfinished code 2015-07-27 20:15:34 +02:00
CODING_STYLE Stop talking about the "XDG" version of basename() 2015-06-17 11:23:46 +01:00
configure.ac build: bump version info 2015-07-29 12:44:55 +02:00
DISTRO_PORTING build-sys: warn if people don't change the default NTP servers when building systemd 2015-07-11 14:24:29 -03:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile-man.am gpt-auto-generator: merge efi-boot-generator 2015-07-29 18:16:48 +02:00
Makefile.am sd-boot: stub - export LoaderDevicePartUUID 2015-07-29 19:36:17 +02:00
NEWS NEWS: update 223 contributors 2015-07-29 15:25:45 +02:00
README Merge pull request #554 from poettering/ntp-pool 2015-07-12 11:43:51 +02:00
README.md README.md: add Coverity scan status badge 2015-06-08 13:26:54 +02:00
TODO TODO 2015-07-28 00:07:32 +02:00

systemd - System and Service Manager

Build Status
Coverity Scan Status

Details

  • General information about systemd can be found in the systemd Wiki
  • Information about build requirements are provided in the README file