Solved [Solved] Letting security checks skip removable drives

Is there an easy way to make the daily security checks skip any removable media that may be mounted (always somewhere under /mnt) at the time?

I could schedule a forced umount before the security checks are run, but that would be rather ugly and might actually interfere with running jobs. The other option I can think of is to manually go over all the scripts in /etc/periodic/security, see which ones search the entire filesystem and make those skip /mnt by turning
Code:
MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'`
into
Code:
MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ && $3 !~ /^\/mnt/ { print $3 }'`
but I was wondering whether there's a simpler, cleaner or more elegant way.
 
Re: Letting security checks skip removable drives

As it turns out, of all the scripts in /etc/periodic/security only two search the filesystem: 100.chksetuid and 110.neggrpperm. So I just modified those scripts as outlined above.
 
Back
Top