aboutsummaryrefslogtreecommitdiffstats
path: root/listener/audit.go
diff options
context:
space:
mode:
authorWe-unite <3205135446@qq.com>2024-08-19 19:41:01 +0800
committerWe-unite <3205135446@qq.com>2024-08-22 14:12:01 +0800
commitf9f8f35ccd8b505a827d40f95c52ed039512b79d (patch)
tree241c393f6b865958191df802cd112f26d40dddc4 /listener/audit.go
parentae4957b41156d576e849ec0424edd4d89d8d49f2 (diff)
downloadgodo-f9f8f35ccd8b505a827d40f95c52ed039512b79d.tar.gz
godo-f9f8f35ccd8b505a827d40f95c52ed039512b79d.zip
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.
Diffstat (limited to '')
-rw-r--r--listener/audit.go16
1 files changed, 8 insertions, 8 deletions
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 {
13 // Write netlink response to a file for further analysis or for writing 13 // Write netlink response to a file for further analysis or for writing
14 // tests cases. 14 // tests cases.
15 var diagWriter io.Writer 15 var diagWriter io.Writer
16 if *diag != "" { 16 // if *diag != "" {
17 f, err := os.OpenFile(*diag, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0o600) 17 // f, err := os.OpenFile(*diag, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0o664)
18 if err != nil { 18 // if err != nil {
19 return err 19 // return err
20 } 20 // }
21 defer f.Close() 21 // defer f.Close()
22 diagWriter = f 22 // diagWriter = f
23 } 23 // }
24 24
25 log.Println("starting netlink client") 25 log.Println("starting netlink client")
26 26