Skip to content

Commit

Permalink
chore: fix audit error
Browse files Browse the repository at this point in the history
  • Loading branch information
nixpig committed Oct 26, 2024
1 parent 0f6b73e commit d9b8575
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions internal/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,22 +205,22 @@ func (c *Container) Init(opts *InitOpts, log *zerolog.Logger) error {

var unshareFlags uintptr
// TODO: review if this is needed
if c.Spec.Process != nil {
// cloneFlags |= syscall.CLONE_NEWUSER
// unshareFlags |= syscall.CLONE_NEWUSER
//
// uidMappings = append(uidMappings, syscall.SysProcIDMap{
// ContainerID: int(c.Spec.Process.User.UID),
// HostID: os.Geteuid(),
// Size: 1,
// })
//
// gidMappings = append(gidMappings, syscall.SysProcIDMap{
// ContainerID: int(c.Spec.Process.User.GID),
// HostID: os.Getegid(),
// Size: 1,
// })
}
// if c.Spec.Process != nil {
// cloneFlags |= syscall.CLONE_NEWUSER
// unshareFlags |= syscall.CLONE_NEWUSER
//
// uidMappings = append(uidMappings, syscall.SysProcIDMap{
// ContainerID: int(c.Spec.Process.User.UID),
// HostID: os.Geteuid(),
// Size: 1,
// })
//
// gidMappings = append(gidMappings, syscall.SysProcIDMap{
// ContainerID: int(c.Spec.Process.User.GID),
// HostID: os.Getegid(),
// Size: 1,
// })
// }

if c.Spec.Linux.UIDMappings != nil {
for _, uidMapping := range c.Spec.Linux.UIDMappings {
Expand Down

0 comments on commit d9b8575

Please sign in to comment.