移动到etc

This commit is contained in:
Pan Qiancheng 2025-04-25 16:49:19 +08:00
parent 231c531553
commit dbccfb6a57
4 changed files with 7 additions and 7 deletions

View File

@ -12,7 +12,7 @@
#include <linux/limits.h> // for PATH_MAX
#include <errno.h>
#define SOCKET_PATH "/tmp/exec_hook/exec.sock"
#define SOCKET_PATH "/etc/exec_hook/exec.sock"
#define MAX_BUF_SIZE 4096
// 函数声明

View File

@ -30,8 +30,8 @@
#else
#define CONFIG_FILE ""
#define LOG_FILE "/tmp/exec_hook/logs/execve.log"
#define LOG_OUT_FILE "/tmp/exec_hook/logs/execve_out.log"
#define LOG_FILE "/etc/exec_hook/logs/execve.log"
#define LOG_OUT_FILE "/etc/exec_hook/logs/execve_out.log"
#endif

View File

@ -4,10 +4,10 @@ clear # 清屏,提升体验
/root/workspace/bash_go_service/main # 启动go程序
HOOK_EXEC_PATH=/tmp/exec_hook/intercept.so
CONFIG_PATH=/tmp/exec_hook/config
HOOK_EXEC_PATH=/etc/exec_hook/intercept.so
CONFIG_PATH=/etc/exec_hook/config
mkdir /tmp/exec_hook
mkdir /etc/exec_hook
rm -rf $HOOK_EXEC_PATH
rm -rf $CONFIG_PATH
cp ./build/intercept.so $HOOK_EXEC_PATH

View File

@ -12,7 +12,7 @@
#include <linux/limits.h> // for PATH_MAX
#include <errno.h>
#define SOCKET_PATH "/tmp/exec_hook/exec.sock"
#define SOCKET_PATH "/etc/exec_hook/exec.sock"
#define MAX_BUF_SIZE 4096
// 函数声明