auditctl的规则之后,我想将匹配的记录发送到我的Python脚本进行进一步分析。
以下是涉及的文件:
auditd记录:type=PATH msg=audit(1451011319.268:533): ... type=CWD msg=audit(1451011319.268:533): cwd=”/home/root” type=SYSCALL msg=audit(1451011319.268.230:533): ... key=(null)/etc/audisp/audispd.conf如下所示:q_depth = 80 overflow_action = ignore priority_boost = 4 max_restarts = 10 name_format = HOSTNAME #name = mydomain/etc/audisp/plugin.d/中的audispd插件配置文件:active = yes direction = out path = /usr/bin/python type = always # two args, one is my Python script, the other is the log file args = /var/t/h.py /var/log/audit.log format = string我的
h.py如下所示:# -*- coding: utf-8 -*- import sys print sys.argv[1] ...
然而,我的Python脚本无法从auditd获取任何记录。
我不知道哪里出了问题,请帮帮我!