Correct insecure temporary file usage.

Security:	FreeBSD-SA-05:20.cvsbug
This commit is contained in:
cperciva 2005-09-07 13:39:44 +00:00
parent 7148724693
commit 2c4682fb13

View File

@ -109,14 +109,12 @@ elif [ -f /bin/domainname ]; then
/usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" |
cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
ORIGINATOR="`cat $TEMP`"
rm -f $TEMP
fi
fi
if [ "$ORIGINATOR" = "" ]; then
grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
ORIGINATOR="`cat $TEMP`"
rm -f $TEMP
fi
if [ -n "$ORGANIZATION" ]; then