httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r645594 [27/28] - in /httpd/sandbox/amsterdam/d: ./ build/ docs/conf/ docs/conf/extra/ docs/man/ docs/manual/ docs/manual/developer/ docs/manual/faq/ docs/manual/howto/ docs/manual/misc/ docs/manual/mod/ docs/manual/platform/ docs/manual/pr...
Date Mon, 07 Apr 2008 16:31:24 GMT
Modified: httpd/sandbox/amsterdam/d/server/core.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/core.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/core.c (original)
+++ httpd/sandbox/amsterdam/d/server/core.c Mon Apr  7 09:28:58 2008
@@ -27,7 +27,6 @@
 #define APR_WANT_MEMFUNC
 #include "apr_want.h"
 
-#define CORE_PRIVATE
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
@@ -229,6 +228,7 @@
     conf->d_is_fnmatch = new->d_is_fnmatch;
     conf->d_components = new->d_components;
     conf->r = new->r;
+    conf->condition = new->condition;
 
     if (new->opts & OPT_UNSET) {
         /* there was no explicit setting of new->opts, so we merge
@@ -1080,8 +1080,7 @@
     void *sconf = cmd->server->module_config;
     core_server_config *conf = ap_get_module_config(sconf, &core_module);
 
-    const char *err = ap_check_cmd_context(cmd,
-                                           NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     if (err != NULL) {
         return err;
     }
@@ -1114,8 +1113,7 @@
     void *sconf = cmd->server->module_config;
     core_server_config *conf = ap_get_module_config(sconf, &core_module);
 
-    const char *err = ap_check_cmd_context(cmd,
-                                           NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     if (err != NULL) {
         return err;
     }
@@ -1130,11 +1128,6 @@
 {
     core_dir_config *d = d_;
 
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-    if (err != NULL) {
-        return err;
-    }
-
     if (!strcasecmp(arg, "Off")) {
        d->add_default_charset = ADD_DEFAULT_CHARSET_OFF;
     }
@@ -1156,8 +1149,7 @@
     void *sconf = cmd->server->module_config;
     core_server_config *conf = ap_get_module_config(sconf, &core_module);
 
-    const char *err = ap_check_cmd_context(cmd,
-                                           NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     if (err != NULL) {
         return err;
     }
@@ -1213,11 +1205,6 @@
     int error_number, index_number, idx500;
     enum { MSG, LOCAL_PATH, REMOTE_PATH } what = MSG;
 
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-    if (err != NULL) {
-        return err;
-    }
-
     /* 1st parameter should be a 3 digit number, which we recognize;
      * convert it into an array index
      */
@@ -1342,11 +1329,6 @@
     char *w;
     char *k, *v;
 
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-    if (err != NULL) {
-        return err;
-    }
-
     /* Throw a warning if we're in <Location> or <Files> */
     if (ap_check_cmd_context(cmd, NOT_IN_LOCATION | NOT_IN_FILES)) {
         ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
@@ -1611,11 +1593,6 @@
                                    const char *arg)
 {
     core_dir_config *d = d_;
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-
-    if (err != NULL) {
-        return err;
-    }
 
     if (strcasecmp(arg, "on") == 0) {
         d->enable_mmap = ENABLE_MMAP_ON;
@@ -1634,11 +1611,6 @@
                                    const char *arg)
 {
     core_dir_config *d = d_;
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-
-    if (err != NULL) {
-        return err;
-    }
 
     if (strcasecmp(arg, "on") == 0) {
         d->enable_sendfile = ENABLE_SENDFILE_ON;
@@ -1752,8 +1724,7 @@
     ap_regex_t *r = NULL;
     const command_rec *thiscmd = cmd->cmd;
 
-    const char *err = ap_check_cmd_context(cmd,
-                                           NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     if (err != NULL) {
         return err;
     }
@@ -1856,8 +1827,7 @@
     ap_regex_t *r = NULL;
     const command_rec *thiscmd = cmd->cmd;
     ap_conf_vector_t *new_url_conf = ap_create_per_dir_config(cmd->pool);
-    const char *err = ap_check_cmd_context(cmd,
-                                           NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     if (err != NULL) {
         return err;
     }
@@ -1925,7 +1895,7 @@
     const command_rec *thiscmd = cmd->cmd;
     core_dir_config *c = mconfig;
     ap_conf_vector_t *new_file_conf = ap_create_per_dir_config(cmd->pool);
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT|NOT_IN_LOCATION);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_LOCATION);
 
     if (err != NULL) {
         return err;
@@ -1995,6 +1965,69 @@
 
     return NULL;
 }
+static const char *ifsection(cmd_parms *cmd, void *mconfig, const char *arg)
+{
+    const char *errmsg;
+    const char *endp = ap_strrchr_c(arg, '>');
+    int old_overrides = cmd->override;
+    char *old_path = cmd->path;
+    core_dir_config *conf;
+    const command_rec *thiscmd = cmd->cmd;
+    core_dir_config *c = mconfig;
+    ap_conf_vector_t *new_file_conf = ap_create_per_dir_config(cmd->pool);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_LOCATION);
+    const char *condition;
+    int expr_err = 0;
+
+    if (err != NULL) {
+        return err;
+    }
+
+    if (endp == NULL) {
+        return unclosed_directive(cmd);
+    }
+
+    arg = apr_pstrndup(cmd->pool, arg, endp - arg);
+
+    if (!arg[0]) {
+        return missing_container_arg(cmd);
+    }
+
+    condition = ap_getword_conf(cmd->pool, &arg);
+    /* Only if not an .htaccess file */
+    if (!old_path) {
+        cmd->override = OR_ALL|ACCESS_CONF;
+    }
+
+    /* initialize our config and fetch it */
+    conf = ap_set_config_vectors(cmd->server, new_file_conf, cmd->path,
+                                 &core_module, cmd->pool);
+
+    conf->condition = ap_expr_parse(cmd->pool, condition, &expr_err);
+    if (expr_err) {
+        return "Cannot parse condition clause";
+    }
+
+    errmsg = ap_walk_config(cmd->directive->first_child, cmd, new_file_conf);
+    if (errmsg != NULL)
+        return errmsg;
+
+    conf->d = cmd->path;
+    conf->d_is_fnmatch = 0;
+    conf->r = NULL;
+
+    ap_add_file_conf(c, new_file_conf);
+
+    if (*arg != '\0') {
+        return apr_pstrcat(cmd->pool, "Multiple ", thiscmd->name,
+                           "> arguments not supported.", NULL);
+    }
+
+    cmd->path = old_path;
+    cmd->override = old_overrides;
+
+    return NULL;
+}
 
 static const char *start_ifmod(cmd_parms *cmd, void *mconfig, const char *arg)
 {
@@ -2226,7 +2259,7 @@
 static const char *set_protocol(cmd_parms *cmd, void *dummy,
                                 const char *arg)
 {
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     core_server_config *conf = ap_get_module_config(cmd->server->module_config,
                                                     &core_module);
     char* proto;
@@ -2251,7 +2284,7 @@
     char *struct_ptr = (char *)cmd->server;
 
     const char *err = ap_check_cmd_context(cmd,
-                                           NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+                                           NOT_IN_DIR_LOC_FILE);
     if (err != NULL) {
         return err;
     }
@@ -2270,7 +2303,7 @@
 
 static const char *server_hostname_port(cmd_parms *cmd, void *dummy, const char *arg)
 {
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     const char *portstr, *part;
     char *scheme;
     int port;
@@ -2315,11 +2348,6 @@
                                       const char *arg)
 {
     core_dir_config *d = d_;
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-
-    if (err != NULL) {
-        return err;
-    }
 
     if (strcasecmp(arg, "On") == 0) {
         d->server_signature = srv_sig_on;
@@ -2357,7 +2385,7 @@
 
 static const char *set_timeout(cmd_parms *cmd, void *dummy, const char *arg)
 {
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
 
     if (err != NULL) {
         return err;
@@ -2370,11 +2398,6 @@
 static const char *set_allow2f(cmd_parms *cmd, void *d_, int arg)
 {
     core_dir_config *d = d_;
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-
-    if (err != NULL) {
-        return err;
-    }
 
     d->allow_encoded_slashes = arg != 0;
     return NULL;
@@ -2384,11 +2407,6 @@
                                         const char *arg)
 {
     core_dir_config *d = d_;
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-
-    if (err != NULL) {
-        return err;
-    }
 
     if (!strcasecmp(arg, "on")) {
         d->hostname_lookups = HOSTNAME_LOOKUP_ON;
@@ -2409,7 +2427,7 @@
 static const char *set_serverpath(cmd_parms *cmd, void *dummy,
                                   const char *arg)
 {
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
 
     if (err != NULL) {
         return err;
@@ -2423,11 +2441,6 @@
 static const char *set_content_md5(cmd_parms *cmd, void *d_, int arg)
 {
     core_dir_config *d = d_;
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-
-    if (err != NULL) {
-        return err;
-    }
 
     d->content_md5 = arg != 0;
     return NULL;
@@ -2457,11 +2470,6 @@
                                           const char *arg)
 {
     core_dir_config *d = d_;
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-
-    if (err != NULL) {
-        return err;
-    }
 
     if (strcasecmp(arg, "on") == 0) {
         d->use_canonical_name = USE_CANONICAL_NAME_ON;
@@ -2483,11 +2491,6 @@
                                           const char *arg)
 {
     core_dir_config *d = d_;
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-
-    if (err != NULL) {
-        return err;
-    }
 
     if (strcasecmp(arg, "on") == 0) {
         d->use_canonical_phys_port = USE_CANONICAL_PHYS_PORT_ON;
@@ -2556,8 +2559,7 @@
 {
     char *str;
 
-    const char *err = ap_check_cmd_context(cmd,
-                                           NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     if (err != NULL) {
         return err;
     }
@@ -2774,8 +2776,7 @@
 static const char *set_limit_req_line(cmd_parms *cmd, void *dummy,
                                       const char *arg)
 {
-    const char *err = ap_check_cmd_context(cmd,
-                                           NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     int lim;
 
     if (err != NULL) {
@@ -2795,8 +2796,7 @@
 static const char *set_limit_req_fieldsize(cmd_parms *cmd, void *dummy,
                                            const char *arg)
 {
-    const char *err = ap_check_cmd_context(cmd,
-                                           NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     int lim;
 
     if (err != NULL) {
@@ -2817,8 +2817,7 @@
 static const char *set_limit_req_fields(cmd_parms *cmd, void *dummy,
                                         const char *arg)
 {
-    const char *err = ap_check_cmd_context(cmd,
-                                           NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
+    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
     int lim;
 
     if (err != NULL) {
@@ -2840,13 +2839,8 @@
                                       const char *arg)
 {
     core_dir_config *conf = conf_;
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
     char *errp;
 
-    if (err != NULL) {
-        return err;
-    }
-
     if (APR_SUCCESS != apr_strtoff(&conf->limit_req_body, arg, &errp, 10)) {
         return "LimitRequestBody argument is not parsable.";
     }
@@ -2861,11 +2855,6 @@
                                           const char *arg)
 {
     core_dir_config *conf = conf_;
-    const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
-
-    if (err != NULL) {
-        return err;
-    }
 
     conf->limit_xml_body = atol(arg);
     if (conf->limit_xml_body < 0)
@@ -3039,7 +3028,7 @@
                 /* uuh, too much. */
                 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                               "Request exceeded the limit of %d subrequest "
-                              "nesting levels due to probable confguration "
+                              "nesting levels due to probable configuration "
                               "error. Use 'LimitInternalRecursion' to increase "
                               "the limit if necessary. Use 'LogLevel debug' to "
                               "get a backtrace.", slimit);
@@ -3209,6 +3198,8 @@
   "Set to on or off for PATH_INFO to be accepted by handlers, or default for the per-handler preference"),
 AP_INIT_TAKE1("Define", set_define, NULL, RSRC_CONF,
               "Define the existance of a variable.  Same as passing -D to the command line."),
+AP_INIT_RAW_ARGS("<If", ifsection, NULL, OR_ALL,
+  "Container for directives to be conditionally applied"),
 
 /* Old resource config file commands */
 
@@ -3686,6 +3677,7 @@
 
     set_banner(pconf);
     ap_setup_make_content_type(pconf);
+    ap_setup_auth_internal(ptemp);
     return OK;
 }
 
@@ -3896,7 +3888,6 @@
     /* FIXME: I suspect we can eliminate the need for these do_nothings - Ben */
     ap_hook_type_checker(do_nothing,NULL,NULL,APR_HOOK_REALLY_LAST);
     ap_hook_fixups(core_override_type,NULL,NULL,APR_HOOK_REALLY_FIRST);
-    ap_hook_access_checker(do_nothing,NULL,NULL,APR_HOOK_REALLY_LAST);
     ap_hook_create_request(core_create_req, NULL, NULL, APR_HOOK_MIDDLE);
     APR_OPTIONAL_HOOK(proxy, create_req, core_create_proxy_req, NULL, NULL,
                       APR_HOOK_MIDDLE);

Modified: httpd/sandbox/amsterdam/d/server/core_filters.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/core_filters.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/core_filters.c (original)
+++ httpd/sandbox/amsterdam/d/server/core_filters.c Mon Apr  7 09:28:58 2008
@@ -32,7 +32,6 @@
 #define APR_WANT_MEMFUNC
 #include "apr_want.h"
 
-#define CORE_PRIVATE
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"

Modified: httpd/sandbox/amsterdam/d/server/listen.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/listen.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/listen.c (original)
+++ httpd/sandbox/amsterdam/d/server/listen.c Mon Apr  7 09:28:58 2008
@@ -20,7 +20,6 @@
 #define APR_WANT_STRFUNC
 #include "apr_want.h"
 
-#define CORE_PRIVATE
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"

Modified: httpd/sandbox/amsterdam/d/server/log.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/log.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/log.c (original)
+++ httpd/sandbox/amsterdam/d/server/log.c Mon Apr  7 09:28:58 2008
@@ -40,8 +40,6 @@
 #include <unistd.h>
 #endif
 
-#define CORE_PRIVATE
-
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
@@ -161,15 +159,26 @@
     return APR_SUCCESS;
 }
 
-/* remember to close this handle in the child process */
+/* remember to close this handle in the child process
+ *
+ * On Win32 this makes zero sense, because we don't
+ * take the parent process's child procs.
+ * If the win32 parent instead passed each and every
+ * logger write handle from itself down to the child,
+ * and the parent manages all aspects of keeping the 
+ * reliable pipe log children alive, this would still
+ * make no sense :)  Cripple it on Win32.
+ */
 static void close_handle_in_child(apr_pool_t *p, apr_file_t *f)
 {
+#ifndef WIN32
     read_handle_t *new_handle;
 
     new_handle = apr_pcalloc(p, sizeof(read_handle_t));
     new_handle->next = read_handles;
     new_handle->handle = f;
     read_handles = new_handle;
+#endif
 }
 
 void ap_logs_child_init(apr_pool_t *p, server_rec *s)

Modified: httpd/sandbox/amsterdam/d/server/main.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/main.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/main.c (original)
+++ httpd/sandbox/amsterdam/d/server/main.c Mon Apr  7 09:28:58 2008
@@ -28,18 +28,19 @@
 #define APR_WANT_STRFUNC
 #include "apr_want.h"
 
-#define CORE_PRIVATE
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_main.h"
 #include "http_log.h"
 #include "http_config.h"
 #include "http_core.h"
+#include "http_request.h"
 #include "http_vhost.h"
 #include "apr_uri.h"
 #include "util_ebcdic.h"
 #include "ap_mpm.h"
 #include "mpm_common.h"
+#include "ap_expr.h"
 
 #if APR_HAVE_UNISTD_H
 #include <unistd.h>
@@ -492,6 +493,9 @@
         destroy_and_exit_process(process, 1);
     }
 #endif
+    if (ap_expr_init(pglobal) != APR_SUCCESS) {
+        destroy_and_exit_process(process, 1);
+    }
 
     apr_pool_create(&pcommands, pglobal);
     apr_pool_tag(pcommands, "pcommands");
@@ -709,6 +713,7 @@
     for (;;) {
         apr_hook_deregister_all();
         apr_pool_clear(pconf);
+        ap_clear_auth_internal();
 
         for (mod = ap_prelinked_modules; *mod != NULL; mod++) {
             ap_register_hooks(*mod, pconf);

Modified: httpd/sandbox/amsterdam/d/server/mpm/beos/beos.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/beos/beos.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/beos/beos.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/beos/beos.c Mon Apr  7 09:28:58 2008
@@ -31,8 +31,6 @@
  * - on exit most worker threads segfault trying to access a kernel page.
  */
 
-#define CORE_PRIVATE
-
 #include <kernel/OS.h>
 #include <unistd.h>
 #include <sys/socket.h>
@@ -403,15 +401,6 @@
         ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGHUP)");
     if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
             ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(" AP_SIG_GRACEFUL_STRING ")");
-}
-
-/*****************************************************************
- * Here follows a long bunch of generic server bookkeeping stuff...
- */
-
-int ap_graceful_stop_signalled(void)
-{
-    return is_graceful;
 }
 
 /* This is the thread that actually does all the work. */

Modified: httpd/sandbox/amsterdam/d/server/mpm/experimental/event/event.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/experimental/event/event.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/experimental/event/event.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/experimental/event/event.c Mon Apr  7 09:28:58 2008
@@ -75,8 +75,6 @@
 #error The Event MPM requires APR threads, but they are unavailable.
 #endif
 
-#define CORE_PRIVATE
-
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_main.h"
@@ -545,21 +543,6 @@
 #endif /* SIGPIPE */
 
 #endif
-}
-
-/*****************************************************************
- * Here follows a long bunch of generic server bookkeeping stuff...
- */
-
-int ap_graceful_stop_signalled(void)
-    /* XXX this is really a bad confusing obsolete name
-     * maybe it should be ap_mpm_process_exiting?
-     */
-{
-    /* note: for a graceful termination, listener_may_exit will be set before
-     *       workers_may_exit, so check listener_may_exit
-     */
-    return listener_may_exit;
 }
 
 /*****************************************************************

Modified: httpd/sandbox/amsterdam/d/server/mpm/experimental/event/fdqueue.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/experimental/event/fdqueue.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/experimental/event/fdqueue.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/experimental/event/fdqueue.c Mon Apr  7 09:28:58 2008
@@ -201,10 +201,16 @@
                                                           (*new_recycle));
         new_recycle->pool = pool_to_recycle;
         for (;;) {
-            new_recycle->next = queue_info->recycled_pools;
+            /*
+             * Save queue_info->recycled_pool in local variable next because
+             * new_recycle->next can be changed after apr_atomic_casptr
+             * function call. For gory details see PR 44402.
+             */
+            struct recycled_pool *next = queue_info->recycled_pools;
+            new_recycle->next = next;
             if (apr_atomic_casptr
                 ((volatile void **) &(queue_info->recycled_pools),
-                 new_recycle, new_recycle->next) == new_recycle->next) {
+                 new_recycle, next) == next) {
                 break;
             }
         }

Modified: httpd/sandbox/amsterdam/d/server/mpm/experimental/leader/leader.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/experimental/leader/leader.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/experimental/leader/leader.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/experimental/leader/leader.c Mon Apr  7 09:28:58 2008
@@ -43,8 +43,6 @@
 #error The Leader/Follower MPM requires APR threads, but they are unavailable.
 #endif
 
-#define CORE_PRIVATE
-
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_main.h"
@@ -578,14 +576,6 @@
 /*****************************************************************
  * Here follows a long bunch of generic server bookkeeping stuff...
  */
-
-int ap_graceful_stop_signalled(void)
-    /* XXX this is really a bad confusing obsolete name
-     * maybe it should be ap_mpm_process_exiting?
-     */
-{
-    return workers_may_exit;
-}
 
 /*****************************************************************
  * Child process main loop.

Modified: httpd/sandbox/amsterdam/d/server/mpm/experimental/perchild/perchild.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/experimental/perchild/perchild.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/experimental/perchild/perchild.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/experimental/perchild/perchild.c Mon Apr  7 09:28:58 2008
@@ -35,8 +35,6 @@
 #error The perchild MPM requires APR threads, but they are unavailable.
 #endif
 
-#define CORE_PRIVATE
-
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_main.h"

Modified: httpd/sandbox/amsterdam/d/server/mpm/experimental/threadpool/threadpool.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/experimental/threadpool/threadpool.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/experimental/threadpool/threadpool.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/experimental/threadpool/threadpool.c Mon Apr  7 09:28:58 2008
@@ -51,8 +51,6 @@
 #error The Worker MPM requires APR threads, but they are unavailable.
 #endif
 
-#define CORE_PRIVATE
-
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_main.h"

Modified: httpd/sandbox/amsterdam/d/server/mpm/mpmt_os2/mpmt_os2.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/mpmt_os2/mpmt_os2.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/mpmt_os2/mpmt_os2.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/mpmt_os2/mpmt_os2.c Mon Apr  7 09:28:58 2008
@@ -36,7 +36,6 @@
  Todo list
  - Enforce MaxClients somehow
 */
-#define CORE_PRIVATE
 #define INCL_NOPMAPI
 #define INCL_DOS
 #define INCL_DOSERRORS
@@ -446,12 +445,6 @@
     return APR_ENOTIMPL;
 }
 
-
-
-int ap_graceful_stop_signalled(void)
-{
-    return is_graceful;
-}
 
 
 

Modified: httpd/sandbox/amsterdam/d/server/mpm/mpmt_os2/mpmt_os2_child.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/mpmt_os2/mpmt_os2_child.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/mpmt_os2/mpmt_os2_child.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/mpmt_os2/mpmt_os2_child.c Mon Apr  7 09:28:58 2008
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#define CORE_PRIVATE
 #define INCL_NOPMAPI
 #define INCL_DOS
 #define INCL_DOSERRORS

Modified: httpd/sandbox/amsterdam/d/server/mpm/netware/mpm_netware.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/netware/mpm_netware.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/netware/mpm_netware.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/netware/mpm_netware.c Mon Apr  7 09:28:58 2008
@@ -61,8 +61,6 @@
 #include <sys/select.h>
 #endif
 
-#define CORE_PRIVATE
-
 #include "ap_config.h"
 #include "httpd.h"
 #include "mpm_default.h"
@@ -313,12 +311,6 @@
  * they are really private to child_main.
  */
 
-
-int ap_graceful_stop_signalled(void)
-{
-    /* not ever called anymore... */
-    return 0;
-}
 
 #define MAX_WB_RETRIES  3
 #ifdef DBINFO_ON

Modified: httpd/sandbox/amsterdam/d/server/mpm/prefork/prefork.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/prefork/prefork.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/prefork/prefork.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/prefork/prefork.c Mon Apr  7 09:28:58 2008
@@ -31,8 +31,6 @@
 #include <sys/types.h>
 #endif
 
-#define CORE_PRIVATE
-
 #include "ap_config.h"
 #include "httpd.h"
 #include "mpm_default.h"
@@ -431,14 +429,6 @@
 static int requests_this_child;
 static int num_listensocks = 0;
 
-
-int ap_graceful_stop_signalled(void)
-{
-    /* not ever called anymore... */
-    return 0;
-}
-
-
 static void child_main(int child_num_arg)
 {
     apr_pool_t *ptrans;
@@ -557,6 +547,12 @@
                         if (one_process && shutdown_pending) {
                             return;
                         }
+                        else if (die_now) {
+                            /* In graceful stop/restart; drop the mutex
+                             * and terminate the child. */
+                            SAFE_ACCEPT(accept_mutex_off());
+                            clean_child_exit(0);
+                        }
                         continue;
                     }
                     /* Single Unix documents select as returning errnos
@@ -567,6 +563,7 @@
                      */
                     ap_log_error(APLOG_MARK, APLOG_ERR, status,
                                  ap_server_conf, "apr_pollset_poll: (listen)");
+                    SAFE_ACCEPT(accept_mutex_off());
                     clean_child_exit(1);
                 }
 

Modified: httpd/sandbox/amsterdam/d/server/mpm/winnt/child.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/winnt/child.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/winnt/child.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/winnt/child.c Mon Apr  7 09:28:58 2008
@@ -16,7 +16,6 @@
 
 #ifdef WIN32
 
-#define CORE_PRIVATE
 #include "httpd.h"
 #include "http_main.h"
 #include "http_log.h"
@@ -84,6 +83,7 @@
      */
     if (context) {
         apr_pool_clear(context->ptrans);
+        context->ba = apr_bucket_alloc_create(context->ptrans);
         context->next = NULL;
         ResetEvent(context->Overlapped.hEvent);
         apr_thread_mutex_lock(qlock);
@@ -187,7 +187,7 @@
                 apr_pool_tag(context->ptrans, "transaction");
 
                 context->accept_socket = INVALID_SOCKET;
-                context->ba = apr_bucket_alloc_create(pchild);
+                context->ba = apr_bucket_alloc_create(context->ptrans);
                 apr_atomic_inc32(&num_completion_contexts);
 
                 apr_thread_mutex_unlock(child_lock);
@@ -449,12 +449,12 @@
         apr_pool_create_ex(&context->ptrans, pchild, NULL, allocator);
         apr_allocator_owner_set(allocator, context->ptrans);
         apr_pool_tag(context->ptrans, "transaction");
-        context->ba = apr_bucket_alloc_create(pchild);
         apr_thread_mutex_unlock(child_lock);
     }
 
     while (1) {
         apr_pool_clear(context->ptrans);
+        context->ba = apr_bucket_alloc_create(context->ptrans);
         context->accept_socket = remove_job();
         if (context->accept_socket == INVALID_SOCKET) {
             return NULL;

Modified: httpd/sandbox/amsterdam/d/server/mpm/winnt/mpm_winnt.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/winnt/mpm_winnt.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/winnt/mpm_winnt.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/winnt/mpm_winnt.c Mon Apr  7 09:28:58 2008
@@ -16,7 +16,6 @@
 
 #ifdef WIN32
 
-#define CORE_PRIVATE
 #include "httpd.h"
 #include "http_main.h"
 #include "http_log.h"
@@ -207,13 +206,6 @@
         "%s_restart", signal_name_prefix);
 }
 
-int volatile is_graceful = 0;
-
-AP_DECLARE(int) ap_graceful_stop_signalled(void)
-{
-    return is_graceful;
-}
-
 AP_DECLARE(void) ap_signal_parent(ap_signal_parent_e type)
 {
     HANDLE e;
@@ -230,7 +222,6 @@
            case SIGNAL_PARENT_RESTART:
            case SIGNAL_PARENT_RESTART_GRACEFUL:
            {
-               is_graceful = 1;
                SetEvent(restart_event);
                break;
            }
@@ -249,7 +240,6 @@
        case SIGNAL_PARENT_RESTART_GRACEFUL:
        {
            signal_name = signal_restart_name;
-           is_graceful = 1;
            break;
        }
        default:
@@ -586,7 +576,7 @@
     apr_pool_create_ex(&ptemp, p, NULL, NULL);
 
     /* Build the command line. Should look something like this:
-     * C:/apache/bin/apache.exe -f ap_server_confname
+     * C:/apache/bin/httpd.exe -f ap_server_confname
      * First, get the path to the executable...
      */
     apr_procattr_create(&attr, ptemp);
@@ -928,9 +918,11 @@
                 event_handles[CHILD_HANDLE] = NULL;
             }
         }
+        CloseHandle(child_exit_event);
         return 0;  /* Tell the caller we do not want to restart */
     }
     winnt_mpm_state = AP_MPMQ_STARTING;
+    CloseHandle(child_exit_event);
     return 1;      /* Tell the caller we want a restart */
 }
 
@@ -1370,8 +1362,29 @@
                      service_name);
         exit(APEXIT_INIT);
     }
+    else if (!one_process && !ap_my_generation) {
+        /* Open a null handle to soak stdout in this process.
+         * We need to emulate apr_proc_detach, unix performs this
+         * same check in the pre_config hook (although it is
+         * arguably premature).  Services already fixed this.
+         */
+        apr_file_t *nullfile;
+        apr_status_t rv;
+        apr_pool_t *pproc = apr_pool_parent_get(pconf);
+
+        if ((rv = apr_file_open(&nullfile, "NUL",
+                                APR_READ | APR_WRITE, APR_OS_DEFAULT,
+                                pproc)) == APR_SUCCESS) {
+            apr_file_t *nullstdout;
+            if (apr_file_open_stdout(&nullstdout, pproc)
+                    == APR_SUCCESS)
+                apr_file_dup2(nullstdout, nullfile, pproc);
+            apr_file_close(nullfile);
+        }
+    }
 
-    /* Win9x: disable AcceptEx */
+    /* use_acceptex (enabled by default) is not available on Win9x.
+     */
     if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
         use_acceptex = 0;
     }
@@ -1384,11 +1397,6 @@
 #ifdef AP_MPM_WANT_SET_MAX_MEM_FREE
         ap_max_mem_free = APR_ALLOCATOR_MAX_FREE_UNLIMITED;
 #endif
-    /* use_acceptex which is enabled by default is not available on Win9x.
-     */
-    if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
-        use_acceptex = 0;
-    }
 
     apr_cpystrn(ap_coredump_dir, ap_server_root, sizeof(ap_coredump_dir));
 

Modified: httpd/sandbox/amsterdam/d/server/mpm/winnt/nt_eventlog.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/winnt/nt_eventlog.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/winnt/nt_eventlog.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/winnt/nt_eventlog.c Mon Apr  7 09:28:58 2008
@@ -14,8 +14,6 @@
  * limitations under the License.
  */
 
-#define CORE_PRIVATE
-
 #include "httpd.h"
 #include "http_log.h"
 #include "mpm_winnt.h"

Modified: httpd/sandbox/amsterdam/d/server/mpm/winnt/service.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/winnt/service.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/winnt/service.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/winnt/service.c Mon Apr  7 09:28:58 2008
@@ -19,7 +19,6 @@
  * preload the API symbols now...
  */
 
-#define CORE_PRIVATE
 #define _WINUSER_
 
 #include "httpd.h"

Modified: httpd/sandbox/amsterdam/d/server/mpm/worker/fdqueue.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/worker/fdqueue.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/worker/fdqueue.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/worker/fdqueue.c Mon Apr  7 09:28:58 2008
@@ -94,10 +94,14 @@
                                                          sizeof(*new_recycle));
         new_recycle->pool = pool_to_recycle;
         for (;;) {
-            new_recycle->next = queue_info->recycled_pools;
+            /* Save queue_info->recycled_pool in local variable next because
+             * new_recycle->next can be changed after apr_atomic_casptr
+             * function call. For gory details see PR 44402.
+             */
+            struct recycled_pool *next = queue_info->recycled_pools;
+            new_recycle->next = next;
             if (apr_atomic_casptr((volatile void**)&(queue_info->recycled_pools),
-                                  new_recycle, new_recycle->next) ==
-                new_recycle->next) {
+                                  new_recycle, next) == next) {
                 break;
             }
         }
@@ -184,6 +188,14 @@
     apr_atomic_dec32(&(queue_info->idlers));
 
     /* Atomically pop a pool from the recycled list */
+
+    /* This function is safe only as long as it is single threaded because
+     * it reaches into the queue and accesses "next" which can change.
+     * We are OK today because it is only called from the listener thread.
+     * cas-based pushes do not have the same limitation - any number can
+     * happen concurrently with a single cas-based pop.
+     */
+
     for (;;) {
         struct recycled_pool *first_pool = queue_info->recycled_pools;
         if (first_pool == NULL) {

Modified: httpd/sandbox/amsterdam/d/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm/worker/worker.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm/worker/worker.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm/worker/worker.c Mon Apr  7 09:28:58 2008
@@ -50,8 +50,6 @@
 #error The Worker MPM requires APR threads, but they are unavailable.
 #endif
 
-#define CORE_PRIVATE
-
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_main.h"
@@ -511,17 +509,6 @@
 /*****************************************************************
  * Here follows a long bunch of generic server bookkeeping stuff...
  */
-
-int ap_graceful_stop_signalled(void)
-    /* XXX this is really a bad confusing obsolete name
-     * maybe it should be ap_mpm_process_exiting?
-     */
-{
-    /* note: for a graceful termination, listener_may_exit will be set before
-     *       workers_may_exit, so check listener_may_exit
-     */
-    return listener_may_exit;
-}
 
 /*****************************************************************
  * Child process main loop.

Modified: httpd/sandbox/amsterdam/d/server/mpm_common.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/mpm_common.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/mpm_common.c (original)
+++ httpd/sandbox/amsterdam/d/server/mpm_common.c Mon Apr  7 09:28:58 2008
@@ -126,6 +126,8 @@
 {
     apr_proc_t proc;
     apr_status_t waitret;
+    apr_exit_why_e why;
+    int status;
 
     /* Ensure pid sanity. */
     if (pid < 1) {
@@ -133,8 +135,12 @@
     }        
 
     proc.pid = pid;
-    waitret = apr_proc_wait(&proc, NULL, NULL, APR_NOWAIT);
+    waitret = apr_proc_wait(&proc, &status, &why, APR_NOWAIT);
     if (waitret != APR_CHILD_NOTDONE) {
+#ifdef AP_MPM_WANT_PROCESS_CHILD_STATUS
+        if (waitret == APR_CHILD_DONE)
+            ap_process_child_status(&proc, why, status);
+#endif
         return 1;
     }
 
@@ -412,7 +418,7 @@
 int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status)
 {
     int signum = status;
-    const char *sigdesc = apr_signal_description_get(signum);
+    const char *sigdesc;
 
     /* Child died... if it died due to a fatal error,
      * we should simply bail out.  The caller needs to
@@ -440,6 +446,8 @@
     }
 
     if (APR_PROC_CHECK_SIGNALED(why)) {
+        sigdesc = apr_signal_description_get(signum);
+
         switch (signum) {
         case SIGTERM:
         case SIGHUP:

Modified: httpd/sandbox/amsterdam/d/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/protocol.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/protocol.c (original)
+++ httpd/sandbox/amsterdam/d/server/protocol.c Mon Apr  7 09:28:58 2008
@@ -33,7 +33,6 @@
 #define APR_WANT_MEMFUNC
 #include "apr_want.h"
 
-#define CORE_PRIVATE
 #include "util_filter.h"
 #include "ap_config.h"
 #include "httpd.h"
@@ -1403,9 +1402,7 @@
          * can simply insert our buffered data at the front and
          * pass the whole bundle down the chain.
          */
-        APR_BRIGADE_CONCAT(ctx->bb, bb);
-        bb = ctx->bb;
-        ctx->bb = NULL;
+        APR_BRIGADE_PREPEND(bb, ctx->bb);
     }
 
     return ap_pass_brigade(f->next, bb);
@@ -1531,7 +1528,7 @@
 {
     apr_size_t written;
     struct ap_vrprintf_data vd;
-    char vrprintf_buf[AP_IOBUFSIZE+1];
+    char vrprintf_buf[AP_IOBUFSIZE];
 
     vd.vbuff.curpos = vrprintf_buf;
     vd.vbuff.endpos = vrprintf_buf + AP_IOBUFSIZE;
@@ -1542,9 +1539,6 @@
         return -1;
 
     written = apr_vformatter(r_flush, &vd.vbuff, fmt, va);
-
-    /* tack on null terminator on remaining string */
-    *(vd.vbuff.curpos) = '\0';
 
     if (written != -1) {
         int n = vd.vbuff.curpos - vrprintf_buf;

Modified: httpd/sandbox/amsterdam/d/server/request.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/request.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/request.c (original)
+++ httpd/sandbox/amsterdam/d/server/request.c Mon Apr  7 09:28:58 2008
@@ -32,8 +32,8 @@
 #define APR_WANT_STRFUNC
 #include "apr_want.h"
 
-#define CORE_PRIVATE
 #include "ap_config.h"
+#include "ap_provider.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
@@ -44,6 +44,7 @@
 #include "util_filter.h"
 #include "util_charset.h"
 #include "util_script.h"
+#include "ap_expr.h"
 
 #include "mod_core.h"
 
@@ -81,6 +82,10 @@
 AP_IMPLEMENT_HOOK_RUN_ALL(int, create_request,
                           (request_rec *r), (r), OK, DECLINED)
 
+static int auth_internal_per_conf = 0;
+static int auth_internal_per_conf_hooks = 0;
+static int auth_internal_per_conf_providers = 0;
+
 
 static int decl_die(int status, char *phase, request_rec *r)
 {
@@ -170,14 +175,14 @@
      * functions in map_to_storage that use the same merge results given
      * identical input.)  If the config changes, we must re-auth.
      */
-    if (r->main && (r->main->per_dir_config == r->per_dir_config)) {
-        r->user = r->main->user;
-        r->ap_auth_type = r->main->ap_auth_type;
-    }
-    else if (r->prev && (r->prev->per_dir_config == r->per_dir_config)) {
+    if (r->prev && (r->prev->per_dir_config == r->per_dir_config)) {
         r->user = r->prev->user;
         r->ap_auth_type = r->prev->ap_auth_type;
     }
+    else if (r->main && (r->main->per_dir_config == r->per_dir_config)) {
+        r->user = r->main->user;
+        r->ap_auth_type = r->main->ap_auth_type;
+    }
     else {
         switch (ap_satisfies(r)) {
         case SATISFY_ALL:
@@ -247,44 +252,61 @@
     ap_conf_vector_t   *dir_conf_merged; /* Base per_dir_config */
     ap_conf_vector_t   *per_dir_result;  /* per_dir_config += walked result */
     apr_array_header_t *walked;          /* The list of walk_walked_t results */
+    struct walk_cache_t *prev; /* Prev cache of same call in this (sub)req */
+    int count; /* Number of prev invocations of same call in this (sub)req */
 } walk_cache_t;
 
 static walk_cache_t *prep_walk_cache(apr_size_t t, request_rec *r)
 {
-    walk_cache_t *cache;
-    void **note;
-
-    /* Find the most relevant, recent entry to work from.  That would be
-     * this request (on the second call), or the parent request of a
-     * subrequest, or the prior request of an internal redirect.  Provide
-     * this _walk()er with a copy it is allowed to munge.  If there is no
-     * parent or prior cached request, then create a new walk cache.
+    void **note, **inherit_note;
+    walk_cache_t *cache, *prev_cache, *copy_cache;
+    int count;
+
+    /* Find the most relevant, recent walk cache to work from and provide
+     * a copy the caller is allowed to munge.  In the case of a sub-request
+     * or internal redirect, this is the cache corresponding to the equivalent
+     * invocation of the same function call in the "parent" request, if such
+     * a cache exists.  Otherwise it is the walk cache of the previous
+     * invocation of the same function call in the current request, if
+     * that exists; if not, then create a new walk cache.
      */
     note = ap_get_request_note(r, t);
     if (!note) {
         return NULL;
     }
 
-    if (!(cache = *note)) {
-        void **inherit_note;
+    copy_cache = prev_cache = *note;
+    count = prev_cache ? (prev_cache->count + 1) : 0;
 
-        if ((r->main
-             && ((inherit_note = ap_get_request_note(r->main, t)))
-             && *inherit_note)
-            || (r->prev
-                && ((inherit_note = ap_get_request_note(r->prev, t)))
-                && *inherit_note)) {
-            cache = apr_pmemdup(r->pool, *inherit_note,
-                                sizeof(*cache));
-            cache->walked = apr_array_copy(r->pool, cache->walked);
-        }
-        else {
-            cache = apr_pcalloc(r->pool, sizeof(*cache));
-            cache->walked = apr_array_make(r->pool, 4, sizeof(walk_walked_t));
+    if ((r->prev
+         && (inherit_note = ap_get_request_note(r->prev, t))
+         && *inherit_note)
+        || (r->main
+            && (inherit_note = ap_get_request_note(r->main, t))
+            && *inherit_note)) {
+        walk_cache_t *inherit_cache = *inherit_note;
+
+        while (inherit_cache->count > count) {
+            inherit_cache = inherit_cache->prev;
+        }
+        if (inherit_cache->count == count) {
+            copy_cache = inherit_cache;
         }
+    }
 
-        *note = cache;
+    if (copy_cache) {
+        cache = apr_pmemdup(r->pool, copy_cache, sizeof(*cache));
+        cache->walked = apr_array_copy(r->pool, cache->walked);
+        cache->prev = prev_cache;
+        cache->count = count;
     }
+    else {
+        cache = apr_pcalloc(r->pool, sizeof(*cache));
+        cache->walked = apr_array_make(r->pool, 4, sizeof(walk_walked_t));
+    }
+
+    *note = cache;
+
     return cache;
 }
 
@@ -331,7 +353,8 @@
     /* Save the name from the valid bits. */
     savename = (lfi->valid & APR_FINFO_NAME) ? lfi->name : NULL;
 
-    if (opts & OPT_SYM_LINKS) {
+    /* if OPT_SYM_OWNER is unset, we only need to check target accessible */
+    if (!(opts & OPT_SYM_OWNER)) {
         if ((res = apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME
                                                  | APR_FINFO_LINK), p))
                  != APR_SUCCESS) {
@@ -353,7 +376,7 @@
      * owner of the symlink, then get the info of the target.
      */
     if (!(lfi->valid & APR_FINFO_OWNER)) {
-        if ((res = apr_stat(&fi, d,
+        if ((res = apr_stat(lfi, d,
                             lfi->valid | APR_FINFO_LINK | APR_FINFO_OWNER, p))
             != APR_SUCCESS) {
             return HTTP_FORBIDDEN;
@@ -452,6 +475,7 @@
     walk_cache_t *cache;
     char *entry_dir;
     apr_status_t rv;
+    int cached;
 
     /* XXX: Better (faster) tests needed!!!
      *
@@ -489,6 +513,7 @@
     r->filename = entry_dir;
 
     cache = prep_walk_cache(AP_NOTE_DIRECTORY_WALK, r);
+    cached = (cache->cached != NULL);
 
     /* If this is not a dirent subrequest with a preconstructed
      * r->finfo value, then we can simply stat the filename to
@@ -532,7 +557,7 @@
      * and the vhost's list of directory sections hasn't changed,
      * we can skip rewalking the directory_walk entries.
      */
-    if (cache->cached
+    if (cached
         && ((r->finfo.filetype == APR_REG)
             || ((r->finfo.filetype == APR_DIR)
                 && (!r->path_info || !*r->path_info)))
@@ -617,6 +642,7 @@
          */
         int sec_idx;
         int matches = cache->walked->nelts;
+        int cached_matches = matches;
         walk_walked_t *last_walk = (walk_walked_t*)cache->walked->elts;
         core_dir_config *this_dir;
         core_opts_t opts;
@@ -634,6 +660,8 @@
         apr_size_t canonical_len;
 #endif
 
+        cached &= auth_internal_per_conf;
+
         /*
          * We must play our own mini-merge game here, for the few
          * running dir_config values we care about within dir_walk.
@@ -825,6 +853,7 @@
                      */
                     cache->walked->nelts -= matches;
                     matches = 0;
+                    cached = 0;
                 }
 
                 if (now_merged) {
@@ -892,6 +921,7 @@
                      */
                     cache->walked->nelts -= matches;
                     matches = 0;
+                    cached = 0;
                 }
 
                 if (now_merged) {
@@ -1104,6 +1134,7 @@
                  */
                 cache->walked->nelts -= matches;
                 matches = 0;
+                cached = 0;
             }
 
             if (now_merged) {
@@ -1120,11 +1151,16 @@
             last_walk->merged = now_merged;
         }
 
-        /* Whoops - everything matched in sequence, but the original walk
-         * found some additional matches.  Truncate them.
+        /* Whoops - everything matched in sequence, but either the original
+         * walk found some additional matches (which we need to truncate), or
+         * this walk found some additional matches.
          */
         if (matches) {
             cache->walked->nelts -= matches;
+            cached = 0;
+        }
+        else if (cache->walked->nelts > cached_matches) {
+            cached = 0;
         }
     }
 
@@ -1164,6 +1200,12 @@
         cache->cached = ap_make_dirstr_parent(r->pool, r->filename);
     }
 
+    if (cached
+        && r->per_dir_config == cache->dir_conf_merged) {
+        r->per_dir_config = cache->per_dir_result;
+        return OK;
+    }
+
     cache->dir_conf_tested = sec_ent;
     cache->dir_conf_merged = r->per_dir_config;
 
@@ -1190,6 +1232,7 @@
     int num_sec = sconf->sec_url->nelts;
     walk_cache_t *cache;
     const char *entry_uri;
+    int cached;
 
     /* No tricks here, there are no <Locations > to parse in this vhost.
      * We won't destroy the cache, just in case _this_ redirect is later
@@ -1200,6 +1243,7 @@
     }
 
     cache = prep_walk_cache(AP_NOTE_LOCATION_WALK, r);
+    cached = (cache->cached != NULL);
 
     /* Location and LocationMatch differ on their behaviour w.r.t. multiple
      * slashes.  Location matches multiple slashes with a single slash,
@@ -1219,7 +1263,7 @@
      * and the vhost's list of locations hasn't changed, we can skip
      * rewalking the location_walk entries.
      */
-    if (cache->cached
+    if (cached
         && (cache->dir_conf_tested == sec_ent)
         && (strcmp(entry_uri, cache->cached) == 0)) {
         /* Well this looks really familiar!  If our end-result (per_dir_result)
@@ -1231,11 +1275,6 @@
             return OK;
         }
 
-        if (r->per_dir_config == cache->dir_conf_merged) {
-            r->per_dir_config = cache->per_dir_result;
-            return OK;
-        }
-
         if (cache->walked->nelts) {
             now_merged = ((walk_walked_t*)cache->walked->elts)
                                             [cache->walked->nelts - 1].merged;
@@ -1247,7 +1286,10 @@
          */
         int len, sec_idx;
         int matches = cache->walked->nelts;
+        int cached_matches = matches;
         walk_walked_t *last_walk = (walk_walked_t*)cache->walked->elts;
+
+        cached &= auth_internal_per_conf;
         cache->cached = entry_uri;
 
         /* Go through the location entries, and check for matches.
@@ -1293,6 +1335,7 @@
                  */
                 cache->walked->nelts -= matches;
                 matches = 0;
+                cached = 0;
             }
 
             if (now_merged) {
@@ -1309,12 +1352,23 @@
             last_walk->merged = now_merged;
         }
 
-        /* Whoops - everything matched in sequence, but the original walk
-         * found some additional matches.  Truncate them.
+        /* Whoops - everything matched in sequence, but either the original
+         * walk found some additional matches (which we need to truncate), or
+         * this walk found some additional matches.
          */
         if (matches) {
             cache->walked->nelts -= matches;
+            cached = 0;
         }
+        else if (cache->walked->nelts > cached_matches) {
+            cached = 0;
+        }
+    }
+
+    if (cached
+        && r->per_dir_config == cache->dir_conf_merged) {
+        r->per_dir_config = cache->per_dir_result;
+        return OK;
     }
 
     cache->dir_conf_tested = sec_ent;
@@ -1342,6 +1396,7 @@
     int num_sec = dconf->sec_file->nelts;
     walk_cache_t *cache;
     const char *test_file;
+    int cached;
 
     /* To allow broken modules to proceed, we allow missing filenames to pass.
      * We will catch it later if it's heading for the core handler.
@@ -1352,6 +1407,7 @@
     }
 
     cache = prep_walk_cache(AP_NOTE_FILE_WALK, r);
+    cached = (cache->cached != NULL);
 
     /* No tricks here, there are just no <Files > to parse in this context.
      * We won't destroy the cache, just in case _this_ redirect is later
@@ -1376,7 +1432,7 @@
      * and the directory's list of file sections hasn't changed, we
      * can skip rewalking the file_walk entries.
      */
-    if (cache->cached
+    if (cached
         && (cache->dir_conf_tested == sec_ent)
         && (strcmp(test_file, cache->cached) == 0)) {
         /* Well this looks really familiar!  If our end-result (per_dir_result)
@@ -1388,11 +1444,6 @@
             return OK;
         }
 
-        if (r->per_dir_config == cache->dir_conf_merged) {
-            r->per_dir_config = cache->per_dir_result;
-            return OK;
-        }
-
         if (cache->walked->nelts) {
             now_merged = ((walk_walked_t*)cache->walked->elts)
                 [cache->walked->nelts - 1].merged;
@@ -1404,7 +1455,10 @@
          */
         int sec_idx;
         int matches = cache->walked->nelts;
+        int cached_matches = matches;
         walk_walked_t *last_walk = (walk_walked_t*)cache->walked->elts;
+
+        cached &= auth_internal_per_conf;
         cache->cached = test_file;
 
         /* Go through the location entries, and check for matches.
@@ -1412,16 +1466,24 @@
          * really try them with the most general first.
          */
         for (sec_idx = 0; sec_idx < num_sec; ++sec_idx) {
-
+            int err = 0;
             core_dir_config *entry_core;
             entry_core = ap_get_module_config(sec_ent[sec_idx], &core_module);
 
-            if (entry_core->r
-                ? ap_regexec(entry_core->r, cache->cached , 0, NULL, 0)
-                : (entry_core->d_is_fnmatch
-                   ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
-                   : strcmp(entry_core->d, cache->cached))) {
-                continue;
+            if (entry_core->condition) {
+                if (!ap_expr_eval(r, entry_core->condition, &err, NULL,
+                                  ap_expr_string, NULL)) {
+                    continue;
+                }
+            }
+            else {
+                if (entry_core->r
+                    ? ap_regexec(entry_core->r, cache->cached , 0, NULL, 0)
+                    : (entry_core->d_is_fnmatch
+                       ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
+                       : strcmp(entry_core->d, cache->cached))) {
+                    continue;
+                }
             }
 
             /* If we merged this same section last time, reuse it
@@ -1439,6 +1501,7 @@
                  */
                 cache->walked->nelts -= matches;
                 matches = 0;
+                cached = 0;
             }
 
             if (now_merged) {
@@ -1455,12 +1518,23 @@
             last_walk->merged = now_merged;
         }
 
-        /* Whoops - everything matched in sequence, but the original walk
-         * found some additional matches.  Truncate them.
+        /* Whoops - everything matched in sequence, but either the original
+         * walk found some additional matches (which we need to truncate), or
+         * this walk found some additional matches.
          */
         if (matches) {
             cache->walked->nelts -= matches;
+            cached = 0;
         }
+        else if (cache->walked->nelts > cached_matches) {
+            cached = 0;
+        }
+    }
+
+    if (cached
+        && r->per_dir_config == cache->dir_conf_merged) {
+        r->per_dir_config = cache->per_dir_result;
+        return OK;
     }
 
     cache->dir_conf_tested = sec_ent;
@@ -1608,6 +1682,107 @@
         return 0;
 }
 
+AP_DECLARE(void) ap_clear_auth_internal(void)
+{
+    auth_internal_per_conf_hooks = 0;
+    auth_internal_per_conf_providers = 0;
+}
+
+AP_DECLARE(void) ap_setup_auth_internal(apr_pool_t *ptemp)
+{
+    APR_OPTIONAL_FN_TYPE(authn_ap_list_provider_names)
+        *authn_ap_list_provider_names;
+    APR_OPTIONAL_FN_TYPE(authz_ap_list_provider_names)
+        *authz_ap_list_provider_names;
+    int total_auth_hooks = 0;
+    int total_auth_providers = 0;
+
+    auth_internal_per_conf = 0;
+
+    if (_hooks.link_access_checker) {
+        total_auth_hooks += _hooks.link_access_checker->nelts;
+    }
+    if (_hooks.link_check_user_id) {
+        total_auth_hooks += _hooks.link_check_user_id->nelts;
+    }
+    if (_hooks.link_auth_checker) {
+        total_auth_hooks += _hooks.link_auth_checker->nelts;
+    }
+
+    if (total_auth_hooks > auth_internal_per_conf_hooks) {
+        return;
+    }
+
+    authn_ap_list_provider_names =
+        APR_RETRIEVE_OPTIONAL_FN(authn_ap_list_provider_names);
+    authz_ap_list_provider_names =
+        APR_RETRIEVE_OPTIONAL_FN(authz_ap_list_provider_names);
+
+    if (authn_ap_list_provider_names) {
+        total_auth_providers += authn_ap_list_provider_names(ptemp)->nelts;
+    }
+
+    if (authz_ap_list_provider_names) {
+        total_auth_providers += authz_ap_list_provider_names(ptemp)->nelts;
+    }
+
+    if (total_auth_providers > auth_internal_per_conf_providers) {
+        return;
+    }
+
+    auth_internal_per_conf = 1;
+}
+
+AP_DECLARE(apr_status_t) ap_register_auth_provider(apr_pool_t *pool,
+                                                   const char *provider_group,
+                                                   const char *provider_name,
+                                                   const char *provider_version,
+                                                   const void *provider,
+                                                   int type)
+{
+    if ((type & AP_AUTH_INTERNAL_MASK) == AP_AUTH_INTERNAL_PER_CONF) {
+        ++auth_internal_per_conf_providers;
+    }
+
+    return ap_register_provider(pool, provider_group, provider_name,
+                                provider_version, provider);
+}
+
+AP_DECLARE(void) ap_hook_check_access(ap_HOOK_access_checker_t *pf,
+                                      const char * const *aszPre,
+                                      const char * const *aszSucc,
+                                      int nOrder, int type)
+{
+    if ((type & AP_AUTH_INTERNAL_MASK) == AP_AUTH_INTERNAL_PER_CONF) {
+        ++auth_internal_per_conf_hooks;
+    }
+
+    ap_hook_access_checker(pf, aszPre, aszSucc, nOrder);
+}
+
+AP_DECLARE(void) ap_hook_check_authn(ap_HOOK_check_user_id_t *pf,
+                                     const char * const *aszPre,
+                                     const char * const *aszSucc,
+                                     int nOrder, int type)
+{
+    if ((type & AP_AUTH_INTERNAL_MASK) == AP_AUTH_INTERNAL_PER_CONF) {
+        ++auth_internal_per_conf_hooks;
+    }
+
+    ap_hook_check_user_id(pf, aszPre, aszSucc, nOrder);
+}
+
+AP_DECLARE(void) ap_hook_check_authz(ap_HOOK_auth_checker_t *pf,
+                                     const char * const *aszPre,
+                                     const char * const *aszSucc,
+                                     int nOrder, int type)
+{
+    if ((type & AP_AUTH_INTERNAL_MASK) == AP_AUTH_INTERNAL_PER_CONF) {
+        ++auth_internal_per_conf_hooks;
+    }
+
+    ap_hook_auth_checker(pf, aszPre, aszSucc, nOrder);
+}
 
 AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
                                                 const char *new_uri,
@@ -1939,3 +2114,4 @@
     return (r->main == NULL)       /* otherwise, this is a sub-request */
            && (r->prev == NULL);   /* otherwise, this is an internal redirect */
 }
+

Modified: httpd/sandbox/amsterdam/d/server/scoreboard.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/scoreboard.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/scoreboard.c (original)
+++ httpd/sandbox/amsterdam/d/server/scoreboard.c Mon Apr  7 09:28:58 2008
@@ -352,6 +352,9 @@
 {
     worker_score *ws;
 
+    if (!sb)
+        return;
+
     ws = &ap_scoreboard_image->servers[sb->child_num][sb->thread_num];
 
 #ifdef HAVE_TIMES
@@ -479,6 +482,9 @@
 AP_DECLARE(int) ap_update_child_status(ap_sb_handle_t *sbh, int status,
                                       request_rec *r)
 {
+    if (!sbh)
+        return -1;
+
     return ap_update_child_status_from_indexes(sbh->child_num, sbh->thread_num,
                                                status, r);
 }
@@ -487,6 +493,9 @@
 {
     worker_score *ws;
 
+    if (!sbh)
+        return;
+
     if (sbh->child_num < 0) {
         return;
     }
@@ -512,6 +521,9 @@
 
 AP_DECLARE(worker_score *) ap_get_scoreboard_worker(ap_sb_handle_t *sbh)
 {
+    if (!sbh)
+        return NULL;
+
     return ap_get_scoreboard_worker_from_indexes(sbh->child_num,
                                                  sbh->thread_num);
 }

Modified: httpd/sandbox/amsterdam/d/server/util.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/util.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/util.c (original)
+++ httpd/sandbox/amsterdam/d/server/util.c Mon Apr  7 09:28:58 2008
@@ -42,8 +42,6 @@
 #include <netdb.h>              /* for gethostbyname() */
 #endif
 
-#define CORE_PRIVATE
-
 #include "ap_config.h"
 #include "apr_base64.h"
 #include "httpd.h"
@@ -1578,6 +1576,8 @@
                 if ((decoded == '\0')
                     || (forbid && ap_strchr_c(forbid, decoded))) {
                     badpath = 1;
+                    *x = decoded;
+                    y += 2;
                 }
                 else if (reserved && ap_strchr_c(reserved, decoded)) {
                     *x++ = *y++;
@@ -1644,6 +1644,11 @@
     }
 }
 
+AP_DECLARE(int) ap_unescape_all(char *url)
+{
+    return unescape_url(url, NULL, NULL);
+}
+
 /* c2x takes an unsigned, and expects the caller has guaranteed that
  * 0 <= what < 256... which usually means that you have to cast to
  * unsigned char first, because (unsigned)(char)(x) first goes through
@@ -1683,9 +1688,8 @@
  * something with a '/' in it (and thus does not prefix "./").
  */
 
-AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *segment)
+AP_DECLARE(char *) ap_escape_path_segment_buffer(char *copy, const char *segment)
 {
-    char *copy = apr_palloc(p, 3 * strlen(segment) + 1);
     const unsigned char *s = (const unsigned char *)segment;
     unsigned char *d = (unsigned char *)copy;
     unsigned c;
@@ -1701,6 +1705,11 @@
     }
     *d = '\0';
     return copy;
+}
+
+AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *segment)
+{
+    return ap_escape_path_segment_buffer(apr_palloc(p, 3 * strlen(segment) + 1), segment);
 }
 
 AP_DECLARE(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partial)

Modified: httpd/sandbox/amsterdam/d/server/util_cfgtree.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/util_cfgtree.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/util_cfgtree.c (original)
+++ httpd/sandbox/amsterdam/d/server/util_cfgtree.c Mon Apr  7 09:28:58 2008
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#define CORE_PRIVATE
 #include "util_cfgtree.h"
 #include <stdlib.h>
 

Modified: httpd/sandbox/amsterdam/d/server/util_filter.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/util_filter.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/util_filter.c (original)
+++ httpd/sandbox/amsterdam/d/server/util_filter.c Mon Apr  7 09:28:58 2008
@@ -279,7 +279,7 @@
                                           ap_filter_t **p_filters,
                                           ap_filter_t **c_filters)
 {
-    apr_pool_t* p = r ? r->pool : c->pool;
+    apr_pool_t *p = frec->ftype < AP_FTYPE_CONNECTION && r ? r->pool : c->pool;
     ap_filter_t *f = apr_palloc(p, sizeof(*f));
     ap_filter_t **outf;
 
@@ -309,7 +309,8 @@
 
     f->frec = frec;
     f->ctx = ctx;
-    f->r = r;
+    /* f->r must always be NULL for connection filters */
+    f->r = frec->ftype < AP_FTYPE_CONNECTION ? r : NULL;
     f->c = c;
     f->next = NULL;
 

Modified: httpd/sandbox/amsterdam/d/server/util_mutex.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/util_mutex.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/util_mutex.c (original)
+++ httpd/sandbox/amsterdam/d/server/util_mutex.c Mon Apr  7 09:28:58 2008
@@ -27,8 +27,6 @@
 #define APR_WANT_STRFUNC
 #include "apr_want.h"
 
-#define CORE_PRIVATE
-
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_main.h"

Modified: httpd/sandbox/amsterdam/d/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/util_script.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/util_script.c (original)
+++ httpd/sandbox/amsterdam/d/server/util_script.c Mon Apr  7 09:28:58 2008
@@ -25,7 +25,6 @@
 #include <stdlib.h>
 #endif
 
-#define CORE_PRIVATE
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"

Modified: httpd/sandbox/amsterdam/d/server/vhost.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/server/vhost.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/server/vhost.c (original)
+++ httpd/sandbox/amsterdam/d/server/vhost.c Mon Apr  7 09:28:58 2008
@@ -27,7 +27,6 @@
 #define APR_WANT_STRFUNC
 #include "apr_want.h"
 
-#define CORE_PRIVATE
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"

Modified: httpd/sandbox/amsterdam/d/support/NWGNUab
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/NWGNUab?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/NWGNUab (original)
+++ httpd/sandbox/amsterdam/d/support/NWGNUab Mon Apr  7 09:28:58 2008
@@ -12,9 +12,30 @@
 endif
 
 #
+# build this level's files
+#
+# Make sure all needed macro's are defined
+#
+
+ifdef WITH_MOD_SSL
+ifneq "$(OSSLSDK)" ""
+OSSLINC = $(OSSLSDK)/outinc_nw_libc
+OSSLLIB = $(OSSLSDK)/out_nw_libc
+HAVE_OPENSSL = 1
+endif
+endif
+
+#
 # These directories will be at the beginning of the include list, followed by
 # INCDIRS
 #
+ifdef HAVE_OPENSSL
+XINCDIRS	+= \
+			$(OSSLINC) \
+			$(OSSLINC)/openssl \
+			$(EOLIST)
+endif
+
 XINCDIRS	+= \
 			$(NWOS) \
 			$(AP_WORK)/include \
@@ -33,14 +54,18 @@
 #
 # These defines will come after DEFINES
 #
+ifdef HAVE_OPENSSL
 XDEFINES	+= \
+			-DHAVE_OPENSSL \
 			$(EOLIST)
 
 #
 # These flags will be added to the link.opt file
 #
 XLFLAGS		+= \
+			-l $(OSSLLIB) \
 			$(EOLIST)
+endif
 
 #
 # These values will be appended to the correct variables based on the value of
@@ -57,7 +82,7 @@
 			$(EOLIST)
 
 XLFLAGS		+= \
-		   	$(EOLIST)
+			$(EOLIST)
 endif
 
 ifeq "$(RELEASE)" "noopt"
@@ -71,7 +96,7 @@
 			$(EOLIST)
 
 XLFLAGS		+= \
-		   	$(EOLIST)
+			$(EOLIST)
 endif
 
 ifeq "$(RELEASE)" "release"
@@ -93,7 +118,11 @@
 # This is used by the link 'name' directive to name the nlm.  If left blank
 # TARGET_nlm (see below) will be used.
 #
+ifdef HAVE_OPENSSL
+NLM_NAME		= abs
+else
 NLM_NAME		= ab
+endif
 
 #
 # This is used by the link '-desc ' directive.
@@ -105,7 +134,7 @@
 # This is used by the '-threadname' directive.  If left blank,
 # NLM_NAME Thread will be used.
 #
-NLM_THREAD_NAME	= ab
+NLM_THREAD_NAME	= $(NLM_NAME)
 
 #
 # This is used by the '-screenname' directive.  If left blank,
@@ -118,7 +147,7 @@
 # If this is specified, it will override VERSION value in
 # $(AP_WORK)\build\NWGNUenvironment.inc
 #
-NLM_VERSION		=
+NLM_VERSION	=
 
 #
 # If this is specified, it will override the default of 64K
@@ -144,20 +173,20 @@
 #
 # If these are specified it will be used by the link '-flags' directive
 #
-NLM_FLAGS		= AUTOUNLOAD, PSEUDOPREEMPTION
+NLM_FLAGS	= AUTOUNLOAD, PSEUDOPREEMPTION
 
 #
 # If this is specified it will be linked in with the XDCData option in the def
 # file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
 # by setting APACHE_UNIPROC in the environment
 #
-XDCDATA         =
+XDCDATA		=
 
 #
 # If there is an NLM target, put it here
 #
 TARGET_nlm = \
-	$(OBJDIR)/ab.nlm \
+	$(OBJDIR)/$(NLM_NAME).nlm \
 	$(EOLIST)
 
 #
@@ -179,9 +208,16 @@
 # These will be added as a library command in the link.opt file.
 #
 FILES_nlm_libs = \
-   	libcpre.o \
+	libcpre.o \
 	$(EOLIST)
 
+ifdef HAVE_OPENSSL
+FILES_nlm_libs += \
+	$(OSSLLIB)/crypto.lib \
+	$(OSSLLIB)/ssl.lib \
+	$(EOLIST)
+endif
+
 #
 # These are the modules that the above NLM target depends on to load.
 # These will be added as a module command in the link.opt file.
@@ -214,6 +250,19 @@
 	@libc.imp \
 	$(EOLIST)
 
+ifdef HAVE_OPENSSL
+# Don't link with Winsock if standard sockets are being used
+ifndef USE_STDSOCKETS
+FILES_nlm_Ximports += @ws2nlm.imp \
+	$(EOLIST)
+endif
+FILES_nlm_Ximports += \
+	GetProcessSwitchCount \
+	RunningProcess \
+	GetSuperHighResolutionTimer \
+	$(EOLIST)
+endif
+
 #
 # Any symbols exported to here
 #
@@ -225,7 +274,7 @@
 # Paths must all use the '/' character
 #
 FILES_lib_objs = \
-		$(EOLIST)
+	$(EOLIST)
 
 #
 # implement targets and dependancies (leave this section alone)

Modified: httpd/sandbox/amsterdam/d/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/ab.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/ab.c (original)
+++ httpd/sandbox/amsterdam/d/support/ab.c Mon Apr  7 09:28:58 2008
@@ -306,9 +306,9 @@
 
 apr_size_t doclen = 0;      /* the length the document should be */
 long started = 0;           /* number of requests started, so no excess */
-long totalread = 0;         /* total number of bytes read */
-long totalbread = 0;        /* totoal amount of entity body read */
-long totalposted = 0;       /* total number of bytes posted, inc. headers */
+apr_uint64_t totalread = 0;         /* total number of bytes read */
+apr_uint64_t totalbread = 0;        /* totoal amount of entity body read */
+apr_uint64_t totalposted = 0;       /* total number of bytes posted, inc. headers */
 long done = 0;              /* number of requests we have done */
 long doneka = 0;            /* number of keep alive connections done */
 long good = 0, bad = 0;     /* number of good and bad requests */
@@ -773,10 +773,10 @@
         printf("Non-2xx responses:      %d\n", err_response);
     if (keepalive)
         printf("Keep-Alive requests:    %ld\n", doneka);
-    printf("Total transferred:      %ld bytes\n", totalread);
+    printf("Total transferred:      %" APR_UINT64_T_FMT " bytes\n", totalread);
     if (posting > 0)
-        printf("Total POSTed:           %ld\n", totalposted);
-    printf("HTML transferred:       %ld bytes\n", totalbread);
+        printf("Total POSTed:           %" APR_UINT64_T_FMT "\n", totalposted);
+    printf("HTML transferred:       %" APR_UINT64_T_FMT " bytes\n", totalbread);
 
     /* avoid divide by zero */
     if (timetaken) {
@@ -1045,14 +1045,14 @@
            "<td colspan=2 %s>%ld</td></tr>\n",
            trstring, tdstring, tdstring, doneka);
     printf("<tr %s><th colspan=2 %s>Total transferred:</th>"
-       "<td colspan=2 %s>%ld bytes</td></tr>\n",
+       "<td colspan=2 %s>%" APR_UINT64_T_FMT " bytes</td></tr>\n",
        trstring, tdstring, tdstring, totalread);
     if (posting > 0)
         printf("<tr %s><th colspan=2 %s>Total POSTed:</th>"
-           "<td colspan=2 %s>%ld</td></tr>\n",
+           "<td colspan=2 %s>%" APR_UINT64_T_FMT "</td></tr>\n",
            trstring, tdstring, tdstring, totalposted);
     printf("<tr %s><th colspan=2 %s>HTML transferred:</th>"
-       "<td colspan=2 %s>%ld bytes</td></tr>\n",
+       "<td colspan=2 %s>%" APR_UINT64_T_FMT " bytes</td></tr>\n",
        trstring, tdstring, tdstring, totalbread);
 
     /* avoid divide by zero */
@@ -1463,7 +1463,8 @@
                     cl = strstr(c->cbuff, "Content-length:");
                 if (cl) {
                     c->keepalive = 1;
-                    c->length = atoi(cl + 16);
+                    /* response to HEAD doesn't have entity body */
+                    c->length = posting >= 0 ? atoi(cl + 16) : 0;
                 }
                 /* The response may not have a Content-Length header */
                 if (!cl) {

Modified: httpd/sandbox/amsterdam/d/support/ab.dsp
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/ab.dsp?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/ab.dsp (original)
+++ httpd/sandbox/amsterdam/d/support/ab.dsp Mon Apr  7 09:28:58 2008
@@ -49,8 +49,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /debug /opt:ref
+# ADD BASE LINK32 kernel32.lib user32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
 # Begin Special Build Tool
 TargetPath=.\Release\ab.exe
 SOURCE="$(InputPath)"
@@ -79,8 +79,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
 # Begin Special Build Tool
 TargetPath=.\Debug\ab.exe
 SOURCE="$(InputPath)"

Modified: httpd/sandbox/amsterdam/d/support/abs.dsp
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/abs.dsp?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/abs.dsp (original)
+++ httpd/sandbox/amsterdam/d/support/abs.dsp Mon Apr  7 09:28:58 2008
@@ -49,8 +49,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib wsock32.lib ws2_32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /libpath:"../srclib/openssl/out32dll"
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /debug /libpath:"../srclib/openssl/out32dll" /opt:ref
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /libpath:"../srclib/openssl/out32dll"
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /debug /libpath:"../srclib/openssl/out32dll" /opt:ref
 # Begin Special Build Tool
 TargetPath=.\Release\abs.exe
 SOURCE="$(InputPath)"
@@ -79,8 +79,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /incremental:no /debug /libpath:"../srclib/openssl/out32dll"
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /incremental:no /debug /libpath:"../srclib/openssl/out32dll"
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /incremental:no /debug /libpath:"../srclib/openssl/out32dll"
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /incremental:no /debug /libpath:"../srclib/openssl/out32dll"
 # Begin Special Build Tool
 TargetPath=.\Debug\abs.exe
 SOURCE="$(InputPath)"

Modified: httpd/sandbox/amsterdam/d/support/fcgistarter.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/fcgistarter.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/fcgistarter.c (original)
+++ httpd/sandbox/amsterdam/d/support/fcgistarter.c Mon Apr  7 09:28:58 2008
@@ -53,7 +53,7 @@
     exit(EXIT_FAILURE);
 }
 
-int main(int argc, const char *argv[])
+int main(int argc, const char * const argv[])
 {
     apr_file_t *infd, *skwrapper;
     apr_sockaddr_t *skaddr;
@@ -69,7 +69,7 @@
     const char *interface = NULL;
     const char *command = NULL;
 
-    apr_initialize();
+    apr_app_initialize(&argc, &argv, NULL);
 
     atexit(apr_terminate);
 
@@ -148,16 +148,18 @@
         exit_error(rv, "apr_proc_detach");
     }
 
+#if defined(WIN32) || defined(OS2) || defined(NETWARE)
+
+#error "Please implement me."
+
+#else
+
     while (--num_to_start >= 0) {
         rv = apr_proc_fork(&proc, pool);
         if (rv == APR_INCHILD) {
             apr_os_file_t oft = 0;
             apr_os_sock_t oskt;
 
-#if defined(WIN32) || defined(OS2) || defined(NETWARE)
-#error "Please implement me."
-#else
-
             /* Ok, so we need a file that has file descriptor 0 (which
              * FastCGI wants), but points to our socket.  This isn't really
              * possible in APR, so we cheat a bit.  I have no idea how to
@@ -197,7 +199,7 @@
              *     is no longer fd 0, so it doesn't work.  Sigh. */
 
             execl(command, command, NULL);
-#endif
+
         } else if (rv == APR_INPARENT) {
             if (num_to_start == 0) {
                 apr_socket_close(skt);
@@ -206,6 +208,8 @@
             exit_error(rv, "apr_proc_fork");
         }
     }
+
+#endif
 
     return EXIT_SUCCESS;
 }

Modified: httpd/sandbox/amsterdam/d/support/htcacheclean.dsp
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/htcacheclean.dsp?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/htcacheclean.dsp (original)
+++ httpd/sandbox/amsterdam/d/support/htcacheclean.dsp Mon Apr  7 09:28:58 2008
@@ -49,8 +49,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /debug /opt:ref
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
 # Begin Special Build Tool
 TargetPath=.\Release\htcacheclean.exe
 SOURCE="$(InputPath)"
@@ -79,8 +79,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
 # Begin Special Build Tool
 TargetPath=.\Debug\htcacheclean.exe
 SOURCE="$(InputPath)"

Modified: httpd/sandbox/amsterdam/d/support/htdbm.dsp
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/htdbm.dsp?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/htdbm.dsp (original)
+++ httpd/sandbox/amsterdam/d/support/htdbm.dsp Mon Apr  7 09:28:58 2008
@@ -49,8 +49,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /debug /opt:ref
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
 # Begin Special Build Tool
 TargetPath=.\Release\htdbm.exe
 SOURCE="$(InputPath)"
@@ -79,8 +79,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
 # Begin Special Build Tool
 TargetPath=.\Debug\htdbm.exe
 SOURCE="$(InputPath)"

Modified: httpd/sandbox/amsterdam/d/support/htdigest.dsp
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/htdigest.dsp?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/htdigest.dsp (original)
+++ httpd/sandbox/amsterdam/d/support/htdigest.dsp Mon Apr  7 09:28:58 2008
@@ -49,8 +49,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /debug /opt:ref
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
 # Begin Special Build Tool
 TargetPath=.\Release\htdigest.exe
 SOURCE="$(InputPath)"
@@ -79,8 +79,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
 # Begin Special Build Tool
 TargetPath=.\Debug\htdigest.exe
 SOURCE="$(InputPath)"

Modified: httpd/sandbox/amsterdam/d/support/htpasswd.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/htpasswd.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/htpasswd.c (original)
+++ httpd/sandbox/amsterdam/d/support/htpasswd.c Mon Apr  7 09:28:58 2008
@@ -115,6 +115,30 @@
     }
 }
 
+static void generate_salt(char *s, size_t size)
+{
+    static unsigned char tbl[] = 
+        "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+    size_t i;
+    for (i = 0; i < size; ++i) {
+        int idx = (int) (64.0 * rand() / (RAND_MAX + 1.0));
+        s[i] = tbl[idx];
+    }
+}
+
+static apr_status_t seed_rand(void)
+{
+    int seed = 0;
+    apr_status_t rv;
+    rv = apr_generate_random_bytes((unsigned char*) &seed, sizeof(seed));
+    if (rv) {
+        apr_file_printf(errfile, "Unable to generate random bytes: %pm" NL, &rv);
+        return rv;
+    }
+    srand(seed);
+    return rv;
+}
+
 static void putline(apr_file_t *f, const char *l)
 {
     apr_file_puts(l, f);
@@ -162,8 +186,10 @@
         break;
 
     case ALG_APMD5:
-        (void) srand((int) time((time_t *) NULL));
-        to64(&salt[0], rand(), 8);
+        if (seed_rand()) {
+            break;
+        }
+        generate_salt(&salt[0], 8);
         salt[8] = '\0';
 
         apr_md5_encode((const char *)pw, (const char *)salt,
@@ -178,7 +204,9 @@
 #if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
     case ALG_CRYPT:
     default:
-        (void) srand((int) time((time_t *) NULL));
+        if (seed_rand()) {
+            break;
+        }
         to64(&salt[0], rand(), 8);
         salt[8] = '\0';
 

Modified: httpd/sandbox/amsterdam/d/support/htpasswd.dsp
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/htpasswd.dsp?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/htpasswd.dsp (original)
+++ httpd/sandbox/amsterdam/d/support/htpasswd.dsp Mon Apr  7 09:28:58 2008
@@ -49,8 +49,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /debug /opt:ref
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
 # Begin Special Build Tool
 TargetPath=.\Release\htpasswd.exe
 SOURCE="$(InputPath)"
@@ -79,8 +79,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
 # Begin Special Build Tool
 TargetPath=.\Debug\htpasswd.exe
 SOURCE="$(InputPath)"

Modified: httpd/sandbox/amsterdam/d/support/httxt2dbm.c
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/httxt2dbm.c?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/httxt2dbm.c (original)
+++ httpd/sandbox/amsterdam/d/support/httxt2dbm.c Mon Apr  7 09:28:58 2008
@@ -183,7 +183,7 @@
     apr_file_t *infile;
     apr_dbm_t *outdbm;
 
-    apr_initialize();
+    apr_app_initialize(&argc, &argv, NULL);
     atexit(apr_terminate);
 
     verbose = 0;

Modified: httpd/sandbox/amsterdam/d/support/httxt2dbm.dsp
URL: http://svn.apache.org/viewvc/httpd/sandbox/amsterdam/d/support/httxt2dbm.dsp?rev=645594&r1=645593&r2=645594&view=diff
==============================================================================
--- httpd/sandbox/amsterdam/d/support/httxt2dbm.dsp (original)
+++ httpd/sandbox/amsterdam/d/support/httxt2dbm.dsp Mon Apr  7 09:28:58 2008
@@ -49,8 +49,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /debug /opt:ref
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
 # Begin Special Build Tool
 TargetPath=.\Release\httxt2dbm.exe
 SOURCE="$(InputPath)"
@@ -79,8 +79,8 @@
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
-# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
+# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
 # Begin Special Build Tool
 TargetPath=.\Debug\httxt2dbm.exe
 SOURCE="$(InputPath)"



Mime
View raw message