From 9f6081db9a1785606320dcd0a08faad946981186 Mon Sep 17 00:00:00 2001 From: criyle Date: Sun, 30 Jun 2019 23:43:15 -0700 Subject: [PATCH] fix arm64 compiler --- cmd/run_program/main.go | 2 +- runconfig/config_arm64.go | 4 +++- runprogram/handle.go | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/run_program/main.go b/cmd/run_program/main.go index 60e4c2a..92cd046 100644 --- a/cmd/run_program/main.go +++ b/cmd/run_program/main.go @@ -91,7 +91,7 @@ func main() { runner := &runprogram.RunProgram{ Args: h.Args, - Env: []string{"PATH=/"}, + Env: []string{"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}, WorkDir: workPath, RLimits: runprogram.RLimits{ CPU: timeLimit, diff --git a/runconfig/config_arm64.go b/runconfig/config_arm64.go index bb5a3ed..f453a41 100644 --- a/runconfig/config_arm64.go +++ b/runconfig/config_arm64.go @@ -8,7 +8,9 @@ var ( "/usr/lib/aarch64-linux-gnu/", } - archSyscallAllows = []string{} + archSyscallAllows = []string{ + "newfstatat", + } archSyscallTraces = []string{} ) diff --git a/runprogram/handle.go b/runprogram/handle.go index 845da89..4e25c8b 100644 --- a/runprogram/handle.go +++ b/runprogram/handle.go @@ -79,7 +79,7 @@ func (h *tracerHandler) Handle(ctx *tracer.Context) tracer.TraceAction { case "access": action = h.checkStat(ctx, ctx.Arg0()) - case "faccessat": + case "faccessat", "newfstatat": action = h.checkStat(ctx, ctx.Arg1()) case "stat", "stat64":