From becaf8b6d7151971907ff65f338afa038f021c92 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 5 Nov 2025 04:48:05 +0900 Subject: std: relocate seccomp lookup tables This should enable resolving NativeRule in hst. Signed-off-by: Ophestra --- container/seccomp/hash_test.go | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 container/seccomp/hash_test.go (limited to 'container/seccomp/hash_test.go') diff --git a/container/seccomp/hash_test.go b/container/seccomp/hash_test.go deleted file mode 100644 index b86d49ba..00000000 --- a/container/seccomp/hash_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package seccomp_test - -import ( - "crypto/sha512" - "encoding/hex" - - "hakurei.app/container/seccomp" - "hakurei.app/container/std" -) - -type ( - bpfPreset = struct { - seccomp.ExportFlag - std.FilterPreset - } - bpfLookup map[bpfPreset][sha512.Size]byte -) - -func toHash(s string) [sha512.Size]byte { - if len(s) != sha512.Size*2 { - panic("bad sha512 string length") - } - if v, err := hex.DecodeString(s); err != nil { - panic(err.Error()) - } else if len(v) != sha512.Size { - panic("unreachable") - } else { - return ([sha512.Size]byte)(v) - } -} -- cgit v1.3.1