]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1756843, r1897890, r1898731, r1900064, r1900077 from trunk
authorChristophe Jaillet <jailletc36@apache.org>
Thu, 2 Jun 2022 20:02:50 +0000 (20:02 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Thu, 2 Jun 2022 20:02:50 +0000 (20:02 +0000)
   * mod_auth_digest: Fix some missed "strcasecmp <--> ap_cstr_casecmp" conversions
   * mod_dav: fix a typo
   * mod_lua: Avoid "may be uninitialized" warning
   * ab: Fix alignment in an 'if' block.
   * mod_authz_dbd: fix select-groups example, bz 66010

Submitted by: jailletc36, rpluem, rpluem, jailletc36, gbechis
Reviewed by: jailletc36, ylavic, rpluem
Backported by: jailletc36

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

docs/manual/mod/mod_authz_dbd.xml
modules/aaa/mod_auth_digest.c
modules/aaa/mod_authz_dbd.c
modules/dav/main/mod_dav.h
modules/lua/lua_request.c
support/ab.c

index 21f9a9a691f0c41e71731c351b520e2ce8c75150..0cf67361d613e89ecaa6f2988f8b0e3f1363afee 100644 (file)
@@ -70,7 +70,7 @@
 
     <highlight language="config">
 Require dbd-group team
-AuthzDBDQuery "SELECT group FROM authz WHERE user = %s"
+AuthzDBDQuery "SELECT user_group FROM authz WHERE user = %s"
     </highlight>
 
 </section>
index 0f2e996d56b73819b9cb7686c1b3929a651e52e2..791cec2bc7c49f8c5b155f72f6e51ac51b3e55ce 100644 (file)
@@ -557,13 +557,13 @@ static const char *set_qop(cmd_parms *cmd, void *config, const char *op)
 {
     digest_config_rec *conf = (digest_config_rec *) config;
 
-    if (!strcasecmp(op, "none")) {
+    if (!ap_cstr_casecmp(op, "none")) {
         apr_array_clear(conf->qop_list);
         *(const char **)apr_array_push(conf->qop_list) = "none";
         return NULL;
     }
 
-    if (!strcasecmp(op, "auth-int")) {
+    if (!ap_cstr_casecmp(op, "auth-int")) {
         return "AuthDigestQop auth-int is not implemented";
     }
     else if (ap_cstr_casecmp(op, "auth")) {
@@ -614,7 +614,7 @@ static const char *set_nc_check(cmd_parms *cmd, void *config, int flag)
 
 static const char *set_algorithm(cmd_parms *cmd, void *config, const char *alg)
 {
-    if (!strcasecmp(alg, "MD5-sess")) {
+    if (!ap_cstr_casecmp(alg, "MD5-sess")) {
         return "AuthDigestAlgorithm: ERROR: algorithm `MD5-sess' "
                 "is not implemented";
     }
index e1bb6232cf39a3112bfd489273e489805569acdc..5d169e1afbe7b35856f66724b566a9a159d7d250 100644 (file)
@@ -212,7 +212,7 @@ static int authz_dbd_login(request_rec *r, authz_dbd_cfg *cfg,
 static int authz_dbd_group_query(request_rec *r, authz_dbd_cfg *cfg,
                                  apr_array_header_t *groups)
 {
-    /* SELECT group FROM authz WHERE user = %s */
+    /* SELECT user_group FROM authz WHERE user = %s */
     int rv;
     const char *message;
     ap_dbd_t *dbd;
@@ -254,7 +254,7 @@ static int authz_dbd_group_query(request_rec *r, authz_dbd_cfg *cfg,
             else {
                 message = apr_dbd_error(dbd->driver, dbd->handle, rv);
                 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01651)
-                        "authz_dbd in get_row; group query for user=%s [%s]",
+                        "authz_dbd in get_row; user_group query for user=%s [%s]",
                         r->user, message?message:noerror);
                 return HTTP_INTERNAL_SERVER_ERROR;
             }
index 943508135ef8d553cf21d03b7ba3f97d45429c05..198489fe2c544f178f5a6aca256ff98dc2272ff7 100644 (file)
@@ -1419,7 +1419,7 @@ DAV_DECLARE(dav_error *) dav_open_lockdb(request_rec *r,
                                          dav_lockdb **lockdb);
 DAV_DECLARE(void) dav_close_lockdb(dav_lockdb *lockdb);
 DAV_DECLARE(dav_error *) dav_lock_parse_lockinfo(request_rec *r,
-                                                 const dav_resource *resrouce,
+                                                 const dav_resource *resource,
                                                  dav_lockdb *lockdb,
                                                  const apr_xml_doc *doc,
                                                  dav_lock **lock_request);
index 2ec453e86b4d33f8f465f7623dc349af538c5e85..bec85807545193b3780d9a2453442924d1e9011f 100644 (file)
@@ -244,7 +244,8 @@ static int lua_read_body(request_rec *r, const char **rbuf, apr_off_t *size,
     if (ap_should_client_block(r)) {
 
         /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-        apr_off_t    len_read, rpos = 0;
+        apr_off_t    len_read = -1;
+        apr_off_t    rpos = 0;
         apr_off_t length = r->remaining;
         /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
index 3d644f6d5a0901d7bd0d12a13da9d1b536059747..ee3420d389c458f023fc5fb022a0a5fe0851b1a2 100644 (file)
@@ -1825,11 +1825,11 @@ static void test(void)
 
     if (!use_html) {
         printf("Benchmarking %s ", hostname);
-    if (isproxy)
-        printf("[through %s:%d] ", proxyhost, proxyport);
-    printf("(be patient)%s",
-           (heartbeatres ? "\n" : "..."));
-    fflush(stdout);
+        if (isproxy)
+            printf("[through %s:%d] ", proxyhost, proxyport);
+        printf("(be patient)%s",
+               (heartbeatres ? "\n" : "..."));
+        fflush(stdout);
     }
 
     con = xcalloc(concurrency, sizeof(struct connection));