Skip to content

runtime/v2: avoid symlink for bundle work dir on Windows#12949

Draft
chelnak wants to merge 1 commit intocontainerd:mainfrom
chelnak:windows_junctions
Draft

runtime/v2: avoid symlink for bundle work dir on Windows#12949
chelnak wants to merge 1 commit intocontainerd:mainfrom
chelnak:windows_junctions

Conversation

@chelnak
Copy link
Copy Markdown

@chelnak chelnak commented Feb 27, 2026

Creating symlinks on Windows requires higher privileges or Developer Mode.

This change replaces the direct os.Symlink/os.Readlink calls with platform-specific helpers:

  • Unix keeps the existing symlink behavior
  • Windows uses a junction which does not require extra privileges

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>
dmcgowan added a commit to dmcgowan/containerd that referenced this pull request Mar 6, 2026
Signed-off-by: Derek McGowan <derek@mcg.dev>
dmcgowan added a commit to dmcgowan/containerd that referenced this pull request Mar 7, 2026
Signed-off-by: Derek McGowan <derek@mcg.dev>
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Mar 7, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Mar 7, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Mar 7, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Mar 7, 2026
github-actions Bot added a commit to akerouanton/containerd that referenced this pull request Mar 8, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Mar 9, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Mar 10, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Mar 10, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Mar 19, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Mar 19, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Mar 19, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Apr 1, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Apr 4, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Apr 10, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Apr 11, 2026
github-actions Bot added a commit to dmcgowan/containerd that referenced this pull request Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants