ALT Linux repos
Group :: Communications
RPM: mgetty
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: mgetty-1.1.30-mktemp.patch
Download
Download
diff --git a/mgetty/fax/faxspool.in b/mgetty/fax/faxspool.in
index 2a2ee2c..2be42fc 100644
--- a/mgetty/fax/faxspool.in
+++ b/mgetty/fax/faxspool.in
@@ -708,10 +708,14 @@ do
#
if [ x$file = x- ]
then
+ file=`mktemp /tmp/faxspool.XXXXXX`
+ if test -z $file
+ then
+ $echo "ERROR: can't create work file, giving up" >&2 ; exit 6
+ fi
+ trap "rm $file" 0
$echo "spooling $file (stdin)..."
- trap "rm /tmp/faxsp.$$" 0
- cat - >/tmp/faxsp.$$
- file=/tmp/faxsp.$$
+ cat - >$file
else
$echo "spooling $file..."
fi