From: Eric Covener Date: Tue, 29 Nov 2022 18:24:38 +0000 (+0000) Subject: merge r1905229,r1905404 from trunk; X-Git-Tag: 2.4.55-rc1-candidate~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddfd4663dcd327963124b03567dbd1f0880d67f4;p=thirdparty%2Fapache%2Fhttpd.git merge r1905229,r1905404 from trunk; *) 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 --- diff --git a/changes-entries/DAVReadOnly_in_dav_method_propfind.txt b/changes-entries/DAVReadOnly_in_dav_method_propfind.txt new file mode 100644 index 00000000000..b018ae89503 --- /dev/null +++ b/changes-entries/DAVReadOnly_in_dav_method_propfind.txt @@ -0,0 +1,2 @@ + *) mod_dav: Open the lock database read-only when possible. + PR 36636 [Wilson Felipe , manu] diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c index 2cbfc06111a..76d9a518585 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -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 "