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

Brian Burkhalter bpb at openjdk.org
Thu May 25 20:16:56 UTC 2023


On Thu, 25 May 2023 19:26:35 GMT, Lance Andersen <lancea 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.
>
> test/jdk/java/nio/file/Path/MacToRealPathWithSM.java line 29:
> 
>> 27:  * @summary Verify UnixPath::toRealPath falls back if no perms on macOS
>> 28:  * @run main/othervm -Djava.security.manager=allow MacToRealPathWithSM MacToRealPath.policy
>> 29:  */
> 
> Any thought given to specifying the policy on the command line and running the test with and without the SecurityManager enabled?

I was following the pattern of how the SM is used in at least some of the other `java.nio` tests. That does not preclude however running with an without.

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

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


More information about the nio-dev mailing list