Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nixpig committed Dec 24, 2024
1 parent 3c36ba5 commit 6550de0
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions container/container_reexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/nixpig/brownie/capabilities"
"github.com/nixpig/brownie/cgroups"
"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"
Expand Down Expand Up @@ -118,11 +118,11 @@ func (c *Container) Reexec() error {
}

// 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,
Expand Down Expand Up @@ -207,11 +207,11 @@ 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)
// }
// }
if c.Spec.Process.IOPriority != nil {
if err := iopriority.SetIOPriority(*c.Spec.Process.IOPriority); err != nil {
return fmt.Errorf("set iop: %w", err)
}
}

if err := syscall.Setuid(int(c.Spec.Process.User.UID)); err != nil {
return fmt.Errorf("set UID: %w", err)
Expand Down

0 comments on commit 6550de0

Please sign in to comment.