HylaFAX The world's most advanced open source fax server

[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)




Project hosted by iFAX Solutions