Browse Source

disable find | rm entities until we have a safe way of doing them

OPENBSD_2_0
deraadt 29 years ago
parent
commit
1cb6271946
1 changed files with 27 additions and 23 deletions
  1. +27
    -23
      src/etc/daily

+ 27
- 23
src/etc/daily View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: daily,v 1.4 1996/05/26 10:25:20 deraadt Exp $ # $OpenBSD: daily,v 1.5 1996/06/16 14:39:24 deraadt Exp $
# #
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local
host=`hostname -s` host=`hostname -s`
@ -14,19 +14,21 @@ fi
echo "" echo ""
echo "Removing scratch and junk files:" echo "Removing scratch and junk files:"
if [ -d /tmp -a ! -h /tmp ]; then # XXX NOT REMOVING UNTIL SECURITY BUG IS FIXED"
cd /tmp && { #if [ -d /tmp -a ! -h /tmp ]; then
find . -type f -atime +3 -exec rm -f -- {} \; # cd /tmp && {
find . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \ # find . -type f -atime +3 -exec rm -f -- {} \;
>/dev/null 2>&1; } # find . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \
fi # >/dev/null 2>&1; }
#fi
if [ -d /var/tmp -a ! -h /var/tmp ]; then # XXX NOT REMOVING UNTIL SECURITY BUG IS FIXED
cd /var/tmp && { #if [ -d /var/tmp -a ! -h /var/tmp ]; then
find . ! -name . -atime +7 -exec rm -f -- {} \; # cd /var/tmp && {
find . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \ # find . ! -name . -atime +7 -exec rm -f -- {} \;
>/dev/null 2>&1; } # find . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \
fi # >/dev/null 2>&1; }
#fi
# Additional junk directory cleanup would go like this: # Additional junk directory cleanup would go like this:
#if [ -d /scratch -a ! -h /scratch ]; then #if [ -d /scratch -a ! -h /scratch ]; then
@ -38,18 +40,20 @@ fi
if [ -d /var/rwho -a ! -h /var/rwho ] ; then if [ -d /var/rwho -a ! -h /var/rwho ] ; then
cd /var/rwho && { cd /var/rwho && {
find . ! -name . -mtime +7 -exec rm -f -- {} \; ; } # XXX NOT REMOVING UNTIL SECURITY BUG IS FIXED
# find . ! -name . -mtime +7 -exec rm -f -- {} \; ; }
fi fi
cd /tmp # XXX NOT REMOVING UNTIL SECURITY BUG IS FIXED
TMP=daily.$$ #cd /tmp
find / \( ! -fstype local -o -fstype rdonly -o -fstype fdesc \ #TMP=daily.$$
-o -fstype kernfs -o -fstype procfs \) -a -prune -o \ #find / \( ! -fstype local -o -fstype rdonly -o -fstype fdesc \
-name 'lost+found' -a -prune -o \ # -o -fstype kernfs -o -fstype procfs \) -a -prune -o \
-name '*.core' -a -print -o \ # -name 'lost+found' -a -prune -o \
\( -name '[#,]*' -o -name '.#*' -o -name a.out \ # -name '*.core' -a -print -o \
-o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \ # \( -name '[#,]*' -o -name '.#*' -o -name a.out \
-a -atime +3 -exec rm -f -- {} \; -a -print > $TMP # -o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \
# -a -atime +3 -exec rm -f -- {} \; -a -print > $TMP
echo "" echo ""
echo "Possible core dumps:" echo "Possible core dumps:"


|||||||
|||||||
xxxxxxxxxx
 
000:0
x
 
000:0
Loading…
Cancel
Save