1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Correctly handle files with IFS characters (spaces) in their names when

cleaning up temporary files.

Submitted by:	Mike Makonnen <mtm@identd.net>
Approved by:	re
This commit is contained in:
Tim J. Robbins 2002-12-09 02:22:50 +00:00
parent 85105890c2
commit deca89c7c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107694

View File

@ -33,7 +33,7 @@ ATJOBDIR="/var/at/jobs"
CRONJOBDIR="/var/cron/tabs"
MAILSPOOL="/var/mail"
SIGKILL="-KILL"
TEMPDIRS="/tmp /var/tmp /var/tmp/vi.recover"
TEMPDIRS="/tmp /var/tmp"
THISCMD=`/usr/bin/basename $0`
# err msg
@ -57,12 +57,8 @@ rm_files() {
continue
fi
echo -n "Removing files owned by ($login) in $_dir:"
filecount=0
_ownedfiles=`find 2>/dev/null $_dir -maxdepth 1 -user $login -print`
for _file in $_ownedfiles ; do
rm -fd $_file
filecount=`expr $filecount + 1`
done
filecount=`find 2>/dev/null "$_dir" -user "$login" -delete -print | \
wc -l | sed 's/ *//'`
echo " $filecount removed."
done
}