From af53724ba6633bcea3be97aac40048991e05284f Mon Sep 17 00:00:00 2001 From: Rune Morling Date: Wed, 28 Aug 2024 17:46:22 +0200 Subject: [PATCH] manager: Make namespace functions noops 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 --- builder/namespaces.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builder/namespaces.go b/builder/namespaces.go index 3ab209b..435c421 100644 --- a/builder/namespaces.go +++ b/builder/namespaces.go @@ -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 } @@ -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 }