some helpers may depend on $HOME being set to something sane, which is
not always the case when Squid is started as root. This patch sets $HOME
to the home of cache_effective_user.
Forward port of 2.5 patch.
/*
- * $Id: cache_cf.cc,v 1.480 2005/09/17 05:50:07 wessels Exp $
+ * $Id: cache_cf.cc,v 1.481 2005/10/02 14:28:47 serassio Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
Config2.effectiveUserID = pwd->pw_uid;
Config2.effectiveGroupID = pwd->pw_gid;
+
+ if (pwd->pw_dir && *pwd->pw_dir)
+ setenv("HOME", pwd->pw_dir, 1);
}
} else {
Config2.effectiveUserID = geteuid();