RFR: 8356493: (fs) SecureDirectoryStream missing some capabilities [v2]

Benjamin Peterson duke at openjdk.org
Thu Sep 4 16:56:47 UTC 2025


On Thu, 4 Sep 2025 15:27:36 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> > Maybe the usability of simple cases would be improved by a `createLink(T link, T target)` overload (that passed `olddirfd=AT_FDCWD` to the underlying syscall)?
> 
> That's a thought. Or maybe have it be the same directory as the link?

That seems unnecessarily restrictive, since `secureStream.createLink(link, secureStream, target)` easily accomplishes that with full-featured overload.

> 
> > I think this may also need a `LinkOption` flag to pass `AT_FOLLOW_SYMLINKS`?
> 
> This method was intended to mirror `File.createLink` which does not have this option.

Probably because `link(2)` always follows symlinks?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26950#discussion_r2322795582


More information about the nio-dev mailing list