You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ra...@apache.org on 2026/09/16 16:41:29 UTC

(logging-log4j2) 01/01: fix: skip symbolic links in PosixViewAttribute unless followLinks is true

This is an automated email from the ASF dual-hosted git repository.

ramanathan1504 pushed a commit to branch posix-view-symlink
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 54d224c30151746f25854540821b46abdda6288d
Author: Ramanathan <ra...@gmail.com>
AuthorDate: Wed Sep 16 22:10:52 2026 +0530

    fix: skip symbolic links in PosixViewAttribute unless followLinks is true
---
 .../core/appender/rolling/action/PosixViewAttributeActionTest.java      | 1 -
 src/changelog/.2.x.x/fix_posix_view_attribute_symlink.xml               | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/PosixViewAttributeActionTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/PosixViewAttributeActionTest.java
index b1e748c562..3c7020f552 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/PosixViewAttributeActionTest.java
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/PosixViewAttributeActionTest.java
@@ -42,7 +42,6 @@ class PosixViewAttributeActionTest {
 
     @Test
     void testSymbolicLinksAreNotFollowed(@TempDir final Path tempDir) throws Exception {
-        // A file outside the scanned directory, that the action must not touch.
         final Path outsider = tempDir.resolve("outsider.txt");
         Files.write(outsider, "secret".getBytes(StandardCharsets.UTF_8));
         Files.setPosixFilePermissions(outsider, PosixFilePermissions.fromString("rw-------"));
diff --git a/src/changelog/.2.x.x/fix_posix_view_attribute_symlink.xml b/src/changelog/.2.x.x/fix_posix_view_attribute_symlink.xml
index 39143a392c..5932830c7b 100644
--- a/src/changelog/.2.x.x/fix_posix_view_attribute_symlink.xml
+++ b/src/changelog/.2.x.x/fix_posix_view_attribute_symlink.xml
@@ -4,5 +4,5 @@
        xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
        type="fixed">
   <issue id="4229" link="https://github.com/apache/logging-log4j2/pull/4229"/>
-  <description format="asciidoc">Stop `PosixViewAttribute` from applying permissions and ownership through symbolic links found in `basePath` unless `followLinks` is set to `true`.</description>
+  <description format="asciidoc">Skip symbolic links in `PosixViewAttribute` unless `followLinks` is `true`</description>
 </entry>