Don't cross mount boundaries when cleaning tmp files.
Mounting something in /tmp such as a build jail with nullfs mounts for some directories can result in very surprising results the next day. MFC after: 2 weeks Relnotes: yes
This commit is contained in:
parent
2e779f745b
commit
07509279d3
@ -45,8 +45,8 @@ case "$daily_clean_tmps_enable" in
|
||||
rc=$(for dir in $daily_clean_tmps_dirs
|
||||
do
|
||||
[ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && {
|
||||
find -d . -type f $args -delete $print
|
||||
find -d . ! -name . -type d $dargs -delete $print
|
||||
find -x -d . -type f $args -delete $print
|
||||
find -x -d . ! -name . -type d $dargs -delete $print
|
||||
} | sed "s,^\\., $dir,"
|
||||
done | tee /dev/stderr | wc -l)
|
||||
[ -z "$print" ] && rc=0
|
||||
|
Loading…
x
Reference in New Issue
Block a user