File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 5555Build
5656-----
5757
58+ Tools/Demos
59+ -----------
60+
61+ - Tools/faqwiz/move-faqwiz.sh: Fix unsecure use of temporary files.
62+
5863What's New in Python 2.4.5?
5964=============================
6065
Original file line number Diff line number Diff line change 99# blackjesus:~> ./move-faqwiz.sh 2\.1 3\.2
1010# Moving FAQ question 02.001 to 03.002
1111
12- if [ x$2 == x ]; then
12+ if [ x$2 = x ]; then
1313 echo " Need 2 args: original_version final_version."
1414 exit 2
1515fi
@@ -19,7 +19,7 @@ if [ ! -d data -o ! -d data/RCS ]; then
1919 exit 2
2020fi
2121
22- function cut_n_pad() {
22+ cut_n_pad () {
2323 t=` echo $1 | cut -d. -f $2 `
2424 export $3 =` echo $t | awk " { tmp = \\ $0 ; l = length(tmp); for (i = 0; i < $2 -l+1; i++) { tmp = " 0" .tmp } print tmp }" `
2525}
@@ -28,7 +28,13 @@ cut_n_pad $1 1 prefix1
2828cut_n_pad $1 2 suffix1
2929cut_n_pad $2 1 prefix2
3030cut_n_pad $2 2 suffix2
31- tmpfile=tmp$RANDOM .tmp
31+ if which tempfile > /dev/null; then
32+ tmpfile=$( tempfile -d .)
33+ elif [ -n " $RANDOM " ]; then
34+ tmpfile=tmp$RANDOM .tmp
35+ else
36+ tmpfile=tmp$$ .tmp
37+ fi
3238file1=faq$prefix1 .$suffix1 .htp
3339file2=faq$prefix2 .$suffix2 .htp
3440
You can’t perform that action at this time.
0 commit comments