remove debug infomation

This commit is contained in:
criyle 2019-07-14 19:15:23 -07:00
parent beab51c98c
commit 7cebfb4eb8
3 changed files with 5 additions and 5 deletions

View File

@ -297,6 +297,7 @@ func (r *Runner) Start() (int, error) {
// if both seccomp and ptrace is defined, then seccomp filter should have
// traced execve, thus child need parent attached to it first
// actually, this is not effective if pid namespace is unshared
if r.StopBeforeSeccomp || (r.Seccomp != nil && r.Ptrace) {
// Stop to wait for ptrace tracer
_, _, err1 = syscall.RawSyscall(syscall.SYS_KILL, pid, uintptr(syscall.SIGSTOP), 0)

View File

@ -26,7 +26,6 @@ func (h *Handler) CheckRead(fn string) runprogram.TraceAction {
// CheckWrite checks whether the file have write permission
func (h *Handler) CheckWrite(fn string) runprogram.TraceAction {
fmt.Println("write: ", fn)
if !h.FileSet.IsWritableFile(fn) {
return h.onDgsFileDetect(fn)
}

View File

@ -42,7 +42,7 @@ func (r *RunUnshared) Start() (rt tracer.TraceResult, err error) {
WorkDir: r.WorkDir,
Seccomp: bpf,
NoNewPrivs: true,
StopBeforeSeccomp: true,
StopBeforeSeccomp: false,
UnshareFlags: UnshareFlags,
Mounts: r.Mounts,
PivotRoot: r.Root,
@ -87,11 +87,11 @@ func (r *RunUnshared) Trace(runner *forkexec.Runner) (result tracer.TraceResult,
result.RunningTime = time.Now().UnixNano() - fTime
}()
// currently, we do not have any way to track mount syscall time usage
fTime = time.Now().UnixNano()
for {
pid, err := unix.Wait4(pgid, &wstatus, unix.WALL, &rusage)
if fTime == 0 {
fTime = time.Now().UnixNano()
}
r.println("wait4: ", wstatus)
if err != nil {
return result, tracer.TraceCodeFatal