runtime/v2: avoid symlink for bundle work dir on Windows#12949
Draft
chelnak wants to merge 1 commit intocontainerd:mainfrom
Draft
runtime/v2: avoid symlink for bundle work dir on Windows#12949chelnak wants to merge 1 commit intocontainerd:mainfrom
chelnak wants to merge 1 commit intocontainerd:mainfrom
Conversation
Creating symlinks on Windows requires administrator privileges or Developer Mode. Replace the direct os.Symlink/os.Readlink calls with platform-specific helpers: unix keeps the existing symlink behavior, while Windows creates a directory junction using go-winio, which does not require elevated privileges. os.Readlink works for both symlinks and junctions, so resolveWorkLink uses it on both platforms. Fixes "A required privilege is not held by the client" error when creating containerd tasks on Windows without elevated privileges. Signed-off-by: Craig Gumbley <craiggumbley@gmail.com>
edb0e25 to
9ce016c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creating symlinks on Windows requires higher privileges or Developer Mode.
This change replaces the direct
os.Symlink/os.Readlinkcalls with platform-specific helpers: