Vodz, last_patch_104
This commit is contained in:
@ -1172,7 +1172,6 @@ static int sendCgi(const char *url,
|
|||||||
*script = '/'; /* is directory, find next '/' */
|
*script = '/'; /* is directory, find next '/' */
|
||||||
}
|
}
|
||||||
addEnv("PATH", "INFO", script); /* set /PATH_INFO or NULL */
|
addEnv("PATH", "INFO", script); /* set /PATH_INFO or NULL */
|
||||||
addEnv("PATH", "", getenv("PATH"));
|
|
||||||
addEnv("REQUEST", "METHOD", request);
|
addEnv("REQUEST", "METHOD", request);
|
||||||
if(urlArgs) {
|
if(urlArgs) {
|
||||||
char *uri = alloca(strlen(purl) + 2 + strlen(urlArgs));
|
char *uri = alloca(strlen(purl) + 2 + strlen(urlArgs));
|
||||||
@ -1996,6 +1995,19 @@ int httpd_main(int argc, char *argv[])
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_FEATURE_HTTPD_CGI
|
||||||
|
{
|
||||||
|
char *p = getenv("PATH");
|
||||||
|
|
||||||
|
if(p)
|
||||||
|
p = bb_xstrdup(p);
|
||||||
|
clearenv();
|
||||||
|
if(p) {
|
||||||
|
setenv("PATH", p, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
|
#ifdef CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
|
||||||
sighup_handler(0);
|
sighup_handler(0);
|
||||||
#else
|
#else
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
/* Path to the unix socket */
|
/* Path to the unix socket */
|
||||||
static char lfile[MAXPATHLEN];
|
static char lfile[MAXPATHLEN];
|
||||||
|
|
||||||
static char *logFilePath = __LOG_FILE;
|
static const char *logFilePath = __LOG_FILE;
|
||||||
|
|
||||||
/* interval between marks in seconds */
|
/* interval between marks in seconds */
|
||||||
static int MarkInterval = 20 * 60;
|
static int MarkInterval = 20 * 60;
|
||||||
@ -588,7 +588,7 @@ extern int syslogd_main(int argc, char **argv)
|
|||||||
doFork = FALSE;
|
doFork = FALSE;
|
||||||
break;
|
break;
|
||||||
case 'O':
|
case 'O':
|
||||||
logFilePath = bb_xstrdup(optarg);
|
logFilePath = optarg;
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_FEATURE_REMOTE_LOG
|
#ifdef CONFIG_FEATURE_REMOTE_LOG
|
||||||
case 'R':
|
case 'R':
|
||||||
@ -623,12 +623,13 @@ extern int syslogd_main(int argc, char **argv)
|
|||||||
/* Store away localhost's name before the fork */
|
/* Store away localhost's name before the fork */
|
||||||
gethostname(LocalHostName, sizeof(LocalHostName));
|
gethostname(LocalHostName, sizeof(LocalHostName));
|
||||||
if ((p = strchr(LocalHostName, '.'))) {
|
if ((p = strchr(LocalHostName, '.'))) {
|
||||||
*p++ = '\0';
|
*p = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
umask(0);
|
umask(0);
|
||||||
|
|
||||||
if ((doFork == TRUE) && (daemon(0, 1) < 0)) {
|
if (doFork == TRUE) {
|
||||||
|
if(daemon(0, 1) < 0)
|
||||||
bb_perror_msg_and_die("daemon");
|
bb_perror_msg_and_die("daemon");
|
||||||
#if defined(__uClinux__)
|
#if defined(__uClinux__)
|
||||||
vfork_daemon_rexec(argc, argv, "-n");
|
vfork_daemon_rexec(argc, argv, "-n");
|
||||||
|
Reference in New Issue
Block a user