]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
merge r1905229,r1905404 from trunk;
authorEric Covener <covener@apache.org>
Tue, 29 Nov 2022 18:24:38 +0000 (18:24 +0000)
committerEric Covener <covener@apache.org>
Tue, 29 Nov 2022 18:24:38 +0000 (18:24 +0000)
  *) mod_dav: Open the lock database read-only when possible
     2.4.x patch: trunk works

Submitted by: manu
Reviewed by: manu, jailletc36, covener

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

changes-entries/DAVReadOnly_in_dav_method_propfind.txt [new file with mode: 0644]
modules/dav/main/mod_dav.c

diff --git a/changes-entries/DAVReadOnly_in_dav_method_propfind.txt b/changes-entries/DAVReadOnly_in_dav_method_propfind.txt
new file mode 100644 (file)
index 0000000..b018ae8
--- /dev/null
@@ -0,0 +1,2 @@
+  *) mod_dav: Open the lock database read-only when possible.
+     PR 36636 [Wilson Felipe <wfelipe gmail.com>, manu]
index 2cbfc06111af21fbcec9c56c3f264cf3964e03fa..76d9a51858522f7828465c50f667aa32ea97c40c 100644 (file)
@@ -1405,8 +1405,7 @@ static dav_error *dav_gen_supported_live_props(request_rec *r,
     dav_error *err;
 
     /* open lock database, to report on supported lock properties */
-    /* ### should open read-only */
-    if ((err = dav_open_lockdb(r, 0, &lockdb)) != NULL) {
+    if ((err = dav_open_lockdb(r, 1, &lockdb)) != NULL) {
         return dav_push_error(r->pool, err->status, 0,
                               "The lock database could not be opened, "
                               "preventing the reporting of supported lock "
@@ -2171,8 +2170,7 @@ static int dav_method_propfind(request_rec *r)
     apr_pool_create(&ctx.scratchpool, r->pool);
     apr_pool_tag(ctx.scratchpool, "mod_dav-scratch");
 
-    /* ### should open read-only */
-    if ((err = dav_open_lockdb(r, 0, &ctx.w.lockdb)) != NULL) {
+    if ((err = dav_open_lockdb(r, 1, &ctx.w.lockdb)) != NULL) {
         err = dav_push_error(r->pool, err->status, 0,
                              "The lock database could not be opened, "
                              "preventing access to the various lock "