You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2021/01/17 17:23:37 UTC

svn commit: r1885612 - in /httpd/httpd/branches/2.4.x: ./ modules/cache/ modules/core/ modules/dav/main/ modules/http2/ modules/lua/ modules/ssl/ server/

Author: minfrin
Date: Sun Jan 17 17:23:37 2021
New Revision: 1885612

URL: http://svn.apache.org/viewvc?rev=1885612&view=rev
Log:
Backport to 2.4:

  *) Easy patches: synch 2.4.x and trunk
        - mod_http2: Fix ascii art
        - mod_http2: fix some dox comments
        - mod_dav: Don't call memcpy(,NULL,0)
        - mod_ssl: Pass base_server in OpenSSL init log message
        - .gdbinit: tab to space
        - mod_so: don't try to load modules from a NULL path
        - mod_cache_file/mod_lua: Add missing "const" or "static const" qualifiers
                                  in some command_rec definitions
        - mod_lua: Fix compilation error if APR_HAS_THREADS is not defined
        - core/log: fix an harmless warning spoted by gcc 10
        - mod_ssl: update comment
     trunk patch:
          http://svn.apache.org/r1810233
          http://svn.apache.org/r1827530
          http://svn.apache.org/r1874144
          http://svn.apache.org/r1877262
          http://svn.apache.org/r1878263
          http://svn.apache.org/r1880461
          http://svn.apache.org/r1882053
          http://svn.apache.org/r1882060
          http://svn.apache.org/r1883452
          http://svn.apache.org/r1884551
     2.4.x patch: svn merge -c 1810233,1827530,1874144,1877262,1878263,1880461,1882053,1882060,1883452,1884551 ^/httpd/httpd/trunk .
     +1: jailletc36, jorton, minfrin


Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/.gdbinit
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/cache/mod_file_cache.c
    httpd/httpd/branches/2.4.x/modules/core/mod_so.c
    httpd/httpd/branches/2.4.x/modules/dav/main/util.c
    httpd/httpd/branches/2.4.x/modules/http2/h2_util.c
    httpd/httpd/branches/2.4.x/modules/http2/h2_util.h
    httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c
    httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_init.c
    httpd/httpd/branches/2.4.x/modules/ssl/ssl_private.h
    httpd/httpd/branches/2.4.x/server/log.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1810233,1827530,1874144,1877262,1878263,1880461,1882053,1882060,1883452,1884551

Modified: httpd/httpd/branches/2.4.x/.gdbinit
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/.gdbinit?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/.gdbinit (original)
+++ httpd/httpd/branches/2.4.x/.gdbinit Sun Jan 17 17:23:37 2021
@@ -6,12 +6,12 @@ define dump_table
     set $n = ((apr_array_header_t *)$arg0)->nelts
     set $i = 0
     while $i < $n
-	if $t[$i].val == (void *)0L
-	   printf "[%u] '%s'=>NULL\n", $i, $t[$i].key
-	else
-	   printf "[%u] '%s'='%s' [%p]\n", $i, $t[$i].key, $t[$i].val, $t[$i].val
-	end
-	set $i = $i + 1
+    if $t[$i].val == (void *)0L
+        printf "[%u] '%s'=>NULL\n", $i, $t[$i].key
+    else
+        printf "[%u] '%s'='%s' [%p]\n", $i, $t[$i].key, $t[$i].val, $t[$i].val
+    end
+    set $i = $i + 1
     end
 end
 document dump_table
@@ -47,7 +47,7 @@ define dump_string_hash
             printf "'%s' => '%p'\n", $ent->key, $ent->val
             set $ent = $ent->next
         end
-	set $i = $i + 1
+        set $i = $i + 1
     end
 end
 document dump_string_hash
@@ -64,7 +64,7 @@ define dump_string_shash
             printf "'%s' => '%s'\n", $ent->key, $ent->val
             set $ent = $ent->next
         end
-	set $i = $i + 1
+        set $i = $i + 1
     end
 end
 document dump_string_shash
@@ -72,7 +72,7 @@ document dump_string_shash
 end
 
 define ro
-	run -DONE_PROCESS
+    run -DONE_PROCESS
 end
 
 define dump_string_array
@@ -80,8 +80,8 @@ define dump_string_array
     set $n = (int)((apr_array_header_t *)$arg0)->nelts
     set $i = 0
     while $i < $n
-	printf "[%u] '%s'\n", $i, $a[$i]
-	set $i = $i + 1
+        printf "[%u] '%s'\n", $i, $a[$i]
+        set $i = $i + 1
     end
 end
 document dump_string_array

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Sun Jan 17 17:23:37 2021
@@ -8,6 +8,17 @@ Changes with Apache 2.4.47
        - mod_proxy_balancer: Add a missing </tr>
        - mod_md: get_stapling_status hooks should return an int
        - mod_session: Improve a message about SessionExpiryUpdateInterval values
+       - mod_http2: Fix ascii art
+       - mod_http2: fix some dox comments
+       - mod_dav: Don't call memcpy(,NULL,0)
+       - mod_ssl: Pass base_server in OpenSSL init log message
+       - .gdbinit: tab to space
+       - mod_so: don't try to load modules from a NULL path
+       - mod_cache_file/mod_lua: Add missing "const" or "static const" qualifiers
+                                 in some command_rec definitions
+       - mod_lua: Fix compilation error if APR_HAS_THREADS is not defined
+       - core/log: fix an harmless warning spoted by gcc 10
+       - mod_ssl: update comment
      [Christophe Jaillet]
 
   *) mod_proxy_fcgi: Honor "SetEnv proxy-sendcl" to forward a chunked

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Sun Jan 17 17:23:37 2021
@@ -138,32 +138,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) Easy patches: synch 2.4.x and trunk
-        - mod_http2: Fix ascii art
-        - mod_http2: fix some dox comments
-        - mod_dav: Don't call memcpy(,NULL,0)
-        - mod_ssl: Pass base_server in OpenSSL init log message
-        - .gdbinit: tab to space
-        - mod_so: don't try to load modules from a NULL path
-        - mod_cache_file/mod_lua: Add missing "const" or "static const" qualifiers
-                                  in some command_rec definitions
-        - mod_lua: Fix compilation error if APR_HAS_THREADS is not defined
-        - core/log: fix an harmless warning spoted by gcc 10
-        - mod_ssl: update comment
-     trunk patch:
-          http://svn.apache.org/r1810233
-          http://svn.apache.org/r1827530
-          http://svn.apache.org/r1874144
-          http://svn.apache.org/r1877262
-          http://svn.apache.org/r1878263
-          http://svn.apache.org/r1880461
-          http://svn.apache.org/r1882053
-          http://svn.apache.org/r1882060
-          http://svn.apache.org/r1883452
-          http://svn.apache.org/r1884551
-     2.4.x patch: svn merge -c 1810233,1827530,1874144,1877262,1878263,1880461,1882053,1882060,1883452,1884551 ^/httpd/httpd/trunk .
-     +1: jailletc36, jorton, minfrin
-
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:

Modified: httpd/httpd/branches/2.4.x/modules/cache/mod_file_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/cache/mod_file_cache.c?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/cache/mod_file_cache.c (original)
+++ httpd/httpd/branches/2.4.x/modules/cache/mod_file_cache.c Sun Jan 17 17:23:37 2021
@@ -380,7 +380,7 @@ static int file_cache_handler(request_re
     return rc;
 }
 
-static command_rec file_cache_cmds[] =
+static const command_rec file_cache_cmds[] =
 {
 AP_INIT_ITERATE("cachefile", cachefilehandle, NULL, RSRC_CONF,
      "A space separated list of files to add to the file handle cache at config time"),

Modified: httpd/httpd/branches/2.4.x/modules/core/mod_so.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/core/mod_so.c?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/core/mod_so.c (original)
+++ httpd/httpd/branches/2.4.x/modules/core/mod_so.c Sun Jan 17 17:23:37 2021
@@ -159,7 +159,7 @@ static const char *dso_load(cmd_parms *c
                             cmd->cmd->name, filename);
     }
     *used_filename = fullname;
-    if (apr_dso_load(modhandlep, fullname, cmd->pool) == APR_SUCCESS) {
+    if (fullname && apr_dso_load(modhandlep, fullname, cmd->pool) == APR_SUCCESS) {
         return NULL;
     }
     if (retry) {

Modified: httpd/httpd/branches/2.4.x/modules/dav/main/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/dav/main/util.c?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/dav/main/util.c (original)
+++ httpd/httpd/branches/2.4.x/modules/dav/main/util.c Sun Jan 17 17:23:37 2021
@@ -101,6 +101,9 @@ DAV_DECLARE(dav_error*) dav_join_error(d
     return dest;
 }
 
+/* ### Unclear if this was designed to be used with an uninitialized
+ * dav_buffer struct, but is used on by dav_lock_get_activelock().
+ * Hence check for pbuf->buf. */
 DAV_DECLARE(void) dav_check_bufsize(apr_pool_t * p, dav_buffer *pbuf,
                                     apr_size_t extra_needed)
 {
@@ -110,7 +113,8 @@ DAV_DECLARE(void) dav_check_bufsize(apr_
 
         pbuf->alloc_len += extra_needed + DAV_BUFFER_PAD;
         newbuf = apr_palloc(p, pbuf->alloc_len);
-        memcpy(newbuf, pbuf->buf, pbuf->cur_len);
+        if (pbuf->buf)
+            memcpy(newbuf, pbuf->buf, pbuf->cur_len);
         pbuf->buf = newbuf;
     }
 }

Modified: httpd/httpd/branches/2.4.x/modules/http2/h2_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http2/h2_util.c?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http2/h2_util.c (original)
+++ httpd/httpd/branches/2.4.x/modules/http2/h2_util.c Sun Jan 17 17:23:37 2021
@@ -113,7 +113,7 @@ void h2_util_camel_case_header(char *s,
     }
 }
 
-/* base64 url encoding ****************************************************************************/
+/* base64 url encoding */
 
 #define N6 (unsigned int)-1
 

Modified: httpd/httpd/branches/2.4.x/modules/http2/h2_util.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http2/h2_util.h?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http2/h2_util.h (original)
+++ httpd/httpd/branches/2.4.x/modules/http2/h2_util.h Sun Jan 17 17:23:37 2021
@@ -96,8 +96,8 @@ typedef int h2_iq_cmp(int i1, int i2, vo
 
 /**
  * Allocate a new queue from the pool and initialize.
- * @param id the identifier of the queue
  * @param pool the memory pool
+ * @param capacity the initial capacity of the queue
  */
 h2_iqueue *h2_iq_create(apr_pool_t *pool, int capacity);
 
@@ -179,7 +179,7 @@ size_t h2_iq_mshift(h2_iqueue *q, int *p
 /**
  * Determine if int is in the queue already
  *
- * @parm q the queue
+ * @param q the queue
  * @param sid the integer id to check for
  * @return != 0 iff sid is already in the queue
  */

Modified: httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c (original)
+++ httpd/httpd/branches/2.4.x/modules/lua/mod_lua.c Sun Jan 17 17:23:37 2021
@@ -1633,7 +1633,7 @@ static const char *register_lua_scope(cm
         return apr_psprintf(cmd->pool,
                             "Scope type of '%s' cannot be used because this "
                             "server does not have threading support "
-                            "(APR_HAS_THREADS)" 
+                            "(APR_HAS_THREADS)",
                             scope);
 #endif
         cfg->vm_scope = AP_LUA_SCOPE_THREAD;
@@ -1644,7 +1644,7 @@ static const char *register_lua_scope(cm
         return apr_psprintf(cmd->pool,
                             "Scope type of '%s' cannot be used because this "
                             "server does not have threading support "
-                            "(APR_HAS_THREADS)" 
+                            "(APR_HAS_THREADS)",
                             scope);
 #endif
         cfg->vm_scope = AP_LUA_SCOPE_SERVER;
@@ -1834,7 +1834,7 @@ static const char *register_authz_provid
 }
 
 
-command_rec lua_commands[] = {
+static const command_rec lua_commands[] = {
 
     AP_INIT_TAKE1("LuaRoot", register_lua_root, NULL, OR_ALL,
                   "Specify the base path for resolving relative paths for mod_lua directives"),

Modified: httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_init.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_init.c?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_init.c (original)
+++ httpd/httpd/branches/2.4.x/modules/ssl/ssl_engine_init.c Sun Jan 17 17:23:37 2021
@@ -320,7 +320,7 @@ apr_status_t ssl_init_Module(apr_pool_t
     }
 #endif
 
-    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01883)
+    ap_log_error(APLOG_MARK, APLOG_INFO, 0, base_server, APLOGNO(01883)
                  "Init: Initialized %s library", MODSSL_LIBRARY_NAME);
 
     /*

Modified: httpd/httpd/branches/2.4.x/modules/ssl/ssl_private.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/ssl/ssl_private.h?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/ssl/ssl_private.h (original)
+++ httpd/httpd/branches/2.4.x/modules/ssl/ssl_private.h Sun Jan 17 17:23:37 2021
@@ -642,10 +642,13 @@ typedef struct {
     const char  *cert_file;
     const char  *cert_path;
     const char  *ca_cert_file;
-    STACK_OF(X509_INFO) *certs; /* Contains End Entity certs */
-    STACK_OF(X509) **ca_certs; /* Contains ONLY chain certs for
-                                * each item in certs.
-                                * (ptr to array of ptrs) */
+    /* certs is a stack of configured cert, key pairs. */
+    STACK_OF(X509_INFO) *certs;
+    /* ca_certs contains ONLY chain certs for each item in certs.
+     * ca_certs[n] is a pointer to the (STACK_OF(X509) *) stack which
+     * holds the cert chain for the 'n'th cert in the certs stack, or
+     * NULL if no chain is configured. */
+    STACK_OF(X509) **ca_certs;
 } modssl_pk_proxy_t;
 
 /** stuff related to authentication that can also be per-dir */

Modified: httpd/httpd/branches/2.4.x/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/log.c?rev=1885612&r1=1885611&r2=1885612&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/log.c (original)
+++ httpd/httpd/branches/2.4.x/server/log.c Sun Jan 17 17:23:37 2021
@@ -1947,8 +1947,8 @@ AP_DECLARE(void) ap_close_piped_log(pipe
 
 AP_DECLARE(const char *) ap_parse_log_level(const char *str, int *val)
 {
-    char *err = "Log level keyword must be one of emerg/alert/crit/error/warn/"
-                "notice/info/debug/trace1/.../trace8";
+    const char *err = "Log level keyword must be one of emerg/alert/crit/error/"
+                      "warn/notice/info/debug/trace1/.../trace8";
     int i = 0;
 
     if (str == NULL)