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

Bug#1239: etc/cron.daily/find: updatedb doesn't exclude cdrom and others

Lars Wirzenius writes:
> /etc/cron.daily/find in findutils-4.1-2.deb doesn't exclude the /cdrom
> directory.  I think it should, since the CD-ROM that is mounted the next
> day probably isn't the one that was mounted during the night.
> I assume it also doesn't exclude the /floppy, /proc, and /mnt directories,
> but I haven't checked.  (What's /disk?)

/disk is going away, I think - it was part of a scheme involving
symlinks for an experimental 2-partition setup.

> Fix: use a command similar to the following instead:
> 	updatedb --prunepaths="/cdrom /tmp /var/tmp /proc" 2>/dev/null

Can updatedb not be made to be more controllable ?

The `checksecurity' script in the latest cron package uses (to find
all devices and setuid files):

find `mount | grep -vE ' type (proc|iso9660) |^/dev/fd| on /mnt' | cut -d ' ' -f 3` \
     -xdev \( -type f -perm +06000 -o -type b -o -type c \) -ls \
  | sort >$TMP

This avoids problems where people mount things in unexpected places.


Reply to: