<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>Thanks.  This is definitely the info I was looking for.<o:p></o:p></span></font></p><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p> </o:p></span></font></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><font size=2 face=Calibri><span style='font-size:11.0pt;font-weight:bold'>From:</span></font></b> Burn Alting <burn.alting@iinet.net.au> <br><b><span style='font-weight:bold'>Sent:</span></b> Saturday, March 18, 2023 9:26 PM<br><b><span style='font-weight:bold'>To:</span></b> Christiansen, Edward - 0992 - MITLL <edwardc@ll.mit.edu>; linux-audit@redhat.com<br><b><span style='font-weight:bold'>Subject:</span></b> Re: run script after auditd rotates logs<o:p></o:p></p></div></div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p> </o:p></span></font></p><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>Ed,<o:p></o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p> </o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>One indirect way of achieving this is to author a script that<o:p></o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>- sends SIGUSR1 to the auditd process (which causes auditd to immediately rotate the logs. It will consult the max_log_file_action to see if it should keep the logs or not.)<o:p></o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>- do whatever you need to do with the rolled over audit.log files<o:p></o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p> </o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>Clearly you only have access to the rolled over log files (given that's what you want).<o:p></o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p> </o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>Rgds<o:p></o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p> </o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p> </o:p></span></font></p></div><div><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'>On Sat, 2023-03-18 at 14:36 +0000, Christiansen, Edward - 0992 - MITLL wrote:<o:p></o:p></span></font></p></div><blockquote style='border:none;border-left:solid #729FCF 1.5pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>I would like to know if there is a way to tell auditd to run a script or <o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>command after it rotates its logs.  I can do this with logrotate, but would <o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>much prefer something native to auditd.  I spent some toime with Google and <o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>found only logrotate solutions.<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>Thanks,<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>Ed Christiansen<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>Millstone Hill SysAdmin<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>--<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>Linux-audit mailing list<o:p></o:p></span></font></pre><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><a href="mailto:Linux-audit@redhat.com"><o:p></o:p></a></span></font></p><pre><u><font size=2 color=blue face="Courier New"><span style='font-size:10.0pt;color:blue'><a href="mailto:Linux-audit@redhat.com">Linux-audit@redhat.com<font color=black><span style='color:windowtext;text-decoration:none'><o:p></o:p></span></font></a></span></font></u></pre><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p> </o:p></span></font></p><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><a href="https://listman.redhat.com/mailman/listinfo/linux-audit"><o:p></o:p></a></span></font></p><pre><u><font size=2 color=blue face="Courier New"><span style='font-size:10.0pt;color:blue'><a href="https://listman.redhat.com/mailman/listinfo/linux-audit">https://listman.redhat.com/mailman/listinfo/linux-audit<font color=black><span style='color:windowtext;text-decoration:none'><o:p></o:p></span></font></a></span></font></u></pre><p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p> </o:p></span></font></p><pre><font size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre></blockquote></div></body></html>