[Pkg-nagios-devel] Bug#721621: Bug#721621: dependency change s/libradiusclient-ng2/libfreeradius-client2

Daniel Pocock daniel at pocock.com.au
Sun Feb 2 21:18:29 UTC 2014


On 02/02/14 21:10, Jan Wagner wrote:
> forwarded 721621 https://github.com/monitoring-plugins/monitoring-plugins/issues/1231
> tags 721621 + upstream
> thanks
>
> Hi Daniel,
>
> Am 02.02.2014 12:25, schrieb Daniel Pocock:
>> On 02/02/14 12:09, Jan Wagner wrote:
>>> I discovered that this is not a drop-in replacement and thus
>>> nagios-plugins-standard has unfortunately no check_radius shipped. As
>>> upstream is not supporting this right now, this has to be implemented
>>> first to switch over to libfreeradius-client2.
>>>
>>> To fix this for now, I'm falling back to libradiusclient-ng2 until we
>>> get support for libfreeradius-client2.
>>>
>> libradiusclient-ng2 may well be orphaned and removed from jessie
>>
>> Please have a look at the patch we applied on the Asterisk package to
>> use freeradius-client, it is very trivial
> I applied the attached patch to the upstream source.
>
> Unfortunately it does not compile clean when building against libfreeradius-client2:
>
> i486-linux-gnu-gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include/ldap -I/usr/include/postgresql -I/usr/include   -DNP_VERSION='"1.5"' -Wall -g -O2 -MT check_radius.o -MD -MP -MF .deps/check_radius.Tpo -c -o check_radius.o check_radius.c
> check_radius.c: In function 'main':
> check_radius.c:148:2: error: unknown type name 'UINT4'
>   UINT4 service;
>   ^
> check_radius.c:152:2: error: unknown type name 'UINT4'
>   UINT4 client_id;

After the line that #includes the new header, you can add a typedef for
UINT4.  For reSIProcate, I use:

typedef UInt32 UINT4;

You may not have UInt32, you may be able to use stdint, e.g.

#include <stdint.h>
typedef uint32_t UINT4;


>   ^
> check_radius.c:196:2: warning: passing argument 6 of 'rc_buildreq' makes pointer from integer without a cast [enabled by default]
>   my_rc_buildreq (&data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval,
>   ^
> In file included from check_radius.c:43:0:
> /usr/include/freeradius-client.h:428:6: note: expected 'char *' but argument is of type 'int'
>  void rc_buildreq(rc_handle *, SEND_DATA *, int, char *, unsigned short, char *, int, int);
>       ^
> check_radius.c:196:2: error: too few arguments to function 'rc_buildreq'
>   my_rc_buildreq (&data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval,
>   ^
> In file included from check_radius.c:43:0:
> /usr/include/freeradius-client.h:428:6: note: declared here
>  void rc_buildreq(rc_handle *, SEND_DATA *, int, char *, unsigned short, char *, int, int);
>       ^

Looks like argument 1 and 6 are new.  They may or may not be needed, if
we are lucky you can just insert 0 for missing arguments and it will
emulate the old behavior but that is not something I would to guess, I
would need to check the API.  Let me know if there is no answer from
upstream and then I can look inside.



More information about the Pkg-nagios-devel mailing list