Re: [evlog-dev] Evlog remote forwarding error (Second try)

James Keniston <[email protected]> Wed, 11 Apr 2007 10:35:28 -0700
Newsgroups gmane.linux.kernel.event-logging
Message-ID <OFFDF6B696.0EFB86A9-ON882572BA.005FB4BF-882572BA.0060A1DF@us.ibm.com>
--===============1254657617==
Content-type: multipart/alternative; 
	Boundary="0__=07BBF829DFCC322F8f9e8a93df938690918c07BBF829DFCC322F"
Content-Disposition: inline

--0__=07BBF829DFCC322F8f9e8a93df938690918c07BBF829DFCC322F
Content-type: text/plain; charset=US-ASCII

[email protected] wrote on 04/11/2007 09:07:51
AM:

> Hello,
>
> Thanks for Jim's response in terms of evlog compiling issue.
> Now most functions of evlog work flawlessly.
>
> Here is an error I found after enabling udp/tcp log remote
> forwarding function.
> Uid value in all the forwarded log messages is overwritten by Severity
value:
> ON central log server Node1:
>
> recid=5, size=73, format=STRING, event_type=0x109, facility=LOCAL3,
> severity=CRIT, uid=CRIT, gid=root, pid=26035, pgrp=26035,
> time=Tue 10 Apr 2007 05:01:02 PM PDT, flags=0x0, thread=0xf7fc46c0,
> processor=0, host=node2
> try log forwarding function
>
>
> I have tried, the same issue also exists on evlog rpms from evlog
website.
>
> Which module should I modify to correct this problem?

The problem appears to be in the POSIX_LOG_ENTRY_UID case of
posix_log_memtostr()
in posix1.c.  If the host is a remote host, it should encode the numeric
value of
the uid (as when getpwuid[_r] fails to find a match).  Instead, it encodes
nothing,
and what was in the buffer before (i.e., "CRIT") remains.

BTW, seems like POSIX_LOG_ENTRY_GID should be handled similarly.

> After I fixed it, I can post the patch here.

That'd be great.  Thanks.
Jim

>
> Thanks.
>
> ~
> Tong
>
-------------------------------------------------------------------------
...
> _______________________________________________
> evlog-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/evlog-developers
--0__=07BBF829DFCC322F8f9e8a93df938690918c07BBF829DFCC322F
Content-type: text/html; charset=US-ASCII
Content-Disposition: inline

<html><body>
<p><tt>[email protected] wrote on 04/11/2007 09:07:51 AM:<br>
<br>
&gt; Hello,</tt><br>
<tt>&gt; &nbsp;</tt><br>
<tt>&gt; Thanks for Jim's response in terms of evlog compiling issue.</tt><br>
<tt>&gt; Now most functions of evlog work flawlessly.</tt><br>
<tt>&gt; &nbsp;</tt><br>
<tt>&gt; Here is an error I found after enabling udp/tcp log remote <br>
&gt; forwarding function.</tt><br>
<tt>&gt; Uid value in all the forwarded log messages is overwritten by Severity value:</tt><br>
<tt>&gt; ON central log server Node1:</tt><br>
<tt>&gt; &nbsp;</tt><br>
<tt>&gt; recid=5, size=73, format=STRING, event_type=0x109, facility=LOCAL3,<br>
&gt; severity=CRIT, uid=CRIT, gid=root, pid=26035, pgrp=26035,<br>
&gt; time=Tue 10 Apr 2007 05:01:02 PM PDT, flags=0x0, thread=0xf7fc46c0,<br>
&gt; processor=0, host=node2 </tt><br>
<tt>&gt; try log forwarding function</tt><br>
<tt>&gt; &nbsp;</tt><br>
<tt>&gt; &nbsp;</tt><br>
<tt>&gt; I have tried, the same issue also exists on evlog rpms from evlog website.</tt><br>
<tt>&gt; &nbsp;</tt><br>
<tt>&gt; Which module should I modify to correct this problem?</tt><br>
<br>
<tt>The problem appears to be in the POSIX_LOG_ENTRY_UID case of posix_log_memtostr()</tt><br>
<tt>in posix1.c. &nbsp;If the host is a remote host, it should encode the numeric value of</tt><br>
<tt>the uid (as when getpwuid[_r] fails to find a match). &nbsp;Instead, it encodes nothing,</tt><br>
<tt>and what was in the buffer before (i.e., &quot;CRIT&quot;) remains.</tt><br>
<br>
<tt>BTW, seems like POSIX_LOG_ENTRY_GID should be handled similarly.</tt><br>
<br>
<tt>&gt; After I fixed it, I can post the patch here.</tt><br>
<br>
<tt>That'd be great. &nbsp;Thanks.</tt><br>
<tt>Jim</tt><br>
<br>
<tt>&gt; &nbsp;</tt><br>
<tt>&gt; Thanks.</tt><br>
<tt>&gt; &nbsp;</tt><br>
<tt>&gt; ~</tt><br>
<tt>&gt; Tong</tt><br>
<tt>&gt; &nbsp;-------------------------------------------------------------------------<br>
...<br>
&gt; _______________________________________________<br>
&gt; evlog-developers mailing list<br>
&gt; [email protected]<br>
&gt; <a href="https://lists.sourceforge.net/lists/listinfo/evlog-developers">https://lists.sourceforge.net/lists/listinfo/evlog-developers</a><br>
</tt></body></html>
--0__=07BBF829DFCC322F8f9e8a93df938690918c07BBF829DFCC322F--



--===============1254657617==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--===============1254657617==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
evlog-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/evlog-developers

--===============1254657617==--