diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-03-16 18:29:59 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-03-16 18:29:59 +0000 |
commit | 01a4f40b2d34e6a06876b47812e518170e01de19 (patch) | |
tree | c775754f34073dd7a1e4065349725140bf03da92 /etc/daily | |
parent | c40284970faad146d80a3f205b58547b247b0c63 (diff) |
Don't rmdir vi.recover or .X11-unix from /tmp or /var/tmp. OK deraadt@
Diffstat (limited to 'etc/daily')
-rw-r--r-- | etc/daily | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/daily b/etc/daily index 0b21614bed7..7ca121e3ad4 100644 --- a/etc/daily +++ b/etc/daily @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: daily,v 1.48 2004/12/07 19:08:15 millert Exp $ +# $OpenBSD: daily,v 1.49 2005/03/16 18:29:58 millert Exp $ # From: @(#)daily 8.2 (Berkeley) 1/25/94 # PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin @@ -28,16 +28,16 @@ if [ -d /tmp -a ! -L /tmp ]; then cd /tmp && { find -x . \( -path './ssh-*' -o -path './.X11-unix' \) -prune -o \ -type f -atime +3 -execdir rm -f -- {} \; - find -x . ! -name . -type d -mtime +1 -execdir rmdir -- {} \; \ - >/dev/null 2>&1; } + find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ + ! -name . -execdir rmdir -- {} \; >/dev/null 2>&1; } fi if [ -d /var/tmp -a ! -L /var/tmp ]; then cd /var/tmp && { find -x . \( -path './ssh-*' -o -path './.X11-unix' \) -prune -o \ ! -type d -atime +7 -execdir rm -f -- {} \; - find -x . ! -name . -type d -mtime +1 -execdir rmdir -- {} \; \ - >/dev/null 2>&1; } + find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ + ! -name . -execdir rmdir -- {} \; >/dev/null 2>&1; } fi # Additional junk directory cleanup would go like this: |