diff options
author | Jan Wagner <waja@cyconet.org> | 2016-11-05 16:22:39 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2016-11-15 22:21:40 (GMT) |
commit | 2c898cf23f10962fe63ba15904c57fd63962e346 (patch) | |
tree | e79862d5826ab8cd4e1322f5f9f099eb934ebcb6 /plugins | |
parent | 2f845e9ebc2b7bcf6472e0191752215d351e4e7c (diff) | |
download | monitoring-plugins-2c898cf23f10962fe63ba15904c57fd63962e346.tar.gz |
This patch adds support for using the readcli lib.
http://radcli.github.io/radcli/
(Closes #1437)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_radius.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/check_radius.c b/plugins/check_radius.c index 03cbb8b..43dffad 100644 --- a/plugins/check_radius.c +++ b/plugins/check_radius.c | |||
@@ -36,7 +36,9 @@ const char *email = "devel@monitoring-plugins.org"; | |||
36 | #include "utils.h" | 36 | #include "utils.h" |
37 | #include "netutils.h" | 37 | #include "netutils.h" |
38 | 38 | ||
39 | #if defined(HAVE_LIBFREERADIUS_CLIENT) | 39 | #if defined(HAVE_LIBRADCLI) |
40 | #include <radcli/radcli.h> | ||
41 | #elif defined(HAVE_LIBFREERADIUS_CLIENT) | ||
40 | #include <freeradius-client.h> | 42 | #include <freeradius-client.h> |
41 | #elif defined(HAVE_LIBRADIUSCLIENT_NG) | 43 | #elif defined(HAVE_LIBRADIUSCLIENT_NG) |
42 | #include <radiusclient-ng.h> | 44 | #include <radiusclient-ng.h> |
@@ -48,10 +50,10 @@ int process_arguments (int, char **); | |||
48 | void print_help (void); | 50 | void print_help (void); |
49 | void print_usage (void); | 51 | void print_usage (void); |
50 | 52 | ||
51 | #if defined(HAVE_LIBFREERADIUS_CLIENT) || defined(HAVE_LIBRADIUSCLIENT_NG) | 53 | #if defined(HAVE_LIBFREERADIUS_CLIENT) || defined(HAVE_LIBRADIUSCLIENT_NG) || defined(HAVE_LIBRADCLI) |
52 | #define my_rc_conf_str(a) rc_conf_str(rch,a) | 54 | #define my_rc_conf_str(a) rc_conf_str(rch,a) |
53 | #define my_rc_send_server(a,b) rc_send_server(rch,a,b) | 55 | #define my_rc_send_server(a,b) rc_send_server(rch,a,b) |
54 | #ifdef HAVE_LIBFREERADIUS_CLIENT | 56 | #if defined(HAVE_LIBFREERADIUS_CLIENT) || defined(HAVE_LIBRADCLI) |
55 | #define my_rc_buildreq(a,b,c,d,e,f) rc_buildreq(rch,a,b,c,d,(a)->secret,e,f) | 57 | #define my_rc_buildreq(a,b,c,d,e,f) rc_buildreq(rch,a,b,c,d,(a)->secret,e,f) |
56 | #else | 58 | #else |
57 | #define my_rc_buildreq(a,b,c,d,e,f) rc_buildreq(rch,a,b,c,d,e,f) | 59 | #define my_rc_buildreq(a,b,c,d,e,f) rc_buildreq(rch,a,b,c,d,e,f) |
@@ -76,7 +78,7 @@ void print_usage (void); | |||
76 | 78 | ||
77 | int my_rc_read_config(char *); | 79 | int my_rc_read_config(char *); |
78 | 80 | ||
79 | #if defined(HAVE_LIBFREERADIUS_CLIENT) || defined(HAVE_LIBRADIUSCLIENT_NG) | 81 | #if defined(HAVE_LIBFREERADIUS_CLIENT) || defined(HAVE_LIBRADIUSCLIENT_NG) || defined(HAVE_LIBRADCLI) |
80 | rc_handle *rch = NULL; | 82 | rc_handle *rch = NULL; |
81 | #endif | 83 | #endif |
82 | 84 | ||
@@ -399,7 +401,7 @@ print_usage (void) | |||
399 | 401 | ||
400 | int my_rc_read_config(char * a) | 402 | int my_rc_read_config(char * a) |
401 | { | 403 | { |
402 | #if defined(HAVE_LIBFREERADIUS_CLIENT) || defined(HAVE_LIBRADIUSCLIENT_NG) | 404 | #if defined(HAVE_LIBFREERADIUS_CLIENT) || defined(HAVE_LIBRADIUSCLIENT_NG) || defined(HAVE_LIBRADCLI) |
403 | rch = rc_read_config(a); | 405 | rch = rc_read_config(a); |
404 | return (rch == NULL) ? 1 : 0; | 406 | return (rch == NULL) ? 1 : 0; |
405 | #else | 407 | #else |