firewalld: make D-Bus calls against unique name for firewalld service

As we keep track of the current name owner, use its unique name
for the D-Bus requests.

We also track when the name owner changes, so at the point when we make
the D-Bus call, the current name owner was still running. We should talk
to it directly. If at the same time, firewalld restarts, we go through
our usual tracking of the name owner and will retry -- but always
talking to the unique name.
This commit is contained in:
Thomas Haller 2021-08-02 12:58:32 +02:00
parent 9debc3d028
commit 3d949f98e4
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -342,7 +342,7 @@ _handle_dbus_start(NMFirewalldManager *self, NMFirewalldManagerCallId *call_id)
call_id->dbus.cancellable = g_cancellable_new();
g_dbus_connection_call(priv->dbus_connection,
FIREWALL_DBUS_SERVICE,
priv->name_owner,
FIREWALL_DBUS_PATH,
FIREWALL_DBUS_INTERFACE_ZONE,
dbus_method,