From f4655e64a1461c22ad7a3871375269915a743f40 Mon Sep 17 00:00:00 2001 From: We-unite <3205135446@qq.com> Date: Tue, 6 Aug 2024 14:31:31 +0800 Subject: Expand connector buffer, put all file info into db This commit I make several changes, reasons are as follows: - Expand netlink connector buffer size. Originally it uses only one page of mem, but sometimes it causes "no enough buffer" errno, or the socket is blocked long time. Now it's 20 pages. - All file infos are thrown into database. As the last commit co- mment, There's 2 tables, "fds" and "files". When a file discriptor is closed, the info in fds will be found, delete, and put into the "file" table with its close time. Left questions: - The netlink connector is always found blocked without any reasons. Fix it, or replace the golang-coded connector with C program? The key is why it's blocked. Maybe it's in the kernel src code. - sometimes audit still losts info(not too much). For instance, I use vim in the docker to change hello.c, the hello.c may be opened but no close info recvd. Or, the swap file of vim, such as .hello.c.swp or .hello.c.swx is not closed. What's more, the hello.c is never written, but swap files are. May vim write to swap files, and replace the origin file? Let's check it. - Besides, when a pid exits, we should check its file discriptors and close them all. --- src/netlink | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/netlink') diff --git a/src/netlink b/src/netlink index 10d3ea3..e53c272 160000 --- a/src/netlink +++ b/src/netlink @@ -1 +1 @@ -Subproject commit 10d3ea361f0bcafb9b92054440984d32421aeb7d +Subproject commit e53c2724725c5991cdd9ea088c26832c5c9fcf0d -- cgit v1.2.3-70-g09d2