Open sigulete opened 6 months ago
I think this is an setroubleshoot RHBZ instead. It needs to use systemd-tmpfiles to create /var/lib/setroubleshoot
.
OK, and looking at https://src.fedoraproject.org/rpms/setroubleshoot/blob/1a11b3af0a698e3bcb1e84cbcf9f16253d5029d9/f/setroubleshoot.tmpfiles it does have a tmpfiles entry, and an entry for /var/lib/setroubleshoot
but only to relabel (Z
) and not to create the directory itself (d
). The latter is currently done via rpm: https://src.fedoraproject.org/rpms/setroubleshoot/blob/1a11b3af0a698e3bcb1e84cbcf9f16253d5029d9/f/setroubleshoot.spec#_174.
Describe the bug
Cockpit is not showing selinux events even though they are available via:
journbalctl -t setroubleshoot
After debuging the problem, I noticed that the directory
/var/lib/setroubleshoot
is not created when layeringtroubleshoot-server
package. As such, applications depending on/var/lib/setroubleshoot/setroubleshoot_database.xml
likecockpit-selinux
are blind.Note: The same happens in Silverblue, and SELinux Troubleshoot (UI) doesn't show the events.
Reproduction steps
Prerequisites:
cockpit
andcockpit-selinux
needs to be installed. cockpit needs to be running.rpm-ostree install setroubleshoot-server
podman run --detach --name mariadb --env MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:latest
. This container requirescontainer_manage_cgroup
boolean.journalctl -t setroubleshoot
ORausearch -m AVC
journalctl -u setroubleshootd
It will show errors related to not being able to create/var/lib/setroubleshoot/setroubleshoot_database.xml
Expected behavior
All selinux events shoud be accessible from cockpit and SELinux Troubleshoot (UI) in Silverblue.
Actual behavior
Events not available by third party apps.
System details
Fedora CoreOS - Vultr
Butane or Ignition config
No response
Additional information
The problem can be resolved by manually creating the missing directory: