diff --git a/container/container_init.go b/container/container_init.go index d90b580..c8de447 100644 --- a/container/container_init.go +++ b/container/container_init.go @@ -74,7 +74,6 @@ func (c *Container) Init(reexecCmd string, reexecArgs []string) error { }) } - // FIXME: why does this segfault?? if ns.Type == specs.TimeNamespace { if c.Spec.Linux.TimeOffsets != nil { var tos bytes.Buffer diff --git a/container/container_reexec.go b/container/container_reexec.go index d5466b3..3d46c83 100644 --- a/container/container_reexec.go +++ b/container/container_reexec.go @@ -17,6 +17,7 @@ import ( "github.com/nixpig/brownie/filesystem" "github.com/nixpig/brownie/iopriority" "github.com/nixpig/brownie/scheduler" + "github.com/nixpig/brownie/sysctl" "github.com/nixpig/brownie/terminal" "github.com/opencontainers/runtime-spec/specs-go" "golang.org/x/sys/unix" @@ -117,12 +118,11 @@ func (c *Container) Reexec() error { return err } - // FIXME: why does this segfault?? - // if c.Spec.Linux.Sysctl != nil { - // if err := sysctl.SetSysctl(c.Spec.Linux.Sysctl); err != nil { - // return fmt.Errorf("set sysctl: %w", err) - // } - // } + if c.Spec.Linux.Sysctl != nil { + if err := sysctl.SetSysctl(c.Spec.Linux.Sysctl); err != nil { + return fmt.Errorf("set sysctl: %w", err) + } + } if err := filesystem.MountMaskedPaths( c.Spec.Linux.MaskedPaths, @@ -206,7 +206,6 @@ func (c *Container) Reexec() error { } } - // FIXME: why does this segfault?? if c.Spec.Process.IOPriority != nil { if err := iopriority.SetIOPriority(*c.Spec.Process.IOPriority); err != nil { return fmt.Errorf("set iop: %w", err)