core: fix SymlinksIfOwnerMatch checking:
(1) Fix Origin checking (PR 36783 - Robert L Mathews)
(2) Check ownership if both FollowSymlinks and SymlinksIfOwnerMatch are set
* lfi is already a pointer in contrast fi which was used before.
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@989124
13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.2.17
+ *) core: check symlink ownership if both FollowSymlinks and
+ SymlinksIfOwnerMatch are set [Nick Kew]
+
+ *) core: fix origin checking in SymlinksIfOwnerMatch
+ PR 36783 [Robert L Mathews <rob-apache.org.bugs tigertech.net>]
+
*) mod_headers: Enable multi-match-and-replace edit option
PR 46594 [Nick Kew]
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * Core: fix symlinks ownership tests
- PR 36783
- Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=632947
- http://svn.apache.org/viewvc?view=revision&revision=633174
- 2.2 patch: trunk patch Works with offset.
- +1: niq, rpluem, jim
-
* mod_proxy_ajp: Don't log error when client disconnects.
Trunk version of patch:
http://svn.apache.org/viewvc?view=rev&revision=986591
/* Save the name from the valid bits. */
savename = (lfi->valid & APR_FINFO_NAME) ? lfi->name : NULL;
- if (opts & OPT_SYM_LINKS) {
+ /* if OPT_SYM_OWNER is unset, we only need to check target accessible */
+ if (!(opts & OPT_SYM_OWNER)) {
if ((res = apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME
| APR_FINFO_LINK), p))
!= APR_SUCCESS) {
* owner of the symlink, then get the info of the target.
*/
if (!(lfi->valid & APR_FINFO_OWNER)) {
- if ((res = apr_stat(&fi, d,
+ if ((res = apr_stat(lfi, d,
lfi->valid | APR_FINFO_LINK | APR_FINFO_OWNER, p))
!= APR_SUCCESS) {
return HTTP_FORBIDDEN;