8218418: (fs) Files.createSymbolicLink should use SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (win)

Brian Burkhalter brian.burkhalter at oracle.com
Fri Mar 29 23:49:02 UTC 2019


> On Feb 15, 2019, at 12:24 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
> On 15/02/2019 00:42, Brian Burkhalter wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8218418 <https://bugs.openjdk.java.net/browse/JDK-8218418>
>> 
>> The proposed change below ran without error through the jdk_core tests on Windows. Presumably it is covered sufficiently by test/jdk/java/nio/file/Files/Links.java so the issue could be labelled noreg-other.
> I think the fix looks okay but I think it needs checking in the different configurations (process has the privilege, does not have the privilege, and "developer mode") to be sure. This isn't something we can setup in the jtreg tests.

As detailed in the comments I just added to the issue, I was able to verify in Windows 10 that the flag works as desired: it allows a standard user to create a symbolic link to an entity for which it has permission provided that the SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE flag is present and Developer Mode is enabled. If this flag is not provided or Developer Mode is not enabled, a standard user cannot create a symbolic link. Therefore I think that the patch is good to go as-is.

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190329/83059b80/attachment.html>


More information about the nio-dev mailing list