[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Finding unlabeled files?



I used the following to find files that are not labeled:

find / -context 'null' -print 2>&1 | grep 'No data available'

This prints out error messages of the form:
   getfilecon(/var/spool/cron/mailman): No data available
   getfilecon(/var/spool/at/.SEQ): No data available
   getfilecon(/initrd): No data available
   getfilecon(/initrd/sys): No data available
   getfilecon(/initrd/sbin): No data available
   getfilecon(/initrd/linuxrc): No data available
etc.

Is there a better/proper way of doing this? (If not, perhaps I'll write one...)

The situation comes up when converting a system to SELinux, or if you accidently boot up an SELinux system in 'disabled' mode.

I understand its 'safer' to run 'fixfiles relabel', but some vestigial unlabeled files seem to remain...

Thanks,
  tom


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]