Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

TMPDIR set too late in security patch



In the security patch identified:

# security.patch
# Carsten Hoeger 23 Sep 98

This doesn't work as intended:

-JUNK=/tmp/faxjunk$$            # temp file used multiple times
-AWKTMP=/tmp/faxawk$$           # temp file for awk program
+JUNK=$TMPDIR/faxjunk$$         # temp file used multiple times
+AWKTMP=$TMPDIR/faxawk$$                # temp file for awk program
+
+# security
+TMPDIR=/tmp/.faxcron.sh$$
+rm -rf $TMPDIR
+mkdir $TMPDIR || exit 1

because $TMPDIR is bound at the time that JUNK and AWKTMP are set, 
not when they are referenced.


-- 
David Woolley - Office: David Woolley <djw@bts.co.uk>
BTS             Home: <david@djwhome.demon.co.uk>
Wallington      TQ 2887 6421
England         51  21' 44" N,  00  09' 01" W (WGS 84)



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services