RFR: 8308678: (fs) UnixPath::toRealPath needs additional permissions when running with SM (macOS) [v3]

Alan Bateman alanb at openjdk.org
Fri May 26 08:11:56 UTC 2023


On Thu, 25 May 2023 21:38:25 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> When not resolving links and the case retention algorithm cannot be run due to a security manager being in place with no read permissions for the tree to be traversed, then fall back to the result obtained without case correction.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8308678: Convert test to JUnit 5

src/java.base/unix/classes/sun/nio/fs/UnixPath.java line 785:

> 783:     }
> 784: 
> 785:     private static boolean canRead(UnixPath path) {

You could change this to be an instance method so it's consistent with the checkXXX methods that follow it, then the use site would check it path.canRead().

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14157#discussion_r1206394721


More information about the nio-dev mailing list