Finding unlabeled files?

Tom London selinux at comcast.net
Sun May 30 18:11:52 UTC 2004


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




More information about the fedora-selinux-list mailing list