]> git.pld-linux.org Git - packages/squid.git/blob - squid-2.5.STABLE12-setenv.patch
e30553713dd1d5723d62db79d2cf8213 squid-2.5.STABLE12-setenv.patch
[packages/squid.git] / squid-2.5.STABLE12-setenv.patch
1 Index: squid/src/cache_cf.c
2 diff -c squid/src/cache_cf.c:1.396.2.31 squid/src/cache_cf.c:1.396.2.32
3 *** squid/src/cache_cf.c:1.396.2.31     Wed Sep 28 15:42:33 2005
4 --- squid/src/cache_cf.c        Wed Oct 26 14:25:42 2005
5 ***************
6 *** 440,447 ****
7                     Config.effectiveUser);
8             Config2.effectiveUserID = pwd->pw_uid;
9             Config2.effectiveGroupID = pwd->pw_gid;
10 !           if (pwd->pw_dir && *pwd->pw_dir)
11 !               setenv("HOME", pwd->pw_dir, 1);
12         }
13       } else {
14         Config2.effectiveUserID = geteuid();
15 --- 440,453 ----
16                     Config.effectiveUser);
17             Config2.effectiveUserID = pwd->pw_uid;
18             Config2.effectiveGroupID = pwd->pw_gid;
19 ! #if HAVE_PUTENV
20 !           if (pwd->pw_dir && *pwd->pw_dir) {
21 !               int len;
22 !               char *env_str = xcalloc((len = strlen(pwd->pw_dir) + 6), 1);
23 !               snprintf(env_str, len, "HOME=%s", pwd->pw_dir);
24 !               putenv(env_str);
25 !           }
26 ! #endif
27         }
28       } else {
29         Config2.effectiveUserID = geteuid();
This page took 0.033137 seconds and 4 git commands to generate.