<br clear="all">
<div>Hello every one.</div>
<div>My plugin now works well in the debug mode,I.E. using  <u>cat log | ./audisp-example</u> it works well </div>
<div>But it failed when I did not use the debug mode.</div>
<div> </div>
<div> </div>
<div>Here it's the code that I have changed.</div>
<div> </div>
<div>/* This function shows how to dump a whole record's text */<br>static void dump_whole_record(auparse_state_t *au)<br>{<br>    FILE *out; <br>    if((out=fopen("./test.txt","a+"))!=NULL)/*打开源文件,读取数据*/ <br>
    {     <br>      fprintf(out,"%s: %s\n", audit_msg_type_to_name(auparse_get_type(au)),auparse_get_record_text(au));<br>      fclose(in); /*关文件*/<br>    }</div>
<div><br>  // printf("%s: %s\n", audit_msg_type_to_name(auparse_get_type(au)),auparse_get_record_text(au));<br>  //printf("\n");<br>}</div>
<div> </div>
<div> </div>
<div>In the debug mode I'm able to create a test.txt in the current direcory .And write the information into the test.txt</div>
<div>But when I copy the audisp-example to /sbin/,  and copy the configure file audisp-example.conf  to /etc//etc/audisp/plugins.d </div>
<div>restart the auditd, it didnot work.</div>
<div> </div>
<div>Why?</div>
<div>Can anyone help</div>
<div> </div>
<div>  Regards<br clear="all">                                                                         Jeedan<br>-- <br>-----------------------------<br>陈洁丹   北京邮电大学软件学院<br>地 址:  北京邮电大学学二D12寝室<br>邮 编:  100876<br>Email:   <a href="mailto:jeedan.chen@gmail.com">jeedan.chen@gmail.com</a><br>
---------------------------------<br>-- <br>-----------------------------<br>陈洁丹   北京邮电大学软件学院<br>地 址:  北京邮电大学学二D12寝室<br>邮 编:  100876<br>Email:   <a href="mailto:jeedan.chen@gmail.com">jeedan.chen@gmail.com</a><br>---------------------------------<br>
</div>