You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/06/06 22:50:44 UTC

svn commit: r544947 - /spamassassin/branches/3.2/spamd/spamd.raw

Author: jm
Date: Wed Jun  6 13:50:43 2007
New Revision: 544947

URL: http://svn.apache.org/viewvc?view=rev&rev=544947
Log:
bug 5379: spamd could crash at startup if its preloading temporary directory already exists. fix

Modified:
    spamassassin/branches/3.2/spamd/spamd.raw

Modified: spamassassin/branches/3.2/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.2/spamd/spamd.raw?view=diff&rev=544947&r1=544946&r2=544947
==============================================================================
--- spamassassin/branches/3.2/spamd/spamd.raw (original)
+++ spamassassin/branches/3.2/spamd/spamd.raw Wed Jun  6 13:50:43 2007
@@ -2459,6 +2459,14 @@
 
   dbg("spamd: Preloading modules with HOME=$tmphome");
 
+  # bug 5379: spamd won't start if the temp preloading dir exists;
+  # be sure to remove it just in case 
+  if (-d $tmpsadir) {
+    rmdir( $tmpsadir ) or die "spamd: $tmpsadir not empty: $!";
+  }
+  if (-d $tmphome) {
+    rmdir( $tmphome ) or die "spamd: $tmphome not empty: $!";
+  }
   mkdir( $tmphome,  0700 ) or die "spamd: cannot create $tmphome: $!";
   mkdir( $tmpsadir, 0700 ) or die "spamd: cannot create $tmpsadir: $!";
   $ENV{HOME} = $tmphome;