From f9f8f35ccd8b505a827d40f95c52ed039512b79d Mon Sep 17 00:00:00 2001 From: We-unite <3205135446@qq.com> Date: Mon, 19 Aug 2024 19:41:01 +0800 Subject: Write documents of the program. Add README.md on the design of the whole program, and how its every part(listener, filter) works, finally how to compile and use them. Besides, notes.md records the things and technology learned in this program, such as how to read kernel src, how the pthread_create/fork/ clone syscall works on processes and threads, the techs used to make docker container works well, and books to be read. Good good study, day day up. --- listener/audit.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'listener/audit.go') diff --git a/listener/audit.go b/listener/audit.go index ed48691..148378c 100644 --- a/listener/audit.go +++ b/listener/audit.go @@ -13,14 +13,14 @@ func read() error { // Write netlink response to a file for further analysis or for writing // tests cases. var diagWriter io.Writer - if *diag != "" { - f, err := os.OpenFile(*diag, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0o600) - if err != nil { - return err - } - defer f.Close() - diagWriter = f - } + // if *diag != "" { + // f, err := os.OpenFile(*diag, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0o664) + // if err != nil { + // return err + // } + // defer f.Close() + // diagWriter = f + // } log.Println("starting netlink client") -- cgit v1.2.3-70-g09d2