]> git.pld-linux.org Git - packages/apache.git/blob - apache-bug-40970.patch
d3bf5238ff189d6d55d4ecb9ac58ad1c06cedbaf
[packages/apache.git] / apache-bug-40970.patch
1 Index: server/core.c
2 ===================================================================
3 --- server/core.c       (wersja 984170)
4 +++ server/core.c       (wersja 984171)
5 @@ -1183,13 +1183,19 @@
6          return err;
7      }
8  
9 +    /* When ap_document_root_check is false; skip all the stuff below */
10 +    if (!ap_document_root_check) {
11 +       conf->ap_document_root = arg;
12 +       return NULL;
13 +    }
14 +
15      /* Make it absolute, relative to ServerRoot */
16      arg = ap_server_root_relative(cmd->pool, arg);
17      if (arg == NULL) {
18          return "DocumentRoot must be a directory";
19      }
20  
21 -    /* TODO: ap_configtestonly && ap_docrootcheck && */
22 +    /* TODO: ap_configtestonly */
23      if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg,
24                             APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS
25          || !ap_is_directory(cmd->pool, arg)) {
26 Index: server/main.c
27 ===================================================================
28 --- server/main.c       (wersja 984170)
29 +++ server/main.c       (wersja 984171)
30 @@ -361,7 +361,7 @@
31  #endif /* AP_MPM_WANT_SET_GRACEFUL_SHUTDOWN */
32  #endif
33      ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
34 -                 "       %s [-v] [-V] [-h] [-l] [-L] [-t] [-S]", pad);
35 +                 "       %s [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S]", pad);
36      ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
37                   "Options:");
38  
39 @@ -440,10 +440,15 @@
40                   "  -M                 : a synonym for -t -D DUMP_MODULES");
41      ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
42                   "  -t                 : run syntax check for config files");
43 +    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
44 +                "  -T                 : start without DocumentRoot(s) check");
45  
46      destroy_and_exit_process(process, 1);
47  }
48  
49 +/* Set ap_document_root_check to default value: true */
50 +AP_DECLARE_DATA int ap_document_root_check = 1;
51 +
52  int main(int argc, const char * const argv[])
53  {
54      char c;
55 @@ -592,6 +597,10 @@
56              configtestonly = 1;
57              break;
58  
59 +       case 'T':
60 +           ap_document_root_check = 0;
61 +           break;
62 +
63          case 'S':
64              configtestonly = 1;
65              new = (char **)apr_array_push(ap_server_config_defines);
66 Index: include/http_main.h
67 ===================================================================
68 --- include/http_main.h (wersja 984170)
69 +++ include/http_main.h (wersja 984171)
70 @@ -32,7 +32,7 @@
71   * in apr_getopt() format.  Use this for default'ing args that the MPM
72   * can safely ignore and pass on from its rewrite_args() handler.
73   */
74 -#define AP_SERVER_BASEARGS "C:c:D:d:E:e:f:vVlLtSMh?X"
75 +#define AP_SERVER_BASEARGS "C:c:D:d:E:e:f:vVlLtTSMh?X"
76  
77  #ifdef __cplusplus
78  extern "C" {
79 @@ -53,6 +53,8 @@
80  /** An array of all -D defines on the command line.  This allows people to
81   *  effect the server based on command line options */
82  AP_DECLARE_DATA extern apr_array_header_t *ap_server_config_defines;
83 +/** Available integer for using the -T switch */
84 +AP_DECLARE_DATA extern int ap_document_root_check;
85  
86  /**
87   * An optional function to send signal to server on presence of '-k'
This page took 0.021324 seconds and 2 git commands to generate.