]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1331: chroot_dir and -k reconfigure
authorserassio <>
Sat, 3 Sep 2005 16:32:08 +0000 (16:32 +0000)
committerserassio <>
Sat, 3 Sep 2005 16:32:08 +0000 (16:32 +0000)
Forward port of 2.5 patch.

src/cache_cf.cc

index 8a11eb0f4bee97fb52acf1b15eb8e2de143650a0..de67cf5815e7aa1593c932849a26c320f630d425 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.477 2005/07/09 20:02:49 serassio Exp $
+ * $Id: cache_cf.cc,v 1.478 2005/09/03 10:32:08 serassio Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -3033,7 +3033,7 @@ requirePathnameExists(const char *name, const char *path)
     char pathbuf[BUFSIZ];
     assert(path != NULL);
 
-    if (Config.chroot_dir) {
+    if (Config.chroot_dir && (geteuid() == 0)) {
         snprintf(pathbuf, BUFSIZ, "%s/%s", Config.chroot_dir, path);
         path = pathbuf;
     }