Commit graph

3 commits

Author SHA1 Message Date
Thomas Haller
03e015bacd
priv-helper: remove D-Bus Alias for "nm-priv-helper.service"
In systemd, it's common that a D-Bus activatable service references
`SystemdService=dbus-$BUSNAME.service` instead the real service name.
Together with an `[Install].Alias=dbus-$BUSNAME.service` directive,
this allowed to enable/disable D-Bus activation without uninstalling the
service altogether ([1]).

Currently, when we install the RPM then `nm-priv-helper.service` is not
enabled, consequently the alias is not created, and D-Bus activation
does not work. I guess, we should fix that by enabling the service in
the %post section or via a systemd preset? Dunno.

Anyway. It seems that nm-priv-helper.service is more of an
implementation detail of NetworkManager. It makes not sense for the user
to interact directly, or to enable/disable D-Bus activation (because
that is how it works).

So, drop the alias.

See-also: [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Systemd/#activation_dbus
(cherry picked from commit d849807521)
2022-02-09 18:49:48 +01:00
Thomas Haller
b21138f4e9
priv-helper: fix D-Bus patch to not contain forbidden character '-'
"-" is not allowed as D-Bus path and interface name, and discouraged as
bus name. This cause nm-priv-helper to crash, because GDBus asserts the
the object path is valid.

Replace the '-' with '_'. This way, it's consistent with
"nm_dispatcher".

Fixes: d68ab6b8f0 ('nm-sudo: rename to nm-priv-helper')
(cherry picked from commit 16a45d07ed)
2022-02-09 18:49:47 +01:00
Beniamino Galvani
6074ab1e00 nm-sudo: rename to nm-priv-helper
The name "nm-sudo" reminds of the "sudo" tool, and this is a bit
confusing because it's not related. Rename the service to
"nm-priv-helper", which stands for "NM privileged helper".

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/938
(cherry picked from commit d68ab6b8f0)
2022-01-11 22:41:04 +01:00