refresh all package patches in the buildroot using quilt
[openwrt/svn-archive/archive.git] / package / busybox / patches / 440-httpd_chdir.patch
1 Index: busybox-1.4.2/networking/httpd.c
2 ===================================================================
3 --- busybox-1.4.2.orig/networking/httpd.c 2007-06-04 13:21:35.775537960 +0200
4 +++ busybox-1.4.2/networking/httpd.c 2007-06-04 13:21:36.144481872 +0200
5 @@ -102,6 +102,7 @@
6 static const char default_path_httpd_conf[] = "/etc";
7 static const char httpd_conf[] = "httpd.conf";
8 static const char home[] = "./";
9 +static const char *home_httpd = home;
10
11 #define TIMEOUT 60
12
13 @@ -1505,6 +1506,8 @@
14 #if ENABLE_FEATURE_HTTPD_BASIC_AUTH
15 int credentials = -1; /* if not required this is Ok */
16 #endif
17 +
18 + xchdir(home_httpd);
19
20 sa.sa_handler = handle_sigalrm;
21 sigemptyset(&sa.sa_mask);
22 @@ -1942,7 +1945,6 @@
23 int httpd_main(int argc, char *argv[])
24 {
25 unsigned opt;
26 - const char *home_httpd = home;
27 char *url_for_decode;
28 USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;)
29 const char *s_port;