Skip to content

rhosydd: Reload apparmor profiles before starting services

rhosydd test fails with:

O: Traceback (most recent call last):
O:   File \"/usr/lib/x86_64-linux-gnu/installed-tests/rhosydd-0/integration.py\", line 57, in setUp
O:     self.vehicle_manager = self._get_vehicle_manager(self.conn)
O:   File \"/usr/lib/x86_64-linux-gnu/installed-tests/rhosydd-0/integration.py\", line 80, in _get_vehicle_manager
O:     return Rhosydd.VehicleManager.new_finish(self._block_on_result())
O: gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.76\" (uid=0 pid=3228 comm=\"/usr/bin/python3 /usr/lib/x86_64-linux-gnu/install\" label=\"unconfined\") interface=\"org.freedesktop.DBus.ObjectManager\" member=\"GetManagedObjects\" error name=\"(unset)\" requested_reply=\"0\" destination=\":1.7\" (uid=109 pid=437 comm=\"/usr/bin/rhosydd \" label=\"/usr/bin/rhosydd (enforce)\") (9)

This is due to apparmor profiles not applied to rhosydd's backends. In this case the backends are started with 'unconfined' labels, which prevents them to exchange with rhosydd. Reloading apparmor profiles before starting backends correctly set the labels.

Fixes: APERTIS-5350

Signed-off-by: Frédéric Danis frederic.danis@collabora.com

Edited by Frederic Danis

Merge request reports

Loading