]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Call leave_suid() in fatal() to make sure that swap.state files are written as the...
authorwessels <>
Sat, 7 Jul 2007 03:19:57 +0000 (03:19 +0000)
committerwessels <>
Sat, 7 Jul 2007 03:19:57 +0000 (03:19 +0000)
Squid may take on root privs during reconfigure.  If squid.conf
contains a "Bungled" line, fatal() will be called when the process
still has root privs.

src/tools.cc

index f89517cf51009a0d07feeed3ad8b31d9387ac137..22333fbce71f7039f20770fbfbe886c21d528e7d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.275 2007/04/29 17:45:18 hno Exp $
+ * $Id: tools.cc,v 1.276 2007/07/06 21:19:57 wessels Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -466,6 +466,16 @@ fatal(const char *message)
      * - RBC 20060819
      */
 
+    /*
+     * DPW 2007-07-06
+     * Call leave_suid() here to make sure that swap.state files
+     * are written as the effective user, rather than root.  Squid
+     * may take on root privs during reconfigure.  If squid.conf
+     * contains a "Bungled" line, fatal() will be called when the
+     * process still has root privs.
+     */
+    lave_suid();
+
     if (0 == StoreController::store_dirs_rebuilding)
         storeDirWriteCleanLogs(0);