Subject: Re: misc/7716: /etc/daily modify
To: None <taca@sky.yamashina.kyoto.jp>
From: HEO SeonMeyong <seirios@Matrix.IRI.Co.Jp>
List: netbsd-bugs
Date: 06/06/1999 19:39:56
	Hi. This is HEO SeonMeyong writing.

> In message <19990606130343R.seirios@Matrix.IRI.Co.Jp>
> 	on Sun, 06 Jun 1999 13:03:43 +0900,
> 	HEO SeonMeyong <seirios@Matrix.IRI.Co.Jp> wrote:
> > > Of course, above awk script part isn't complete but basic idea is here.
> > 
> > 	Is this based on /etc/fstab?
> > 	I think taca's script forget some other filesystems without ffs
> > 	like msdosfs, ext2fs, lfs, ntfs and ados.
> Yes.
> 
> But when using Japanese version Windows, msdos and ntfs contains
> non-ASCII characters, I don't want to check those file systems.

	Normaly, taca's opinion is true. But I think this change is
	"FINDING CORE." So search core routine will check all filesystems.
	But rdonly filesystem is easy to change readwrite.
	Then I insist check rdonly filesystems.

	So I will change daily script following.

----- Start patch -----

--- /etc/daily	Sun Jun  6 12:15:21 1999
+++ daily	Sun Jun  6 19:09:08 1999
@@ -80,10 +80,8 @@
 TMP2=daily2.$$
 
 if checkyesno find_core; then
-	find / \( ! -fstype local -o -fstype rdonly -o -fstype fdesc \
-		-o -fstype kernfs -o -fstype procfs -o -fstype union \
-		-o -fstype null \) \
-		-a -prune -o -name 'lost+found' -a -prune -o \
+	find `awk '($3 ~ /^(ados|ext2fs|ffs|lfs|msdos|ntfs)/) {print $2}' /etc/fstab` \
+		-xdev -name 'lost+found' -a -prune -o \
 		\( -name '*.core' -o -name 'core' \) -a -print > $TMP
 #		\( -name '[#,]*' -o -name '.#*' -o -name a.out \
 #		   -o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \

----- End patch -----

	And next issue is /etc/security.

	This check is report us changed setuid file.
	This is work on UNIX Filesystems.
	So I think this check under ffs, ext2fs, lfs only.

	So I will change daily script following.

----- Start patch -----

--- /etc/security	Sun May 30 20:57:50 1999
+++ security	Sun Jun  6 19:26:12 1999
@@ -452,8 +452,8 @@
 #
 if checkyesno check_devices; then
 	> $ERR
-	(find / \( ! -fstype local -o -fstype fdesc -o -fstype kernfs \
-			-o -fstype procfs \) -a -prune -o \
+	(find `awk '($3 ~ /^(ados|ext2fs|ffs|lfs|msdos|ntfs)/) {print $2}' /etc/fstab` \
+		-xdev -name 'lost+found' -a -prune -o \
 	    \( \( -perm -u+s -a ! -type d \) -o \
 	       \( -perm -g+s -a ! -type d \) -o \
 	       -type b -o -type c \) -print0 | \