diff options
author | We-unite <3205135446@qq.com> | 2024-07-29 16:12:27 +0800 |
---|---|---|
committer | We-unite <3205135446@qq.com> | 2024-07-29 16:12:27 +0800 |
commit | 5d244e33672d0dd29a10c40c923c1decd645a1f7 (patch) | |
tree | 3b63adfbe6299477a45d68a4a4a949580eca7114 | |
parent | 0deb0b10c28f72f08c330f183ef64d90405b1358 (diff) | |
download | godo-5d244e33672d0dd29a10c40c923c1decd645a1f7.tar.gz godo-5d244e33672d0dd29a10c40c923c1decd645a1f7.zip |
bug of fds unfixed
-rw-r--r-- | src/deal.go | 5 | ||||
-rw-r--r-- | src/organize.go | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/deal.go b/src/deal.go index 56f6d1d..aaac8c5 100644 --- a/src/deal.go +++ b/src/deal.go | |||
@@ -4,7 +4,6 @@ import ( | |||
4 | "fmt" | 4 | "fmt" |
5 | "sync" | 5 | "sync" |
6 | "syscall" | 6 | "syscall" |
7 | "time" | ||
8 | 7 | ||
9 | "go.mongodb.org/mongo-driver/bson" | 8 | "go.mongodb.org/mongo-driver/bson" |
10 | ) | 9 | ) |
@@ -62,7 +61,7 @@ func deal() { | |||
62 | case EXECVE: | 61 | case EXECVE: |
63 | dealExecve(cooked) | 62 | dealExecve(cooked) |
64 | case PIDEXIT: | 63 | case PIDEXIT: |
65 | go deletePid(cooked) | 64 | deletePid(cooked) |
66 | case FILEOPEN: | 65 | case FILEOPEN: |
67 | fileOpen(cooked) | 66 | fileOpen(cooked) |
68 | case FILEWRITE: | 67 | case FILEWRITE: |
@@ -74,7 +73,7 @@ func deal() { | |||
74 | } | 73 | } |
75 | 74 | ||
76 | func deletePid(cooked Event) { | 75 | func deletePid(cooked Event) { |
77 | time.Sleep(1 * time.Second) | 76 | // time.Sleep(1 * time.Second) |
78 | mongoMutex.Lock() | 77 | mongoMutex.Lock() |
79 | // 先从老爹那里销户 | 78 | // 先从老爹那里销户 |
80 | pidCol.UpdateOne(bson.M{"pid": cooked.ppid}, bson.M{ | 79 | pidCol.UpdateOne(bson.M{"pid": cooked.ppid}, bson.M{ |
diff --git a/src/organize.go b/src/organize.go index f5c9992..d7a1df1 100644 --- a/src/organize.go +++ b/src/organize.go | |||
@@ -47,6 +47,7 @@ func orgnaze() { | |||
47 | break | 47 | break |
48 | } | 48 | } |
49 | rawEvent = raw.(libaudit.RawAuditMessage) | 49 | rawEvent = raw.(libaudit.RawAuditMessage) |
50 | fmt.Printf("type=%v msg=%s\n", rawEvent.Type, rawEvent.Data) | ||
50 | 51 | ||
51 | switch rawEvent.Type { | 52 | switch rawEvent.Type { |
52 | case auparse.AUDIT_SYSCALL: | 53 | case auparse.AUDIT_SYSCALL: |