From c4bc3b080eaf57ed3558200d0ca386e18c2331f7 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 1 Feb 2021 14:30:17 +0100 Subject: [PATCH] Remove "PatchAndLoad" stub as it's not used without seccomp enabled This function is called by `InitSeccomp`, but only when compiled with seccomp (and cgo) enabled, so should not be needed for other situations. Signed-off-by: Sebastiaan van Stijn --- .../seccomp/patchbpf/enosys_unsupported.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/libcontainer/seccomp/patchbpf/enosys_unsupported.go b/libcontainer/seccomp/patchbpf/enosys_unsupported.go index 3312fd655..682131e49 100644 --- a/libcontainer/seccomp/patchbpf/enosys_unsupported.go +++ b/libcontainer/seccomp/patchbpf/enosys_unsupported.go @@ -1,18 +1,3 @@ // +build !linux !cgo !seccomp package patchbpf - -import ( - "errors" - - "github.com/opencontainers/runc/libcontainer/configs" - - libseccomp "github.com/seccomp/libseccomp-golang" -) - -func PatchAndLoad(config *configs.Seccomp, filter *libseccomp.ScmpFilter) error { - if config != nil { - return errors.New("cannot patch and load seccomp filter without runc seccomp support") - } - return nil -}