diff options
| author | erh <erh@NetBSD.org> | 2004-09-28 15:03:58 +0000 |
|---|---|---|
| committer | erh <erh@NetBSD.org> | 2004-09-28 15:03:58 +0000 |
| commit | 7da8bb106d0cacb977abe4e0eb70e98e649d4fdf (patch) | |
| tree | 0e67dbeecef778bbbdb7dfb9db628d9af479af45 | |
| parent | 22e72f089d9182dce745ca9849d53aad483ac0dd (diff) | |
PR misc/7716: add configuration options find_core_ignore_fstypes and
check_devices_ignore_fstypes to allow the filesystem types that are
ignored during the daily and security runs to be adjusted.
| -rw-r--r-- | etc/daily | 10 | ||||
| -rw-r--r-- | etc/defaults/daily.conf | 3 | ||||
| -rw-r--r-- | etc/defaults/security.conf | 4 | ||||
| -rw-r--r-- | etc/security | 11 |
4 files changed, 18 insertions, 10 deletions
diff --git a/etc/daily b/etc/daily index ca9dd2316a4..ecc469e224a 100644 --- a/etc/daily +++ b/etc/daily @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: daily,v 1.61 2004/05/28 03:55:30 martin Exp $ +# $NetBSD: daily,v 1.62 2004/09/28 15:03:58 erh Exp $ # @(#)daily 8.2 (Berkeley) 1/25/94 # @@ -79,9 +79,11 @@ TMP=daily.$$ TMP2=daily2.$$ if checkyesno find_core; then - find / \( ! -fstype local -o -fstype rdonly -o -fstype fdesc \ - -o -fstype null \ - -o -fstype kernfs -o -fstype procfs \) -prune -o \ + # Turn "foo !bar bax" into "-fstype foo -o ! -fstype bar -o -fstype bax" + ignfstypes=`echo $find_core_ignore_fstypes | \ + sed -e's/\(!*\)\([^[:space:]]\{1,\}\)/-o \1 -fstype \2/g' \ + -e's/^-o //'` + find / \( $ignfstypes \) -prune -o \ -name 'lost+found' -prune -o \ \( -name '*.core' -o -name 'core' \) -type f -print > $TMP # \( -name '[#,]*' -o -name '.#*' -o -name a.out \ diff --git a/etc/defaults/daily.conf b/etc/defaults/daily.conf index 4a353069f77..1f2d7d246b0 100644 --- a/etc/defaults/daily.conf +++ b/etc/defaults/daily.conf @@ -1,4 +1,4 @@ -# $NetBSD: daily.conf,v 1.6 2003/12/08 01:14:08 perry Exp $ +# $NetBSD: daily.conf,v 1.7 2004/09/28 15:03:58 erh Exp $ # # /etc/defaults/daily.conf -- # default configuration of /etc/daily.conf @@ -10,6 +10,7 @@ # find_core=YES +find_core_ignore_fstypes="!local rdonly fdesc null kernfs procfs" expire_news=NO purge_accounting=YES run_msgs=YES diff --git a/etc/defaults/security.conf b/etc/defaults/security.conf index 1eabaa4a927..5e05c3db8dd 100644 --- a/etc/defaults/security.conf +++ b/etc/defaults/security.conf @@ -1,4 +1,4 @@ -# $NetBSD: security.conf,v 1.12 2003/11/18 03:21:40 jhawk Exp $ +# $NetBSD: security.conf,v 1.13 2004/09/28 15:03:58 erh Exp $ # # /etc/defaults/security.conf -- # default configuration of /etc/security.conf @@ -31,6 +31,8 @@ pkgdb_dir=/var/db/pkg check_homes_permit_usergroups=NO +check_devices_ignore_fstypes="!local fdesc kernfs null procfs" + check_mtree_follow_symlinks=NO check_passwd_nowarn_shells="/sbin/nologin /usr/libexec/uucp/uucico" diff --git a/etc/security b/etc/security index fff449106f9..94e23acf3df 100644 --- a/etc/security +++ b/etc/security @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: security,v 1.91 2004/07/23 06:12:16 lukem Exp $ +# $NetBSD: security,v 1.92 2004/09/28 15:03:58 erh Exp $ # from: @(#)security 8.1 (Berkeley) 6/9/93 # @@ -599,9 +599,12 @@ fi # if checkyesno check_devices; then > $ERR - (find / \( ! -fstype local -o -fstype fdesc -o -fstype kernfs \ - -o -fstype null \ - -o -fstype procfs \) -a -prune -o \ + ( + # Turn "foo !bar bax" into "-fstype foo -o ! -fstype bar -o -fstype bax" + ignfstypes=`echo $check_devices_ignore_fstypes | \ + sed -e's/\(!*\)\([^[:space:]]\{1,\}\)/-o \1 -fstype \2/g' \ + -e's/^-o //'` + find / \( $ignfstypes \) -a -prune -o \ \( \( -perm -u+s -a ! -type d \) -o \ \( -perm -g+s -a ! -type d \) -o \ -type b -o -type c \) -print0 | \ |
