update nsca to 2.9.1

switch back to the original version, because icinga's fork of NSCA
has been discontiued

Please note: it is recommended that NCSA-ng is used for new
             installations.

ok sthen@
This commit is contained in:
rpe 2013-05-07 20:14:45 +00:00
parent 2082e94e14
commit b9a4bbce09
4 changed files with 15 additions and 38 deletions

View File

@ -1,23 +1,20 @@
# $OpenBSD: Makefile,v 1.14 2013/03/14 10:28:52 sthen Exp $
# $OpenBSD: Makefile,v 1.15 2013/05/07 20:14:45 rpe Exp $
COMMENT-main= nagios service check acceptor
COMMENT-client= nagios service check acceptor - client
# packaged from Icinga git repo.
VERSION= 2.8pre20100831
DISTNAME= icinga-nsca-${VERSION}
WRKDIST= ${WRKDIR}/icinga-nsca
VERSION= 2.9.1
DISTNAME= nsca-${VERSION}
PKGNAME-main= nsca-${VERSION}
PKGNAME-client= nsca-client-${VERSION}
CATEGORIES= net
REVISION= 4
HOMEPAGE= http://www.nagios.org/
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
MASTER_SITES= http://spacehopper.org/mirrors/
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/}
WANTLIB= c mcrypt>=8
LIB_DEPENDS= security/libmcrypt

View File

@ -1,2 +1,2 @@
SHA256 (icinga-nsca-2.8pre20100831.tar.gz) = 7iDpPeYq/kLV7AApBQrtaerg9/roFfv+JJMSEiKU3NQ=
SIZE (icinga-nsca-2.8pre20100831.tar.gz) = 108995
SHA256 (nsca-2.9.1.tar.gz) = +xI0nlCDjDeVT+iWumoCbAnq7/L5QIUIrX7eU+nqlYA=
SIZE (nsca-2.9.1.tar.gz) = 114107

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_nsca_c,v 1.4 2011/11/12 00:49:49 sthen Exp $
--- src/nsca.c.orig Tue Aug 31 13:47:57 2010
+++ src/nsca.c Sat Nov 12 00:45:12 2011
@@ -28,7 +28,7 @@ char *server_address=NULL;
$OpenBSD: patch-src_nsca_c,v 1.5 2013/05/07 20:14:45 rpe Exp $
--- src/nsca.c.orig Sat May 4 17:40:24 2013
+++ src/nsca.c Sat May 4 17:40:41 2013
@@ -28,7 +28,7 @@ static char server_address[16]="0.0.0.0";
static int socket_timeout=DEFAULT_SOCKET_TIMEOUT;
static int log_facility=LOG_DAEMON;
@ -10,23 +10,3 @@ $OpenBSD: patch-src_nsca_c,v 1.4 2011/11/12 00:49:49 sthen Exp $
static char alternate_dump_file[MAX_INPUT_BUFFER]="/dev/null";
static char command_file[MAX_INPUT_BUFFER]="";
static char password[MAX_INPUT_BUFFER]="";
@@ -381,8 +381,7 @@ static int read_config_file(char *filename){
server_port=strdup(varvalue);
else if(!strcmp(varname,"server_address")){
- strncpy(server_address,varvalue,sizeof(server_address) - 1);
- server_address[sizeof(server_address)-1]='\0';
+ server_address=strdup(varvalue);
}
else if(strstr(input_buffer,"command_file")){
if(strlen(varvalue)>sizeof(command_file)-1){
@@ -778,8 +777,7 @@ static void wait_for_connections(void) {
addrinfo.ai_protocol=IPPROTO_TCP;
if(!server_address || !strlen(server_address)) {
- server_address = NULL;
- addrinfo.ai_flags=AI_PASSIVE;
+ server_address = strdup("0.0.0.0");
}
if (rval = getaddrinfo(server_address, server_port, &addrinfo, &res) != 0) {
syslog(LOG_ERR,"Invalid server_address (%d: %s)",errno,strerror(errno));

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-src_send_nsca_c,v 1.2 2011/08/16 08:35:07 sthen Exp $
--- src/send_nsca.c.orig Tue Aug 31 13:47:57 2010
+++ src/send_nsca.c Thu Apr 21 12:31:16 2011
$OpenBSD: patch-src_send_nsca_c,v 1.3 2013/05/07 20:14:45 rpe Exp $
--- src/send_nsca.c.orig Sat May 4 17:20:12 2013
+++ src/send_nsca.c Sat May 4 17:20:43 2013
@@ -25,7 +25,7 @@ time_t start_time,end_time;
char *server_port=DEFAULT_SERVER_PORT;
int server_port=DEFAULT_SERVER_PORT;
char server_name[MAX_HOST_ADDRESS_LENGTH];
char password[MAX_INPUT_BUFFER]="";
-char config_file[MAX_INPUT_BUFFER]="send_nsca.cfg";
+char config_file[MAX_INPUT_BUFFER]="%%SYSCONFDIR%%/send_nsca.cfg";
char delimiter[2]="\t";
char block_delimiter[2]=BLOCK_DELIMITER;
char received_iv[TRANSMITTED_IV_SIZE];