diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-09-10 23:35:45 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-09-10 23:35:45 +0000 |
commit | fe538ba5d68391562b23d9d0902b4219b6329cad (patch) | |
tree | d05f7774202a614cf9ac1174f6a8206aeab5b94a | |
parent | 87af49f26b2293ab60d0f13d2a14cad66e02a6ff (diff) | |
download | busybox-w32-fe538ba5d68391562b23d9d0902b4219b6329cad.tar.gz busybox-w32-fe538ba5d68391562b23d9d0902b4219b6329cad.tar.bz2 busybox-w32-fe538ba5d68391562b23d9d0902b4219b6329cad.zip |
Vodz, last_patch_104
-rw-r--r-- | networking/httpd.c | 14 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 9 |
2 files changed, 18 insertions, 5 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 251eee01b..60dbba4d6 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1172,7 +1172,6 @@ static int sendCgi(const char *url, | |||
1172 | *script = '/'; /* is directory, find next '/' */ | 1172 | *script = '/'; /* is directory, find next '/' */ |
1173 | } | 1173 | } |
1174 | addEnv("PATH", "INFO", script); /* set /PATH_INFO or NULL */ | 1174 | addEnv("PATH", "INFO", script); /* set /PATH_INFO or NULL */ |
1175 | addEnv("PATH", "", getenv("PATH")); | ||
1176 | addEnv("REQUEST", "METHOD", request); | 1175 | addEnv("REQUEST", "METHOD", request); |
1177 | if(urlArgs) { | 1176 | if(urlArgs) { |
1178 | char *uri = alloca(strlen(purl) + 2 + strlen(urlArgs)); | 1177 | char *uri = alloca(strlen(purl) + 2 + strlen(urlArgs)); |
@@ -1996,6 +1995,19 @@ int httpd_main(int argc, char *argv[]) | |||
1996 | # endif | 1995 | # endif |
1997 | #endif | 1996 | #endif |
1998 | 1997 | ||
1998 | #ifdef CONFIG_FEATURE_HTTPD_CGI | ||
1999 | { | ||
2000 | char *p = getenv("PATH"); | ||
2001 | |||
2002 | if(p) | ||
2003 | p = bb_xstrdup(p); | ||
2004 | clearenv(); | ||
2005 | if(p) { | ||
2006 | setenv("PATH", p, 0); | ||
2007 | } | ||
2008 | } | ||
2009 | #endif | ||
2010 | |||
1999 | #ifdef CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP | 2011 | #ifdef CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP |
2000 | sighup_handler(0); | 2012 | sighup_handler(0); |
2001 | #else | 2013 | #else |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index ca6aee307..a7712d445 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -56,7 +56,7 @@ | |||
56 | /* Path to the unix socket */ | 56 | /* Path to the unix socket */ |
57 | static char lfile[MAXPATHLEN]; | 57 | static char lfile[MAXPATHLEN]; |
58 | 58 | ||
59 | static char *logFilePath = __LOG_FILE; | 59 | static const char *logFilePath = __LOG_FILE; |
60 | 60 | ||
61 | /* interval between marks in seconds */ | 61 | /* interval between marks in seconds */ |
62 | static int MarkInterval = 20 * 60; | 62 | static int MarkInterval = 20 * 60; |
@@ -588,7 +588,7 @@ extern int syslogd_main(int argc, char **argv) | |||
588 | doFork = FALSE; | 588 | doFork = FALSE; |
589 | break; | 589 | break; |
590 | case 'O': | 590 | case 'O': |
591 | logFilePath = bb_xstrdup(optarg); | 591 | logFilePath = optarg; |
592 | break; | 592 | break; |
593 | #ifdef CONFIG_FEATURE_REMOTE_LOG | 593 | #ifdef CONFIG_FEATURE_REMOTE_LOG |
594 | case 'R': | 594 | case 'R': |
@@ -623,12 +623,13 @@ extern int syslogd_main(int argc, char **argv) | |||
623 | /* Store away localhost's name before the fork */ | 623 | /* Store away localhost's name before the fork */ |
624 | gethostname(LocalHostName, sizeof(LocalHostName)); | 624 | gethostname(LocalHostName, sizeof(LocalHostName)); |
625 | if ((p = strchr(LocalHostName, '.'))) { | 625 | if ((p = strchr(LocalHostName, '.'))) { |
626 | *p++ = '\0'; | 626 | *p = '\0'; |
627 | } | 627 | } |
628 | 628 | ||
629 | umask(0); | 629 | umask(0); |
630 | 630 | ||
631 | if ((doFork == TRUE) && (daemon(0, 1) < 0)) { | 631 | if (doFork == TRUE) { |
632 | if(daemon(0, 1) < 0) | ||
632 | bb_perror_msg_and_die("daemon"); | 633 | bb_perror_msg_and_die("daemon"); |
633 | #if defined(__uClinux__) | 634 | #if defined(__uClinux__) |
634 | vfork_daemon_rexec(argc, argv, "-n"); | 635 | vfork_daemon_rexec(argc, argv, "-n"); |