<br><tt><font size=2>Steve Grubb <sgrubb@redhat.com> wrote on 11/09/2007
12:56:41 PM:<br>
<br>
> On Friday 09 November 2007 12:15:43 klausk@br.ibm.com wrote:<br>
> > Trying to debug this problem, I saw that it's happening because
the record<br>
> > 'machine' field in the auparse internal structure is set to '-1':<br>
> <br>
> That would do it. Now...how did that happen? arch says its a 64 bit
S390 <br>
> machine.<br>
> </font></tt>
<br><tt><font size=2>From ellist.c, function parse_up_record():</font></tt>
<br><tt><font size=2>               
        } else if(r->nv.cnt == 2 && strcmp(n.name,
"arch")== 0){</font></tt>
<br><tt><font size=2>               
                unsigned int ival;</font></tt>
<br><tt><font size=2>               
                errno = 0;</font></tt>
<br><tt><font size=2>               
                ival = strtoul(n.val,
NULL, 16);</font></tt>
<br><tt><font size=2>               
                if (errno) </font></tt>
<br><tt><font size=2>               
                     
  r->machine = -1;</font></tt>
<br><tt><font size=2>               
                r->machine =
audit_elf_to_machine(ival);</font></tt>
<br><tt><font size=2>               
        } else if(r->nv.cnt == 3 && strcmp(n.name,</font></tt>
<br><tt><font size=2>               
                     
                  "syscall")
== 0){</font></tt>
<br><tt><font size=2>               
                errno = 0;</font></tt>
<br><tt><font size=2>               
                r->syscall =
strtoul(n.val, NULL, 10);</font></tt>
<br><tt><font size=2>               
                if (errno)</font></tt>
<br><tt><font size=2>               
                     
  r->syscall = -1;</font></tt>
<br>
<br><tt><font size=2>See that 'r->machine' and 'r->syscall' are only
filled when the 'arch' field in found in the 2nd position, and syscall
in the 3rd position respectively. That is not true when the dispatcher
is appending a 'node=' field to each record.</font></tt>
<br>
<br><tt><font size=2>I just confirmed this behavior by setting 'name_format
= NONE' in the audispd configuration, and then I was capable of seeing
the 'arch=' field correctly interpreted to 's390x'</font></tt>
<br>
<br><tt><font size=2>I would provide a patch myself, but I'm not sure why
you need to check the field position in this function (I mean, if the field
is arch=, wouldn't it be interpreted no matter what position it is?)</font></tt>
<br>
<br><tt><font size=2>Thoughts?</font></tt>
<br>
<br><tt><font size=2> Thanks,</font></tt>
<br><tt><font size=2> Klaus</font></tt>
<br><font size=2 face="sans-serif">-- <br>
Klaus Heinrich Kiwi/Brazil/IBM <klausk@br.ibm.com><br>
Software Engineer<br>
IBM STG, Linux Technology Center<br>
Phone:(+55-19) 2132-1909 [T/L 839-1909]</font>
<br>