]> git.pld-linux.org Git - packages/squid.git/blob - squid-2.5.STABLE10-chroot-2.patch
This commit was manufactured by cvs2git to create branch 'RA-branch'.
[packages/squid.git] / squid-2.5.STABLE10-chroot-2.patch
1 Index: squid/src/cache_cf.c
2 diff -c squid/src/cache_cf.c:1.396.2.26 squid/src/cache_cf.c:1.396.2.27
3 *** squid/src/cache_cf.c:1.396.2.26     Fri May  6 16:33:53 2005
4 --- squid/src/cache_cf.c        Mon Jun 13 16:26:21 2005
5 ***************
6 *** 299,306 ****
7       }
8       fclose(fp);
9       defaults_if_none();
10       if (opt_send_signal == -1) {
11 -       configDoConfigure();
12         cachemgrRegister("config",
13             "Current Squid Configuration",
14             dump_config,
15 --- 299,306 ----
16       }
17       fclose(fp);
18       defaults_if_none();
19 +     configDoConfigure();
20       if (opt_send_signal == -1) {
21         cachemgrRegister("config",
22             "Current Squid Configuration",
23             dump_config,
24 ***************
25 *** 2567,2574 ****
26         snprintf(pathbuf, BUFSIZ, "%s/%s", Config.chroot_dir, path);
27         path = pathbuf;
28       }
29 !     if (stat(path, &sb) < 0)
30 !       fatalf("%s %s: %s", name, path, xstrerror());
31   }
32   
33   char *
34 --- 2567,2578 ----
35         snprintf(pathbuf, BUFSIZ, "%s/%s", Config.chroot_dir, path);
36         path = pathbuf;
37       }
38 !     if (stat(path, &sb) < 0) {
39 !       if (opt_send_signal == -1 || opt_send_signal == SIGHUP)
40 !           fatalf("%s %s: %s", name, path, xstrerror());
41 !       else
42 !           fprintf(stderr, "WARNING: %s %s: %s\n", name, path, xstrerror());
43 !     }
44   }
45   
46   char *
47 Index: squid/src/globals.h
48 diff -c squid/src/globals.h:1.108.2.6 squid/src/globals.h:1.108.2.7
49 *** squid/src/globals.h:1.108.2.6       Wed Apr 20 15:52:26 2005
50 --- squid/src/globals.h Mon Jun 13 16:26:21 2005
51 ***************
52 *** 166,170 ****
53 --- 166,171 ----
54   extern void *sbrk_start;      /* 0 */
55   #endif
56   extern int opt_send_signal;   /* -1 */
57 + extern int opt_no_daemon;     /* 0 */
58   
59   #endif /* SQUID_GLOBALS_H */
60 Index: squid/src/main.c
61 diff -c squid/src/main.c:1.345.2.25 squid/src/main.c:1.345.2.27
62 *** squid/src/main.c:1.345.2.25 Wed Apr 20 15:52:26 2005
63 --- squid/src/main.c    Mon Jun 27 15:24:28 2005
64 ***************
65 *** 38,44 ****
66   /* for error reporting from xmalloc and friends */
67   extern void (*failure_notify) (const char *);
68   
69 - static int opt_no_daemon = 0;
70   static int opt_parse_cfg_only = 0;
71   static char *opt_syslog_facility = NULL;
72   static int httpPortNumOverride = 1;
73 --- 38,43 ----
74 ***************
75 *** 684,691 ****
76       /* send signal to running copy and exit */
77       if (opt_send_signal != -1) {
78         /* chroot if configured to run inside chroot */
79 !       if (Config.chroot_dir && chroot(Config.chroot_dir)) {
80 !           fatal("failed to chroot");
81         }
82         sendSignal();
83         /* NOTREACHED */
84 --- 683,694 ----
85       /* send signal to running copy and exit */
86       if (opt_send_signal != -1) {
87         /* chroot if configured to run inside chroot */
88 !       if (Config.chroot_dir) {
89 !           if (chroot(Config.chroot_dir))
90 !               fatal("failed to chroot");
91 !           no_suid();
92 !       } else {
93 !           leave_suid();
94         }
95         sendSignal();
96         /* NOTREACHED */
97 Index: squid/src/tools.c
98 diff -c squid/src/tools.c:1.213.2.15 squid/src/tools.c:1.213.2.16
99 *** squid/src/tools.c:1.213.2.15        Fri Apr 22 14:45:12 2005
100 --- squid/src/tools.c   Mon Jun 13 16:26:22 2005
101 ***************
102 *** 491,497 ****
103         if (strchr(host, '.'))
104             return host;
105       }
106 !     fatal("Could not determine fully qualified hostname.  Please set 'visible_hostname'\n");
107       return NULL;              /* keep compiler happy */
108   }
109   
110 --- 491,500 ----
111         if (strchr(host, '.'))
112             return host;
113       }
114 !     if (opt_send_signal == -1)
115 !       fatal("Could not determine fully qualified hostname.  Please set 'visible_hostname'\n");
116 !     else
117 !       return ("localhost");
118       return NULL;              /* keep compiler happy */
119   }
120   
This page took 0.050242 seconds and 3 git commands to generate.