RFR: 8357425: (fs) SecureDirectoryStream setPermissions should use fchmodat [v3]

Alan Bateman alanb at openjdk.org
Sat May 31 06:29:50 UTC 2025


On Fri, 30 May 2025 18:10:09 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Modify to use the `fchmodat(2)` system call to set permissions where possible to do so. This fixes the problem presented in the issue description.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8357425: Change view used to set directory permissions

Marked as reviewed by alanb (Reviewer).

test/jdk/java/nio/file/DirectoryStream/SecureDS.java line 187:

> 185:         Set<PosixFilePermission> permsDir = getPosixFilePermissions(aDir);
> 186: 
> 187:         SecureDirectoryStream<Path> stream =

If you are doing any more edits then you can change this to use try-with-resources.

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

PR Review: https://git.openjdk.org/jdk/pull/25534#pullrequestreview-2883508197
PR Review Comment: https://git.openjdk.org/jdk/pull/25534#discussion_r2117389959


More information about the nio-dev mailing list