From 2f3df13003d4b78035efa1fb24432529f3b9a149 Mon Sep 17 00:00:00 2001 From: millert <> Date: Wed, 16 Mar 2005 18:29:58 +0000 Subject: [PATCH] Don't rmdir vi.recover or .X11-unix from /tmp or /var/tmp. OK deraadt@ --- src/etc/daily | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/etc/daily b/src/etc/daily index 0b21614b..7ca121e3 100644 --- a/src/etc/daily +++ b/src/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: