Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37403564
en ru br
ALT Linux repos
S:1.2.1-alt1
5.0: 1.1.35-alt1.1
4.1: 1.1.35-alt1
4.0: 1.1.31-alt1.1
3.0: 1.1.31-alt1

Group :: Communications
RPM: mgetty

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: mgetty-1.1.30-mktemp.patch
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
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin