Bug 23578 - faxspool bug in mgetty-sendfax-1.1.22-1.6.x
faxspool bug in mgetty-sendfax-1.1.22-1.6.x
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: mgetty (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-08 11:15 EST by Thomas J Pinkl
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-08 12:31:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thomas J Pinkl 2001-01-08 11:15:50 EST
The faxspool script produces this error:

    Unknown device: faxg3 -r204x196

This is because of the way "$device" is quoted 
within the 'gs' commands inside the script. 

This patch illustrates one solution to the problem:

--- /usr/bin/faxspool   Thu Sep  7 15:37:09 2000
+++ /home/tom/bin/faxspool.sh   Mon Jan  8 10:50:35 2001
@@ -88,8 +88,9 @@
 # these are the drivers used in Ghostscript - choose dfaxhig/low or faxg3
 #GS_DRIVER_HI="-sDEVICE=dfaxhigh"
 #GS_DRIVER_LO="-sDEVICE=dfaxlow"
-GS_DRIVER_HI="-sDEVICE=faxg3 -r204x196"
-GS_DRIVER_LO="-sDEVICE=faxg3 -r204x98"
+GS_DRIVER="-sDEVICE=faxg3"
+GS_RES_HI="-r204x196"
+GS_RES_LO="-r204x98"
 #
 # program that will generate fax coverpage (see "man coverpg")
@@ -234,11 +235,12 @@
 #
 fs_cvt_ps()
 {
-    driver="$GS_DRIVER_HI"
-    test X$3 = X-n && driver="$GS_DRIVER_LO"
+    driver="$GS_DRIVER"
+    resolution="$GS_RES_HI"
+    test X$3 = X-n && resolution="$GS_RES_LO"
 
     cat "$1" |
-       gs $driver -sOutputFile="$2"%03d -dNOPAUSE -q -dSAFER -
+       gs $driver $resolution -sOutputFile="$2"%03d -dNOPAUSE -q -dSAFER -
 }
        
@@ -251,10 +253,11 @@
 #####
 # via Ghostscript:
 
-    driver="$GS_DRIVER_HI"
-    test X$3 = X-n && driver="$GS_DRIVER_LO"
+    driver="$GS_DRIVER"
+    resolution="$GS_RES_HI"
+    test X$3 = X-n && resolution="$GS_RES_LO"
 
-    gs "$driver" -sOutputFile="$2"%03d -dNOPAUSE \
+    gs "$driver" $resolution -sOutputFile="$2"%03d -dNOPAUSE \
                        -- gslp.ps -fCourier-Bold10 -B "$1"
 
 #####
@@ -290,18 +293,19 @@
 #
 fs_cvt_dvi()
 {
+       driver="$GS_DRIVER"
     if [ X"$3" = X-n ]
     then 
-       driver="$GS_DRIVER_LO" ; dvipscfg="-P dfaxlo"
+       resolution="$GS_RES_LO" ; dvipscfg="-P dfaxlo"
     else
-       driver="$GS_DRIVER_HI" ; dvipscfg="-P dfaxhigh"
+       resolution="$GS_RES_HI" ; dvipscfg="-P dfaxhigh"
     fi
 
 # if you do not have the dfaxlo(w)/dfaxhigh dvips modes configured, 
 # remove "$dvipscfg" from the dvips command line below [or configure
them!]
 
     dvips "$dvipscfg" "$1" -o \
-        !"gs "$driver" -sOutputFile="$2"%03d -dNOPAUSE -dSAFER -q -"
+        !"gs "$driver" $resolution -sOutputFile="$2"%03d -dNOPAUSE -dSAFER
-q -"
 
 # for those that only have the old "dvialw":
 #
@@ -324,12 +328,13 @@
 #
 fs_cvt_pdf()
 {
-    driver="$GS_DRIVER_HI"
-    test X"$3" = X-n && driver="$GS_DRIVER_LO"
+    driver="$GS_DRIVER"
+    resolution="$GS_RES_HI"
+    test X"$3" = X-n && resolution="$GS_RES_LO"
 
     cat "$1" |
        acroread -toPostScript |
-       gs "$driver" -sOutputFile="$2"%03d -dNOPAUSE -q -dSAFER -
+       gs "$driver" $resolution -sOutputFile="$2"%03d -dNOPAUSE -q -dSAFER
-
 }
Comment 1 Need Real Name 2001-01-08 12:31:37 EST
I'm not sure who did the quoting in the RedHat package ("gs $driver"),
but it's the cause of the error, not the upstream source.

The upstream source does NOT quote $driver when passing it to ghostscript,
and that's the way it has to be.

RedHat: we have discussed this in the past.  Please do not introduce
"fixes" that break functionality (and do not improve *anything*).

Also, 1.1.22 is pretty old.  An upgrade to 1.1.23 or 1.1.24 would be 
a reasonable thing to do.  What about issueing an upgrade to the mgetty
package in 7.0 that's still severely broken (concerning logging and
seemingly faxspool as well)?
Comment 2 Nalin Dahyabhai 2001-04-20 11:27:57 EDT
1.1.25 errata packages which fix this will be going out shortly.

Note You need to log in before you can comment on or make changes to this bug.