]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport to 2.4:
authorGraham Leggett <minfrin@apache.org>
Sun, 17 Jan 2021 17:23:37 +0000 (17:23 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 17 Jan 2021 17:23:37 +0000 (17:23 +0000)
  *) 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

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885612 13f79535-47bb-0310-9956-ffa450edef68

12 files changed:
.gdbinit
CHANGES
STATUS
modules/cache/mod_file_cache.c
modules/core/mod_so.c
modules/dav/main/util.c
modules/http2/h2_util.c
modules/http2/h2_util.h
modules/lua/mod_lua.c
modules/ssl/ssl_engine_init.c
modules/ssl/ssl_private.h
server/log.c

index 25d9ca31d02f107b043b971953cb842692537906..871610b06ab93aa559df77f41cbeb1c9175064c0 100644 (file)
--- a/.gdbinit
+++ b/.gdbinit
@@ -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
diff --git a/CHANGES b/CHANGES
index 79c5868ac7cc2ed435a45b83db2fc05dcc1e3da0..90cd78080da1f7d567891354b4ecc90876a1ecb6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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
diff --git a/STATUS b/STATUS
index e49dcb7ae720acfa6b7de64aabee3a729473cf7a..223ccec8d6a848265d1804b6ab856f6373f32e8b 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -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:
index 4199361861495d1e0ee62f861b63e94fdc0cd36d..ce1db2d2c9347d622e59c468f9b712abbe6c57bd 100644 (file)
@@ -380,7 +380,7 @@ static int file_cache_handler(request_rec *r)
     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"),
index 6eafbe9aeab0ea1acf1f201e14b4192e408098f7..f5d18c17404908a58ef8807119d4547e44182d0f 100644 (file)
@@ -159,7 +159,7 @@ static const char *dso_load(cmd_parms *cmd, apr_dso_handle_t **modhandlep,
                             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) {
index 73076dfa246a38569d84a4c14b5ff170a59bca04..391603420e08f75e05bfa5c0677575606288b74a 100644 (file)
@@ -101,6 +101,9 @@ DAV_DECLARE(dav_error*) dav_join_error(dav_error *dest, dav_error *src)
     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_pool_t * p, dav_buffer *pbuf,
 
         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;
     }
 }
index a00dba4fa736561f5626e2418dfb8cd456d923de..37afb14357e799fad9020d41399d5a9fe59eaa23 100644 (file)
@@ -113,7 +113,7 @@ void h2_util_camel_case_header(char *s, size_t len)
     }
 }
 
-/* base64 url encoding ****************************************************************************/
+/* base64 url encoding */
 
 #define N6 (unsigned int)-1
 
index d182caf03354ee992e50c1a279bae8c0e9c696c0..c96570e550b54d06065800fb8f6607c164f73922 100644 (file)
@@ -96,8 +96,8 @@ typedef int h2_iq_cmp(int i1, int i2, void *ctx);
 
 /**
  * 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 *pint, size_t max);
 /**
  * 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
  */
index 05f1e449eb38ed015a62f39cae2eeb97aedbce03..79d52d2c540ecb021a329687950f8d58810ebf72 100644 (file)
@@ -1633,7 +1633,7 @@ static const char *register_lua_scope(cmd_parms *cmd,
         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(cmd_parms *cmd,
         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_provider(cmd_parms *cmd, void *_cfg,
 }
 
 
-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"),
index 807c8410c383fcc859baaa09b0d2eb6f3cffbb9c..0c3163f05f03095da7728173cda3531ff705902b 100644 (file)
@@ -320,7 +320,7 @@ apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
     }
 #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);
 
     /*
index 9e8bf891631a1aae9fc72d6c71912879c7ef8b29..560c2fadfc8ac7e5cd85c5e0c33e3cfedda09f01 100644 (file)
@@ -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 */
index 374f95d532d60c9c0249813d8854dc0ba21a702e..cc04c38059ba49ea4cc6c84e9d512d7287584e1d 100644 (file)
@@ -1947,8 +1947,8 @@ AP_DECLARE(void) ap_close_piped_log(piped_log *pl)
 
 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)