[Pkg-nagios-devel] Bug#482947: Acknowledgement (check_radius wrongly hardcodes the NAS-IP-Address attribute in its requests)

Josip Rodin joy at debbugs.entuzijast.net
Tue May 27 22:44:36 UTC 2008


tag 482947 patch
thanks

On Mon, May 26, 2008 at 11:32:19AM +0200, Josip Rodin wrote:
> 
> I see that the NAS-Identifier parsing was added by a user:
> 
> http://nagiosplug.svn.sourceforge.net/viewvc/nagiosplug/nagiosplug/trunk/plugins/check_radius.c?r1=690&r2=851&sortby=date
> 
> I guess I'll just write a similar patch for NAS-IP-Address.

Here's a working patch for this.

I've also noticed that the original code for NAS-IP-Address hardcoding
is broken in its error handling - it does "return (ERROR_PC)", which is
meaningless in the context of check_radius.c. That actually seems to be
copy&waste from radiusclient-0.3.2/src/radexample.c. :) I fixed that.

While debugging, I also took the opportunity to decouple the nas-identifier
rc_avpair_add() instance from the initial three, because this is just
bad practice to lump a fourth optional attribute into the same block with
the required attributes, the error handling for which is throwing the same
daft message "Out of Memory?"...

-- 
     2. That which causes joy or happiness.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_radius.c.diff
Type: text/x-diff
Size: 3580 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20080528/08f9d6f8/attachment.diff 


More information about the Pkg-nagios-devel mailing list