[PUP-7743] SPIKE Consider replacing Windows CreateSymbolicLink with directory junctions Created: 2017/06/29  Updated: 2018/03/28  Resolved: 2018/03/28

Status: Closed
Project: Puppet
Component/s: Windows
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Ethan Brown Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Epic Link: Windows NTFS and Permissions Improvements
Team: Windows
Method Found: Needs Assessment
QA Risk Assessment: Needs Assessment

 Description   

Puppet currently uses CreateSymbolicLinkW to handle symlink support on Windows at https://github.com/puppetlabs/puppet/blob/f2aa573b887a93fb309c8db039b0914db85187fe/lib/puppet/util/windows/file.rb#L86-L94

However, DeviceIoControl can also be used to create junctions (aka reparse points) that behave similarly, but do not require Administrative tokens.

See:

https://www.codeproject.com/Articles/15633/Manipulating-NTFS-Junction-Points-in-NET
http://www.flexhex.com/docs/articles/hard-links.phtml#junctions

There are some slight differences in behavior that should be carefully weighed. Especially look at https://superuser.com/questions/343074/directory-junction-vs-directory-symbolic-link


Generated at Mon Sep 23 13:10:06 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.