diff options
author | arved <arved@FreeBSD.org> | 2004-12-02 14:09:53 +0000 |
---|---|---|
committer | arved <arved@FreeBSD.org> | 2004-12-02 14:09:53 +0000 |
commit | 0e288207e628bc7c6fcd449f9c057a1452c8b874 (patch) | |
tree | 855865b2adf62635e8bb3c0ed2c00900e24adb1e /net-mgmt | |
parent | 6c6a801aa58d1a6fba42f8f06eb391123aa484a3 (diff) | |
download | FreeBSD-ports-0e288207e628bc7c6fcd449f9c057a1452c8b874.zip FreeBSD-ports-0e288207e628bc7c6fcd449f9c057a1452c8b874.tar.gz |
Add the missing patch files from the last commit.
Noticed by: maintainer
Forgotten by: arved
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/nagios-plugins/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/files/patch-check_radius.c | 54 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/files/patch-netutils.c | 47 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/files/patch-netutils.h | 11 |
4 files changed, 113 insertions, 0 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile index a840f71..2df4896 100644 --- a/net-mgmt/nagios-plugins/Makefile +++ b/net-mgmt/nagios-plugins/Makefile @@ -7,6 +7,7 @@ PORTNAME= nagios-plugins PORTVERSION= 1.4.0.a1 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} MASTER_SITE_SUBDIR= nagiosplug diff --git a/net-mgmt/nagios-plugins/files/patch-check_radius.c b/net-mgmt/nagios-plugins/files/patch-check_radius.c new file mode 100644 index 0000000..e9128ce --- /dev/null +++ b/net-mgmt/nagios-plugins/files/patch-check_radius.c @@ -0,0 +1,54 @@ +--- plugins/check_radius.c.orig Fri Aug 22 08:22:38 2003 ++++ plugins/check_radius.c Sat Nov 27 13:25:35 2004 +@@ -102,6 +102,7 @@ + int result; + UINT4 client_id; + char *str; ++ rc_handle *rh; + + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); +@@ -111,31 +112,34 @@ + usage (_("Could not parse arguments\n")); + + str = strdup ("dictionary"); +- if ((config_file && rc_read_config (config_file)) || +- rc_read_dictionary (rc_conf_str (str))) ++ if (config_file) ++ rh = rc_read_config (config_file); ++ else ++ rh = NULL; ++ if (!rh || rc_read_dictionary (rh, rc_conf_str (rh, str))) + die (STATE_UNKNOWN, _("Config file error")); + + service = PW_AUTHENTICATE_ONLY; + +- if (!(rc_avpair_add (&data.send_pairs, PW_SERVICE_TYPE, &service, 0) && +- rc_avpair_add (&data.send_pairs, PW_USER_NAME, username, 0) && +- rc_avpair_add (&data.send_pairs, PW_USER_PASSWORD, password, 0))) ++ if (!(rc_avpair_add (rh, &data.send_pairs, PW_SERVICE_TYPE, &service, -1, 0) && ++ rc_avpair_add (rh, &data.send_pairs, PW_USER_NAME, username, -1, 0) && ++ rc_avpair_add (rh, &data.send_pairs, PW_USER_PASSWORD, password, -1, 0))) + die (STATE_UNKNOWN, _("Out of Memory?")); + + /* + * Fill in NAS-IP-Address + */ + +- if ((client_id = rc_own_ipaddress ()) == 0) ++ if ((client_id = rc_own_ipaddress (rh)) == 0) + return (ERROR_RC); + +- if (rc_avpair_add (&(data.send_pairs), PW_NAS_IP_ADDRESS, &client_id, 0) == ++ if (rc_avpair_add (rh, &(data.send_pairs), PW_NAS_IP_ADDRESS, &client_id, -1, 0) == + NULL) return (ERROR_RC); + +- rc_buildreq (&data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval, ++ rc_buildreq (rh, &data, PW_ACCESS_REQUEST, server, port, (int)timeout_interval, + retries); + +- result = rc_send_server (&data, msg); ++ result = rc_send_server (rh, &data, msg); + rc_avpair_free (data.send_pairs); + if (data.receive_pairs) + rc_avpair_free (data.receive_pairs); diff --git a/net-mgmt/nagios-plugins/files/patch-netutils.c b/net-mgmt/nagios-plugins/files/patch-netutils.c new file mode 100644 index 0000000..3ada9e5 --- /dev/null +++ b/net-mgmt/nagios-plugins/files/patch-netutils.c @@ -0,0 +1,47 @@ +--- plugins/netutils.c.orig Sun Aug 10 08:31:02 2003 ++++ plugins/netutils.c Sat Nov 27 13:10:43 2004 +@@ -97,7 +97,7 @@ + fd_set readfds; + int recv_length = 0; + +- result = my_connect (server_address, server_port, &sd, IPPROTO_TCP); ++ result = nagios_my_connect (server_address, server_port, &sd, IPPROTO_TCP); + if (result != STATE_OK) + return STATE_CRITICAL; + +@@ -175,7 +175,7 @@ + + result = STATE_OK; + +- result = my_connect (server_address, server_port, &sd, proto); ++ result = nagios_my_connect (server_address, server_port, &sd, proto); + if (result != STATE_OK) + return STATE_CRITICAL; + +@@ -227,7 +227,7 @@ + { + int result; + +- result = my_connect (host_name, port, sd, IPPROTO_TCP); ++ result = nagios_my_connect (host_name, port, sd, IPPROTO_TCP); + + return result; + } +@@ -239,7 +239,7 @@ + { + int result; + +- result = my_connect (host_name, port, sd, IPPROTO_UDP); ++ result = nagios_my_connect (host_name, port, sd, IPPROTO_UDP); + + return result; + } +@@ -247,7 +247,7 @@ + + /* opens a tcp or udp connection to a remote host */ + int +-my_connect (const char *host_name, int port, int *sd, int proto) ++nagios_my_connect (const char *host_name, int port, int *sd, int proto) + { + struct addrinfo hints; + struct addrinfo *res; diff --git a/net-mgmt/nagios-plugins/files/patch-netutils.h b/net-mgmt/nagios-plugins/files/patch-netutils.h new file mode 100644 index 0000000..13e4115 --- /dev/null +++ b/net-mgmt/nagios-plugins/files/patch-netutils.h @@ -0,0 +1,11 @@ +--- plugins/netutils.h.orig Sat Aug 9 01:05:17 2003 ++++ plugins/netutils.h Sat Nov 27 13:10:26 2004 +@@ -47,7 +47,7 @@ + + int my_tcp_connect (const char *address, int port, int *sd); + int my_udp_connect (const char *address, int port, int *sd); +-int my_connect (const char *address, int port, int *sd, int proto); ++int nagios_my_connect (const char *address, int port, int *sd, int proto); + + int is_host (const char *); + int is_addr (const char *); |