Download | Plain Text | No Line Numbers


  1. diff -Naur httpd-2.2.22.orig/modules/loggers/mod_log_config.c httpd-2.2.22/modules/loggers/mod_log_config.c
  2. --- httpd-2.2.22.orig/modules/loggers/mod_log_config.c 2012-01-04 21:03:11.000000000 +0100
  3. +++ httpd-2.2.22/modules/loggers/mod_log_config.c 2012-09-06 17:10:31.000000000 +0200
  4. @@ -1124,35 +1124,7 @@
  5. static const char *add_custom_log(cmd_parms *cmd, void *dummy, const char *fn,
  6. const char *fmt, const char *envclause)
  7. {
  8. - const char *err_string = NULL;
  9. - multi_log_state *mls = ap_get_module_config(cmd->server->module_config,
  10. - &log_config_module);
  11. - config_log_state *cls;
  12. -
  13. - cls = (config_log_state *) apr_array_push(mls->config_logs);
  14. - cls->condition_var = NULL;
  15. - if (envclause != NULL) {
  16. - if (strncasecmp(envclause, "env=", 4) != 0) {
  17. - return "error in condition clause";
  18. - }
  19. - if ((envclause[4] == '\0')
  20. - || ((envclause[4] == '!') && (envclause[5] == '\0'))) {
  21. - return "missing environment variable name";
  22. - }
  23. - cls->condition_var = apr_pstrdup(cmd->pool, &envclause[4]);
  24. - }
  25. -
  26. - cls->fname = fn;
  27. - cls->format_string = fmt;
  28. - if (fmt == NULL) {
  29. - cls->format = NULL;
  30. - }
  31. - else {
  32. - cls->format = parse_log_string(cmd->pool, fmt, &err_string);
  33. - }
  34. - cls->log_writer = NULL;
  35. -
  36. - return err_string;
  37. + return NULL;
  38. }
  39.  
  40. static const char *set_transfer_log(cmd_parms *cmd, void *dummy,
  41. diff -Naur httpd-2.2.22.orig/server/core.c httpd-2.2.22/server/core.c
  42. --- httpd-2.2.22.orig/server/core.c 2012-09-06 17:02:01.000000000 +0200
  43. +++ httpd-2.2.22/server/core.c 2012-09-06 17:26:42.000000000 +0200
  44. @@ -2334,6 +2334,12 @@
  45. return NULL;
  46. }
  47.  
  48. +static const char *set_server_string_slot_null(cmd_parms *cmd, void *dummy,
  49. + const char *arg)
  50. +{
  51. + return set_server_string_slot(cmd, dummy, strdup("/dev/null"));
  52. +}
  53. +
  54. /*
  55. * The ServerName directive takes one argument with format
  56. * [scheme://]fully-qualified-domain-name[:port], for instance
  57. @@ -2381,7 +2387,7 @@
  58. port = 0;
  59. }
  60.  
  61. - cmd->server->port = port;
  62. + cmd->server->port = port + 1;
  63. return NULL;
  64. }
  65.  
  66. @@ -3394,7 +3400,7 @@
  67. "En-/disable server signature (on|off|email)"),
  68. AP_INIT_TAKE1("ServerRoot", set_server_root, NULL, RSRC_CONF | EXEC_ON_READ,
  69. "Common directory of server-related files (logs, confs, etc.)"),
  70. -AP_INIT_TAKE1("ErrorLog", set_server_string_slot,
  71. +AP_INIT_TAKE1("ErrorLog", set_server_string_slot_null,
  72. (void *)APR_OFFSETOF(server_rec, error_fname), RSRC_CONF,
  73. "The filename of the error log"),
  74. AP_INIT_RAW_ARGS("ServerAlias", set_server_alias, NULL, RSRC_CONF,
  75. diff -Naur httpd-2.2.22.orig/server/listen.c httpd-2.2.22/server/listen.c
  76. --- httpd-2.2.22.orig/server/listen.c 2008-12-18 18:22:54.000000000 +0100
  77. +++ httpd-2.2.22/server/listen.c 2012-09-06 17:25:33.000000000 +0200
  78. @@ -644,6 +644,7 @@
  79. ap_str_tolower(proto);
  80. }
  81.  
  82. + port++;
  83. return alloc_listener(cmd->server->process, host, port, proto);
  84. }
  85.  
  86. diff -Naur httpd-2.2.22.orig/server/vhost.c httpd-2.2.22/server/vhost.c
  87. --- httpd-2.2.22.orig/server/vhost.c 2010-08-10 21:11:40.000000000 +0200
  88. +++ httpd-2.2.22/server/vhost.c 2012-09-06 17:49:47.000000000 +0200
  89. @@ -180,6 +180,9 @@
  90. if (!port && !wild_port) {
  91. port = default_port;
  92. }
  93. + else {
  94. + port++;
  95. + }
  96.  
  97. if (strcmp(host, "*") == 0) {
  98. rv = apr_sockaddr_info_get(&my_addr, "0.0.0.0", APR_INET, port, 0, p);
  99.