(RADIATOR) Null characters at end of syslog lines

Jan Tomasek jan at tomasek.cz
Thu Feb 22 02:58:17 CST 2007


Hello Hugh,
> As far as I can see in the code in "Radius/AuthLogSYSLOG.pm", Radiator
> simply passes its normal log strings to the Sys::Syslog module.
> 
> I am therefore guessing that the extra terminating characters are being
> added at a lower level than Radiator.

I tried to print into file just before calling syslog in
AuthLogSYSLOG.pm and strings don't contain those null characters.

Simple script:

openlog('radius', 'pid', 'local7');
syslog('local7|info', 'ahoj');
closelog();

also produces them:

Feb 22 09:36:40 radius1 radius[20733]: ahoj ^@
Feb 22 09:36:42 radius1 radius[20734]: ahoj ^@

> A NULL at the end of a string is typical C/UNIX behaviour.

Tell that to grep, it is unhappy of that and complain about "Binary file
matches" and I'm unhappy of logfiles "compressed" in this way ;) agument
--text "solves" greps problems but I would prefer something like
removing those characters :)

> I don't know if this is configurable or not.

It seams to be bug somewhere in Sys::Syslog. I need to dig deeper.


> I'll ask Mike and let you know.

Thanks. I will inform you if I will discover reason...


Best regards
-- 
-----------------------
Jan Tomasek aka Semik
http://www.tomasek.cz/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://www.open.com.au/pipermail/radiator/attachments/20070222/82c3a2c3/attachment.bin>


More information about the radiator mailing list