aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorTilman Keskinoz <arved@FreeBSD.org>2004-12-02 14:09:53 +0000
committerTilman Keskinoz <arved@FreeBSD.org>2004-12-02 14:09:53 +0000
commiteb1556a3dcf38333fdfb9584a05e38bfb5df61e8 (patch)
tree7335913d7f0f71e4de7ce171a520fb1c13e69cc6 /net-mgmt
parentcbc04c1812697b6b111fb5124453439f939489a1 (diff)
downloadports-eb1556a3dcf38333fdfb9584a05e38bfb5df61e8.tar.gz
ports-eb1556a3dcf38333fdfb9584a05e38bfb5df61e8.zip
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/nagios-plugins/Makefile1
-rw-r--r--net-mgmt/nagios-plugins/files/patch-check_radius.c54
-rw-r--r--net-mgmt/nagios-plugins/files/patch-netutils.c47
-rw-r--r--net-mgmt/nagios-plugins/files/patch-netutils.h11
4 files changed, 113 insertions, 0 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile
index a840f712d1de..2df4896b9486 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 000000000000..e9128ce1a4ad
--- /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 000000000000..3ada9e5e4bd1
--- /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 000000000000..13e4115d6429
--- /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 *);