Skip to content

Commit b879b15

Browse files
committed
Follow symlinks in MkdirAllAt
See #11910 for details — this potentially fixes a divergence between gVisor and runc behavior where having the `cwd` of the OCI container spec set to a symlink to a folder causes gVisor to exit with this error: ``` running container: starting container: starting root container: starting sandbox: failed to create process working directory "/cwd-folder-name-here": not a directory ```
1 parent d839885 commit b879b15

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/sentry/vfs/vfs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ func (vfs *VirtualFilesystem) MkdirAllAt(ctx context.Context, currentPath string
877877
Root: root,
878878
Start: root,
879879
Path: fspath.Parse(currentPath),
880+
FollowFinalSymlink: true,
880881
}
881882
stat, err := vfs.StatAt(ctx, creds, pop, &StatOptions{Mask: linux.STATX_TYPE})
882883
switch {

0 commit comments

Comments
 (0)