Skip to content

Commit

Permalink
manager: Make namespace functions noops
Browse files Browse the repository at this point in the history
This is intended to support solbuild being run with rootlesskit in a user
namespace (instead of solbuild itself handling namespaces).

Signed-off-by: Rune Morling <[email protected]>
  • Loading branch information
ermo committed Aug 28, 2024
1 parent 5e9c6d1 commit af53724
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions builder/namespaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
func ConfigureNamespace() error {
slog.Debug("Configuring container namespace")

if err := syscall.Unshare(syscall.CLONE_NEWNS | syscall.CLONE_NEWIPC); err != nil {
return fmt.Errorf("Failed to configure namespace, reason: %w\n", err)
}
// if err := syscall.Unshare(syscall.CLONE_NEWNS | syscall.CLONE_NEWIPC); err != nil {
// return fmt.Errorf("Failed to configure namespace, reason: %w\n", err)
// }

return nil
}
Expand All @@ -37,9 +37,9 @@ func ConfigureNamespace() error {
func DropNetworking() error {
slog.Debug("Dropping container networking")

if err := syscall.Unshare(syscall.CLONE_NEWNET | syscall.CLONE_NEWUTS); err != nil {
return fmt.Errorf("Failed to drop networking capabilities, reason: %w\n", err)
}
// if err := syscall.Unshare(syscall.CLONE_NEWNET | syscall.CLONE_NEWUTS); err != nil {
// return fmt.Errorf("Failed to drop networking capabilities, reason: %w\n", err)
// }

return nil
}

0 comments on commit af53724

Please sign in to comment.