Compare commits
2 Commits
9480a710ee
...
427aaa7713
Author | SHA1 | Date | |
---|---|---|---|
427aaa7713 | |||
5404bda3de |
@ -27,6 +27,7 @@ func Command(name string, arg ...string) (*exec.Cmd, error) {
|
||||
// registered in the command.
|
||||
func Apply(cmd *exec.Cmd) error {
|
||||
uid := os.Getuid()
|
||||
gid := os.Getgid()
|
||||
|
||||
// If the user is already root, there's no need for fakeroot
|
||||
if uid == 0 {
|
||||
@ -59,7 +60,7 @@ func Apply(cmd *exec.Cmd) error {
|
||||
|
||||
cmd.SysProcAttr.GidMappings = append(cmd.SysProcAttr.GidMappings, syscall.SysProcIDMap{
|
||||
ContainerID: 0,
|
||||
HostID: uid,
|
||||
HostID: gid,
|
||||
Size: 1,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user