How can I see the history of file labels - who and when set them?
Right now SELinux reports that my /etc/resolv.conf
with content # Generated by NetworkManager
is mislabeled. It is now unlabeled_t
and should be net_conf_t
.
However, I am not sure if it is right or wrong. There might some race condition between some programs trying to set their labels on that file. Looking at history of changes to it may help me to understand what is going on.
resolv.conf
possibly is updated by creating a new temporary file, writing configuration there and then moving the new file to replace oldresolv.conf
, hence label might be incorrect. – sebasth Oct 09 '18 at 10:16inotify
/other tools can be used to monitor when extended attributes are modified (which happens when file gets relabeled). Any modifications done to file context database (usingsemanage
) is not reflected in filesystem before the target file is relabeled. The problem (and answer(s)) is essentially the same as in the other question. – sebasth Oct 09 '18 at 11:51