Suggested 'minor enhancement' to fixfiles ... ?

t l concert at europe.com
Fri May 21 16:49:53 UTC 2004


'fixfiles relabel' cleans out /tmp, including log files from previous
runs of fixfiles.  (I had just run 'fixfiles check' and didn't expect
to lose the log!).

Also, 'fixfiles relabel' does not log changes....

Does it make sense to change the 'relabel()' fn in fixfiles from:
    relabel() {
    echo "Cleaning out /tmp"
    rm -rf /tmp/.??* /tmp/*
    ${SETFILES} ${FC} ${FILESYSTEMS} 2>&1 | tee $LOGFILE
    }
to something like:
    relabel() {
    echo "Cleaning out /tmp (saving previous fixfiles logs)"
    find /tmp -maxdepth 1 -mindepth 1 | grep -v /tmp/fixfiles | xargs rm -rf
    ${SETFILES} -v ${FC} ${FILESYSTEMS} 2>&1 | tee $LOGFILE | grep -v "/usr/sbin/setfiles: relabeling"
    }

This way the changes are logged (but not displayed on the console), and previous
log files are retained.

tom
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm





More information about the fedora-selinux-list mailing list