Closed qby-wenzel closed 2 years ago
Indeed, that is an oversight. I'll check the available options, but the attributes will have to be transferred or created during early boot when create-dirs-from-rpmdb.service is running.
@laenion I added the context function to the tool but did not created a PR yet. Not sure if a best effort approach for setting file contexts is appropriate here. Maybe deleting the directory is better, because SELinux might deny the access anyway (-> wrong context)...
Description: After the installation of new packages (which are covered by the SELinux Policy) in MicroOS, the package specific SELinux FileContext is not synced for all files. Directories or files in the
/var
partition are only created, but they lack of their correct context.If you do these steps manually (
tu shell
), the RPM pluginrpm-plugin-selinux
does its job as expected and will manage/set these contexts in the current mounted snapshot / env. After closing the snapshot and booting into it, the context is lost in the booted system but still present in the snapshot.I guess as there is no default snapper config for the VAR partition, t-u could/should jump in again as in the /etc overlay case? Not sure what's the best solution here.
System Info: freshly installed openSUSE MicroOS, kind of just click next-next-next in the Installer
Reproduce Steps:
transactional-update pkg install nginx
), which is covered by the SELinux System Policy (1, 2) and populates/var/lib
/var/lib/nginx
,/.snapshots/X/snapshot/var/lib/
, FileContext)In addition to that, the contexts of the directory (
/var/lib)
on the ROOT partition are correctly set, but are shadowed by the VAR partition.Full install/check log: snapshot-fc-bug.txt