Hi Julien,
* Julien BLACHE <[EMAIL PROTECTED]> [2008-09-13 16:07]:
> Anthony Campbell <[EMAIL PROTECTED]> wrote:
> > [xsane] xsane_write_compressed_a85_flatedecode
> > [xsane] finish
> > [xsane] xsane_save_ps_create_document_trailer
> > [xsane] trying to change user id for new subprocess:
> > [xsane] old effective uid = 1000
> > [xsane] new effective uid = 1000
> > [xsane] xsane_front_gtk_add_process_to_list(18318)
> > mkdir: cannot create directory `/tmp/tmp.XZiBopajES': File exists
> > ERROR: can't create work dir '/tmp/tmp.XZiBopajES', giving up
> > [xsane] xsane_sigchld_handler
> > [xsane] deleteing pid 18318 from list
> 
> > Command: faxspool 
> 
> I can confirm that the problem lies in mgetty-fax; the fix for #496403
> broke the script:
> 
> + # mkdir a directory in $TMP (or /tmp), convert input to G3 in there
> + #
> +-spooldir=${TMP:-/tmp}/$new_seq.$$.`date +%S`
> ++spooldir=`mktemp -t -d`
> + 
> + if ( umask 077 ; mkdir $spooldir ) ; then
> +     $echo "spooling to $spooldir (->$new_seq)..."
> 
> mktemp -t -d actually creates the directory, the subsequent mkdir then
> fails.

Thanks for the notice. A patch for an NMU fixing this is 
attached and uploaded. In case of any other breakage please 
ping me as I have no system to test the code with.

Cheers
Nico
-- 
Nico Golde - http://www.ngolde.de - [EMAIL PROTECTED] - GPG: 0x73647CFF
For security reasons, all text in this mail is double-rot13 encrypted.
diff -u mgetty-1.1.36/debian/changelog mgetty-1.1.36/debian/changelog
--- mgetty-1.1.36/debian/changelog
+++ mgetty-1.1.36/debian/changelog
@@ -1,3 +1,11 @@
+mgetty (1.1.36-1.4) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Update debian/patches/78-insecure-tmp-usage to not create the spool
+    directory already created by mktemp (Closes: #498705).
+
+ -- Nico Golde <[EMAIL PROTECTED]>  Sat, 13 Sep 2008 16:33:39 +0200
+
 mgetty (1.1.36-1.3) unstable; urgency=high
 
   * Non-maintainer upload by the Security Team.
diff -u mgetty-1.1.36/debian/patches/78-insecure-tmp-usage mgetty-1.1.36/debian/patches/78-insecure-tmp-usage
--- mgetty-1.1.36/debian/patches/78-insecure-tmp-usage
+++ mgetty-1.1.36/debian/patches/78-insecure-tmp-usage
@@ -6,17 +6,20 @@
 
 @DPATCH@
 diff -urNad mgetty-1.1.36~/fax/faxspool.in mgetty-1.1.36/fax/faxspool.in
---- mgetty-1.1.36~/fax/faxspool.in	2007-01-19 08:38:22.000000000 +0100
-+++ mgetty-1.1.36/fax/faxspool.in	2008-09-05 17:51:44.000000000 +0200
-@@ -653,7 +653,7 @@
+--- mgetty-1.1.36~/fax/faxspool.in	2008-09-13 16:32:53.000000000 +0200
++++ mgetty-1.1.36/fax/faxspool.in	2008-09-13 16:33:11.000000000 +0200
+@@ -653,9 +653,9 @@
  #
  # mkdir a directory in $TMP (or /tmp), convert input to G3 in there
  #
 -spooldir=${TMP:-/tmp}/$new_seq.$$.`date +%S`
 +spooldir=`mktemp -t -d`
  
- if ( umask 077 ; mkdir $spooldir ) ; then
+-if ( umask 077 ; mkdir $spooldir ) ; then
++if [ $? -eq 0 ]; then
      $echo "spooling to $spooldir (->$new_seq)..."
+ else
+     $echo "ERROR: can't create work dir '$spooldir', giving up" >&2 ; exit 6
 @@ -674,10 +674,13 @@
  #
      if [ x$file = x- ]

Attachment: pgp3BXjGLWc5K.pgp
Description: PGP signature

Reply via email to