Skip to content

Commit e0f1f0c

Browse files
Merge pull request #2272 from openshift-cherrypick-robot/cherry-pick-2269-to-release-1.57
[release-1.57] idmap: force PRIVATE propagation
2 parents 2dcbde6 + 22b679b commit e0f1f0c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/idmap/idmapped_utils.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ func CreateIDMappedMount(source, target string, pid int) error {
3333

3434
if err := unix.MountSetattr(targetDirFd, "", unix.AT_EMPTY_PATH|unix.AT_RECURSIVE,
3535
&unix.MountAttr{
36-
Attr_set: unix.MOUNT_ATTR_IDMAP,
37-
Userns_fd: uint64(userNsFile.Fd()),
36+
Attr_set: unix.MOUNT_ATTR_IDMAP,
37+
Userns_fd: uint64(userNsFile.Fd()),
38+
Propagation: unix.MS_PRIVATE,
3839
}); err != nil {
3940
return &os.PathError{Op: "mount_setattr", Path: source, Err: err}
4041
}

0 commit comments

Comments
 (0)