Discussion:
Systemd DBus API doc on wiki
(too old to reply)
Jacob Floyd
2017-11-28 21:57:47 UTC
Permalink
Raw Message
Could someone update this doc:

https://www.freedesktop.org/wiki/Software/systemd/dbus/

The history says it was last updated Feb 2014, so I think it's out of date,
but I don't know enough about what's changed to update it. (If you want to
explain it, I can try to write it up, and then I'll have to figure out how
to get write access to update it)

Here are the issues I see.

1) =============

Fourth paragraph of the introduction:

In contrast to most of the other services of the systemd suite PID 1 does
> not use PolicyKit for controlling access to privileged operations, but
> relies exclusively on the low-level D-Bus policy language. (This is done in
> order to avoid a cyclic dependency between PolicyKit and systemd/PID 1.)
> This means that sensitive operations exposed by PID 1 on the bus are
> generally not available to unprivileged processes directly.


Are there any docs about how to configure systemd access via polkit? I
think this changed with these commits (Aug 2014, Sep 2015)
https://github.com/systemd/systemd/commit/283868e1dcd8ea7475850d9c6e7d4722c473dd50
https://github.com/systemd/systemd/commit/88ced61bf9673407f4b15bf51b1b408fd78c149d

There are probably other commits that my search didn't turn up.

2) =============

First property of Manager:
https://www.freedesktop.org/wiki/Software/systemd/dbus/#properties

*Version* encodes the version string of the running systemd instance. Note
> that the version string is purely informational, it should not be parsed,
> one may not assume the version to be formatted in any particular way. We
> take the liberty to change the versioning scheme at any time and it is not
> part of the API.


And in the gdbus introspect examples:

properties:
> readonly s Version = 'systemd 205';


So, the Version has, as promised, changed format. I just tested in 219
(Centos 7) and 233 (Gentoo), and the dbus Version is only the version
number: "219" or "233" respectively, unlike "systemd 205" in the example.
Is version still considered internal API? Do you still discourage using the
Version string via dbus?

3) =============

I've seen Manager.ListUnitsFiltered and Manager.ListUnitsByName in various
places (Introspection or comments or commits online), but they're not on
the page.

It would be nice to have them there, perhaps mentioning in which the
version they were added to systemd.

4) =============

Is there anything else on that page that should be updated due to changes
in the last (almost) 4 years?

Thanks,
Jacob Floyd
Jacob Floyd
2017-11-29 00:10:41 UTC
Permalink
Raw Message
On Tue, Nov 28, 2017 at 3:57 PM, Jacob Floyd <
cognifloyd+***@gmail.com> wrote:

> 2) =============
>
> First property of Manager: https://www.freedesktop.org/
> wiki/Software/systemd/dbus/#properties
>
> *Version* encodes the version string of the running systemd instance.
>> Note that the version string is purely informational, it should not be
>> parsed, one may not assume the version to be formatted in any particular
>> way. We take the liberty to change the versioning scheme at any time and it
>> is not part of the API.
>
>
> And in the gdbus introspect examples:
>
> properties:
>> readonly s Version = 'systemd 205';
>
>
> So, the Version has, as promised, changed format. I just tested in 219
> (Centos 7) and 233 (Gentoo), and the dbus Version is only the version
> number: "219" or "233" respectively, unlike "systemd 205" in the example.
> Is version still considered internal API? Do you still discourage using
> the Version string via dbus?
>

It looks like the format of the Version property changed in v209 with
https://github.com/systemd/systemd/commit/718db96199eb307751264e4163555662c9a389fa#diff-b3e16bf39e5d7ab233077b9b1dafb095
Loading...