diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2014-09-09 17:03:58 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2014-09-09 17:03:58 +0000 |
commit | ec56ad408f8f497ee4f4cdd640b5b8c10493cad7 (patch) | |
tree | 0512223c10bdc6fbf23a85ec223313213687b0f1 /etc/periodic/daily | |
parent | b7774f528d7e78c3d2effd31fdfdffacf0089492 (diff) | |
download | FreeBSD-src-ec56ad408f8f497ee4f4cdd640b5b8c10493cad7.zip FreeBSD-src-ec56ad408f8f497ee4f4cdd640b5b8c10493cad7.tar.gz |
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
Diffstat (limited to 'etc/periodic/daily')
-rwxr-xr-x | etc/periodic/daily/110.clean-tmps | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/periodic/daily/110.clean-tmps b/etc/periodic/daily/110.clean-tmps index eef3bc6..67bcec6 100755 --- a/etc/periodic/daily/110.clean-tmps +++ b/etc/periodic/daily/110.clean-tmps @@ -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 |