From: | "Alin Nastac (mrness)" <mrness@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-dialup/mgetty/files: mgetty-1.1.36-tmpfile.patch |
Date: | Sun, 07 Sep 2008 09:54:32 |
Message-Id: | E1KcGyT-0002rq-Lg@stork.gentoo.org |
1 | mrness 08/09/07 09:54:29 |
2 | |
3 | Added: mgetty-1.1.36-tmpfile.patch |
4 | Log: |
5 | Fix insecure temporary file usage (#235806). |
6 | (Portage version: 2.1.4.4) |
7 | |
8 | Revision Changes Path |
9 | 1.1 net-dialup/mgetty/files/mgetty-1.1.36-tmpfile.patch |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/mgetty/files/mgetty-1.1.36-tmpfile.patch?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-dialup/mgetty/files/mgetty-1.1.36-tmpfile.patch?rev=1.1&content-type=text/plain |
13 | |
14 | Index: mgetty-1.1.36-tmpfile.patch |
15 | =================================================================== |
16 | diff -Nru mgetty-1.1.36.orig/fax/faxspool.in mgetty-1.1.36/fax/faxspool.in |
17 | --- mgetty-1.1.36.orig/fax/faxspool.in 2008-08-31 13:06:48.000000000 +0000 |
18 | +++ mgetty-1.1.36/fax/faxspool.in 2008-09-07 09:44:01.000000000 +0000 |
19 | @@ -675,9 +675,7 @@ |
20 | if [ x$file = x- ] |
21 | then |
22 | $echo "spooling $file (stdin)..." |
23 | - trap "rm /tmp/faxsp.$$" 0 |
24 | - cat - >/tmp/faxsp.$$ |
25 | - file=/tmp/faxsp.$$ |
26 | + file=$spooldir/faxsp |
27 | else |
28 | $echo "spooling $file..." |
29 | fi |
30 | @@ -924,7 +922,7 @@ |
31 | then |
32 | $echo "\nnothing to do (no cover page, no data)." >&2 |
33 | cd $FAX_SPOOL_OUT |
34 | - rmdir $spooldir |
35 | + rm -rf $spooldir |
36 | exit 52 |
37 | fi |
38 | |
39 | @@ -965,7 +963,7 @@ |
40 | # clean up |
41 | rm $job.q |
42 | cd .. |
43 | -rmdir $spooldir |
44 | +rm -rf $spooldir |
45 | |
46 | if [ -z "`find $LAST_RUN -ctime -1 -print 2>/dev/null`" ] |
47 | then |