]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Need to read the config file as root
authorhno <>
Tue, 15 Jan 2002 23:26:41 +0000 (23:26 +0000)
committerhno <>
Tue, 15 Jan 2002 23:26:41 +0000 (23:26 +0000)
src/cache_cf.cc

index c91b9a405ead0a6bf8d49ff63c93cde87e8cd525..b40740e22dd0bbbb04dc434a84c7a6a9f970008a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.398 2002/01/13 01:08:43 robertc Exp $
+ * $Id: cache_cf.cc,v 1.399 2002/01/15 16:26:41 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -239,6 +239,7 @@ parseConfigFile(const char *file_name)
     int err_count = 0;
     configFreeMemory();
     default_all();
+    enter_suid();
     if ((fp = fopen(file_name, "r")) == NULL)
        fatalf("Unable to open configuration file: %s: %s",
            file_name, xstrerror());
@@ -269,6 +270,7 @@ parseConfigFile(const char *file_name)
        safe_free(tmp_line);
     }
     fclose(fp);
+    leave_suid();
     defaults_if_none();
     configDoConfigure();
     cachemgrRegister("config",