The $TEMP variable holds the name of the file to edit.

It cannot be freely used in other places of the script.
The code that handles & in the gecos field was using
$TEMP with problematic consequences...
This commit is contained in:
kim 1999-03-22 03:12:29 +00:00
parent 3320901baa
commit 7799105c49

View File

@ -109,9 +109,9 @@ else
ORIGINATOR=`$PASSWD | sed -e /"^${LOGNAME}:"/'{s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*$/\1/' -e q -e } -e d`
case "$ORIGINATOR" in
*'&'*)
TEMP=`echo $LOGNAME | tr '[a-z]' '[A-Z]'`
TEMP=`echo $TEMP $LOGNAME | sed 's/^\(.\)[^ ]* ./\1/'`
ORIGINATOR=`echo "$ORIGINATOR" | sed "s/&/$TEMP/"`
AMP=`echo $LOGNAME | tr '[a-z]' '[A-Z]'`
AMP=`echo $AMP $LOGNAME | sed 's/^\(.\)[^ ]* ./\1/'`
ORIGINATOR=`echo "$ORIGINATOR" | sed "s/&/$AMP/"`
;;
esac
fi