Browse Source

closing fd 0-2 is indeed bad style and potentially dangerous, as pointed

out by Arne Becker, who also supplied the diff, thanks!
ok schwarze@
agreed by many
OPENBSD_5_1
halex 13 years ago
parent
commit
fa31551ce9
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/etc/daily

+ 3
- 3
src/etc/daily View File

@ -1,5 +1,5 @@
# #
# $OpenBSD: daily,v 1.71 2011/04/23 19:35:53 schwarze Exp $
# $OpenBSD: daily,v 1.72 2011/12/06 21:02:39 halex Exp $
# From: @(#)daily 8.2 (Berkeley) 1/25/94 # From: @(#)daily 8.2 (Berkeley) 1/25/94
# #
# For local additions, create the file /etc/daily.local. # For local additions, create the file /etc/daily.local.
@ -50,7 +50,7 @@ if [ -d /tmp -a ! -L /tmp ]; then
find -x . \ find -x . \
\( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \ \( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \
-o -path ./portslocks \) \ -o -path ./portslocks \) \
-prune -o -type f -atime +3 -execdir rm -f -- {} \; 2>&-
-prune -o -type f -atime +3 -execdir rm -f -- {} \; 2>/dev/null
find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \
! -path ./.ICE-unix ! -path ./portslocks ! -name . \ ! -path ./.ICE-unix ! -path ./portslocks ! -name . \
-execdir rmdir -- {} \; >/dev/null 2>&1; } -execdir rmdir -- {} \; >/dev/null 2>&1; }
@ -61,7 +61,7 @@ if [ -d /var/tmp -a ! -L /var/tmp ]; then
find -x . \ find -x . \
\( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \ \( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \
-o -path ./portslocks \) \ -o -path ./portslocks \) \
-prune -o ! -type d -atime +7 -execdir rm -f -- {} \; 2>&-
-prune -o ! -type d -atime +7 -execdir rm -f -- {} \; 2>/dev/null
find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \ find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \
! -path ./.ICE-unix ! -path ./portslocks ! -name . \ ! -path ./.ICE-unix ! -path ./portslocks ! -name . \
-execdir rmdir -- {} \; >/dev/null 2>&1; } -execdir rmdir -- {} \; >/dev/null 2>&1; }


Loading…
Cancel
Save