瀏覽代碼

fix: remove fuzz code

Yeuoly 1 年之前
父節點
當前提交
ecc36d815c
共有 1 個文件被更改,包括 7 次插入8 次删除
  1. 7 8
      internal/core/lib/add_seccomp.go

+ 7 - 8
internal/core/lib/add_seccomp.go

@@ -5,7 +5,6 @@ import (
 	"encoding/binary"
 	"fmt"
 	"os"
-	"strconv"
 	"syscall"
 	"unsafe"
 
@@ -16,10 +15,10 @@ import (
 //var allow_syscalls = []int{}
 
 func InitSeccomp() error {
-	disabled_syscall, err := strconv.Atoi(os.Getenv("DISABLE_SYSCALL"))
-	if err != nil {
-		disabled_syscall = -1
-	}
+	// disabled_syscall, err := strconv.Atoi(os.Getenv("DISABLE_SYSCALL"))
+	// if err != nil {
+	// 	disabled_syscall = -1
+	// }
 
 	ctx, err := sg.NewFilter(sg.ActKillProcess)
 	if err != nil {
@@ -32,9 +31,9 @@ func InitSeccomp() error {
 	// }
 
 	for _, syscall := range static.ALLOW_SYSCALLS {
-		if syscall == disabled_syscall {
-			continue
-		}
+		// if syscall == disabled_syscall {
+		// 	continue
+		// }
 		err = ctx.AddRule(sg.ScmpSyscall(syscall), sg.ActAllow)
 		if err != nil {
 			return err