diff --git a/build/config.o b/build/config.o index 0b9839b..868d3e6 100644 Binary files a/build/config.o and b/build/config.o differ diff --git a/build/execve_interceptor.o b/build/execve_interceptor.o index 6eb2334..2faf62b 100644 Binary files a/build/execve_interceptor.o and b/build/execve_interceptor.o differ diff --git a/build/intercept.so b/build/intercept.so index 2cd026b..de011b8 100755 Binary files a/build/intercept.so and b/build/intercept.so differ diff --git a/build/rules.o b/build/rules.o index a8df34e..d63b310 100644 Binary files a/build/rules.o and b/build/rules.o differ diff --git a/config/config.yaml b/config/config.yaml deleted file mode 100644 index 89edbfb..0000000 --- a/config/config.yaml +++ /dev/null @@ -1,4 +0,0 @@ -machine_registry: - endpoint: "http://localhost:3001/endpoint" -log: - level: OFF \ No newline at end of file diff --git a/config/execve_rules.json b/config/execve_rules.json deleted file mode 100644 index 362e334..0000000 --- a/config/execve_rules.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "enabled": true, - "rules": [ - { - "cmd": "nvidia-smi", - "type": "warn", - "msg": "在沐曦环境下请执行mx-smi" - }, - { - "cmd": "rm", - "type": "error", - "msg": "Error: rm command is forbidden" - }, - { - "cmd": "pip", - "type": "warn", - "msg": "使用pip安装torch时,请注意使用厂家支持版本", - "args": ["install", "torch"] - }, - { - "cmd": "dirname", - "type": "skip" - }, - { - "cmd": "lesspipe", - "type": "skip" - }, - { - "cmd": "command-not-found", - "type": "skip" - }, - { - "cmd": "dircolors", - "type": "skip" - }, - { - "cmd": "basename", - "type": "skip" - } - ] -} \ No newline at end of file diff --git a/logs/execve.log b/logs/execve.log deleted file mode 100644 index 3935041..0000000 --- a/logs/execve.log +++ /dev/null @@ -1,8 +0,0 @@ -[Sat Apr 12 16:24:43 2025 -] Command: /home/qcqcqc/miniconda3/bin/python -arg[0]: python -arg[1]: -r -[Sat Apr 12 16:25:59 2025 -] Command: /home/qcqcqc/miniconda3/bin/python -arg[0]: python -arg[1]: -r diff --git a/logs/execve_out.log b/logs/execve_out.log deleted file mode 100644 index e69de29..0000000 diff --git a/logs/execve_out.log.2649049.stderr b/logs/execve_out.log.2649049.stderr deleted file mode 100644 index e8a53ac..0000000 --- a/logs/execve_out.log.2649049.stderr +++ /dev/null @@ -1,3 +0,0 @@ -Unknown option: -r -usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ... -Try `python -h' for more information. diff --git a/logs/execve_out.log.2649049.stdout b/logs/execve_out.log.2649049.stdout deleted file mode 100644 index 80fa460..0000000 --- a/logs/execve_out.log.2649049.stdout +++ /dev/null @@ -1,3 +0,0 @@ - [DEBUG][PID 2649049] src/pty_dup.c:88:dupIO(): forkpty result is: 0. - [DEBUG][PID 2649049] src/pty_dup.c:96:dupIO(): Child process ready. -欢迎使用北溟云计算服务! diff --git a/logs/execve_out.log.2651269.stderr b/logs/execve_out.log.2651269.stderr deleted file mode 100644 index e8a53ac..0000000 --- a/logs/execve_out.log.2651269.stderr +++ /dev/null @@ -1,3 +0,0 @@ -Unknown option: -r -usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ... -Try `python -h' for more information. diff --git a/logs/execve_out.log.2651269.stdout b/logs/execve_out.log.2651269.stdout deleted file mode 100644 index fbaa806..0000000 --- a/logs/execve_out.log.2651269.stdout +++ /dev/null @@ -1,3 +0,0 @@ - [DEBUG][PID 2651269] src/pty_dup.c:88:dupIO(): forkpty result is: 0. - [DEBUG][PID 2651269] src/pty_dup.c:96:dupIO(): Child process ready. -欢迎使用北溟云计算服务! diff --git a/test_bash.sh b/test_bash.sh index 2ed47c5..ae56b4c 100755 --- a/test_bash.sh +++ b/test_bash.sh @@ -2,7 +2,7 @@ clear # 清屏,提升体验 -/home/qcqcqc/workspace/bash_go_service/main # 启动go程序 +/home/qcqcqc/workspace/bash_go_service/main # 启动go程序 HOOK_EXEC_PATH=/tmp/exec_hook/intercept.so CONFIG_PATH=/tmp/exec_hook/config