Skip to content

Commit fdfa8ce

Browse files
temporary mapping
1 parent 2ebcf45 commit fdfa8ce

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

jail/linux.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,17 @@ func (l *LinuxJail) Command(command []string) *exec.Cmd {
7171
cmd.Stdout = os.Stdout
7272
cmd.Stdin = os.Stdin
7373

74+
l.logger.Debug("os.Getuid()", "os.Getuid()", os.Getuid())
75+
7476
cmd.SysProcAttr = &syscall.SysProcAttr{
7577
Cloneflags: syscall.CLONE_NEWUSER | syscall.CLONE_NEWNET,
7678
UidMappings: []syscall.SysProcIDMap{
77-
{ContainerID: 0, HostID: os.Getuid(), Size: 1},
79+
{ContainerID: 0, HostID: 0, Size: 1},
80+
{ContainerID: 1000, HostID: 1000, Size: 1},
7881
},
7982
GidMappings: []syscall.SysProcIDMap{
80-
{ContainerID: 0, HostID: os.Getgid(), Size: 1},
83+
{ContainerID: 0, HostID: 0, Size: 1},
84+
{ContainerID: 1000, HostID: 1000, Size: 1},
8185
},
8286
}
8387

0 commit comments

Comments
 (0)