From 7f9b64a13d77fd6246e1054a806ca95586b86216 Mon Sep 17 00:00:00 2001 From: "John C. Frickson" Date: Mon, 1 Aug 2016 14:03:44 -0500 Subject: [PATCH 1/7] Change version number from '2.1' to '2.1.0' --- configure | 4 ++-- configure.ac | 4 ++-- src/file2sock.c | 6 +++--- src/log2ndo.c | 6 +++--- src/ndo2db.c | 6 +++--- src/ndomod.c | 8 ++++---- src/sockdebug.c | 6 +++--- update-version | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/configure b/configure index 82140d7..fc6d1f4 100755 --- a/configure +++ b/configure @@ -2464,9 +2464,9 @@ $as_echo "#define DEFAULT_NAGIOS_GROUP nagios" >>confdefs.h PKG_NAME=ndoutils INIT_PROG=ndo2db -PKG_VERSION="2.1" +PKG_VERSION="2.1.0" PKG_HOME_URL="http://www.nagios.org/" -PKG_REL_DATE="07-28-2016" +PKG_REL_DATE="08-01-2016" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do diff --git a/configure.ac b/configure.ac index d7f33e7..1c76506 100644 --- a/configure.ac +++ b/configure.ac @@ -30,9 +30,9 @@ AC_DEFINE([DEFAULT_NAGIOS_GROUP], [nagios], [Default Nagios Group]) PKG_NAME=ndoutils INIT_PROG=ndo2db -PKG_VERSION="2.1" +PKG_VERSION="2.1.0" PKG_HOME_URL="http://www.nagios.org/" -PKG_REL_DATE="07-28-2016" +PKG_REL_DATE="08-01-2016" dnl Figure out how to invoke "install" and what install options to use. AC_PROG_INSTALL diff --git a/src/file2sock.c b/src/file2sock.c index 702b175..c674c53 100644 --- a/src/file2sock.c +++ b/src/file2sock.c @@ -10,7 +10,7 @@ * License: GPL v2 * * First Written: 05-13-2005 - * Last Modified: 07-28-2016 + * Last Modified: 08-01-2016 * * This file is part of NDOUtils. * @@ -31,9 +31,9 @@ #include "../include/common.h" #include "../include/io.h" -#define FILE2SOCK_VERSION "2.1" +#define FILE2SOCK_VERSION "2.1.0" #define FILE2SOCK_NAME "FILE2SOCK" -#define FILE2SOCK_DATE "07-28-2016" +#define FILE2SOCK_DATE "08-01-2016" int process_arguments(int,char **); diff --git a/src/log2ndo.c b/src/log2ndo.c index 2837ce8..0aaffcb 100644 --- a/src/log2ndo.c +++ b/src/log2ndo.c @@ -5,7 +5,7 @@ * Copyright 2009-2014 Nagios Core Development Team and Community Contributors * Copyright 2005-2009 Ethan Galstad * - * Last Modified: 07-28-2016 + * Last Modified: 08-01-2016 * * This file is part of NDOUtils. * @@ -27,9 +27,9 @@ #include "../include/io.h" #include "../include/protoapi.h" -#define LOG2NDO_VERSION "2.1" +#define LOG2NDO_VERSION "2.1.0" #define LOG2NDO_NAME "LOG2NDO" -#define LOG2NDO_DATE "07-28-2016" +#define LOG2NDO_DATE "08-01-2016" diff --git a/src/ndo2db.c b/src/ndo2db.c index bca1739..f1f92e1 100644 --- a/src/ndo2db.c +++ b/src/ndo2db.c @@ -6,7 +6,7 @@ * Copyright 2005-2009 Ethan Galstad * * First Written: 05-19-2005 - * Last Modified: 07-28-2016 + * Last Modified: 08-01-2016 * * This file is part of NDOUtils. * @@ -50,9 +50,9 @@ #include -#define NDO2DB_VERSION "2.1" +#define NDO2DB_VERSION "2.1.0" #define NDO2DB_NAME "NDO2DB" -#define NDO2DB_DATE "07-28-2016" +#define NDO2DB_DATE "08-01-2016" #ifdef HAVE_SSL # if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux) diff --git a/src/ndomod.c b/src/ndomod.c index 54882f2..79773c3 100644 --- a/src/ndomod.c +++ b/src/ndomod.c @@ -5,12 +5,12 @@ * Copyright 2009-2014 Nagios Core Development Team and Community Contributors * Copyright 2005-2009 Ethan Galstad * - * Last Modified: 02-28-2014 + * Last Modified: 08-01-2016 * * This file is part of NDOUtils. * * First Written: 05-19-2005 - * Last Modified: 07-28-2016 + * Last Modified: 08-01-2016 * ***************************************************************************** * NDOUtils is free software: you can redistribute it and/or modify @@ -86,9 +86,9 @@ NEB_API_VERSION(CURRENT_NEB_API_VERSION) -#define NDOMOD_VERSION "2.1" +#define NDOMOD_VERSION "2.1.0" #define NDOMOD_NAME "NDOMOD" -#define NDOMOD_DATE "07-28-2016" +#define NDOMOD_DATE "08-01-2016" #define BD_INT 0 #define BD_TIMEVAL 1 diff --git a/src/sockdebug.c b/src/sockdebug.c index 12e5434..1e608cc 100644 --- a/src/sockdebug.c +++ b/src/sockdebug.c @@ -9,7 +9,7 @@ * Copyright (c) 2005-2009 Ethan Galstad * * First Written: 05-13-2005 - * Last Modified: 07-28-2016 + * Last Modified: 08-01-2016 * * This file is part of NDOUtils. * @@ -28,9 +28,9 @@ #include "../include/config.h" -#define SOCKDEBUG_VERSION "2.1" +#define SOCKDEBUG_VERSION "2.1.0" #define SOCKDEBUG_NAME "SOCKDEBUG" -#define SOCKDEBUG_DATE "07-28-2016" +#define SOCKDEBUG_DATE "08-01-2016" int cleanup_socket(int,char *); diff --git a/update-version b/update-version index 600b311..55bc026 100755 --- a/update-version +++ b/update-version @@ -10,10 +10,10 @@ else fi # Current version number -CURRENTVERSION=2.1 +CURRENTVERSION=2.1.0 # Last date -LASTDATE=07-28-2016 +LASTDATE=08-01-2016 if [ "x$1" = "x" ] then From b915d51d75aced2141aaa0d0bef4cf63bd992f56 Mon Sep 17 00:00:00 2001 From: "John C. Frickson" Date: Mon, 1 Aug 2016 14:22:35 -0500 Subject: [PATCH 2/7] Needed a default '_set_rc' function to prevent getting errors like '_set_rc: command not found' --- startup/default-init.in | 1 + 1 file changed, 1 insertion(+) diff --git a/startup/default-init.in b/startup/default-init.in index 5521381..7302523 100644 --- a/startup/default-init.in +++ b/startup/default-init.in @@ -41,6 +41,7 @@ STAT_MSG="echo -n Checking for ndo2db daemon... " STAT_CMD="status ndo2db" EXIT_CMD="exit" +_set_rc (){ return; } # Source the function library if [ -f /etc/rc.status ]; then From 95214e9ef58f26d422cb1c68de5e1acec1fb6f31 Mon Sep 17 00:00:00 2001 From: "John C. Frickson" Date: Thu, 18 Aug 2016 12:14:21 -0500 Subject: [PATCH 3/7] Removed the alpha/beta quality warning from README --- README | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README b/README index 9121745..535ae85 100644 --- a/README +++ b/README @@ -3,16 +3,6 @@ NDO README ---------- -*************** -!! IMPORTANT !! -*************** -This code is still an alpha/beta quality, so expect problems if you intend to use -it. Make sure that you aren't using it with your only production installation of -Nagios, or it could take down the Nagios process if the NDOMOD module segfaults. -Nagios could segfault silently and you might never know that Nagios crashed... - - - **************** ABOUT THIS ADDON **************** From b21356b1cf48b91ccce38b5f16aee810f0730fb1 Mon Sep 17 00:00:00 2001 From: "John C. Frickson" Date: Thu, 18 Aug 2016 14:36:32 -0500 Subject: [PATCH 4/7] segfault in nagios on reload (SIGHUP) function ndomod_write_active_objects() was being called multiple times, probably causing one instance to walk on memory of the other --- src/ndomod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ndomod.c b/src/ndomod.c index 79773c3..bb6cb86 100644 --- a/src/ndomod.c +++ b/src/ndomod.c @@ -1807,9 +1807,9 @@ int ndomod_broker_data(int event_type, void *data){ case NEBCALLBACK_PROCESS_DATA: - ndomod_write_active_objects(); - procdata=(nebstruct_process_data *)data; + if (procdata->type == NEBTYPE_PROCESS_START) + ndomod_write_active_objects(); { struct ndo_broker_data process_data[] = { From 8aeda204e6f693e477247128fc79aa3fa6d65415 Mon Sep 17 00:00:00 2001 From: "John C. Frickson" Date: Thu, 25 Aug 2016 09:25:07 -0500 Subject: [PATCH 5/7] /usr/lib/tmpfiles.d/ndo2db.conf should have 'd' type, not 'D' --- Changelog | 5 +++++ startup/tmpfile.conf.in | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index bc1fbb3..5d02741 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,11 @@ NDO Utils Changelog =================== +2.1.x - 2016-xx-xx +------------------ +* /usr/lib/tmpfiles.d/ndo2db.conf should have 'd' type, not 'D' (John Frickson) + + 2.1.0 - 2016-08-01 ------------------ * Probable fix for ndo2db not responding & growing queue issue (John Frickson) diff --git a/startup/tmpfile.conf.in b/startup/tmpfile.conf.in index 396d252..88c9eef 100644 --- a/startup/tmpfile.conf.in +++ b/startup/tmpfile.conf.in @@ -1,2 +1,2 @@ #Type Path Mode UID GID Age Argument -D @piddir@ 0755 @ndo2db_user@ @ndo2db_group@ - - +d @piddir@ 0755 @ndo2db_user@ @ndo2db_group@ - - From 9dc46d710263ff2b502443742d9826835d3784c1 Mon Sep 17 00:00:00 2001 From: "John C. Frickson" Date: Wed, 31 Aug 2016 14:52:54 -0500 Subject: [PATCH 6/7] Prep for version 2.1.1-RC1 --- configure | 4 ++-- configure.ac | 4 ++-- src/file2sock.c | 6 +++--- src/log2ndo.c | 6 +++--- src/ndo2db.c | 6 +++--- src/ndomod.c | 8 ++++---- src/sockdebug.c | 6 +++--- update-version | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/configure b/configure index fc6d1f4..c4724f5 100755 --- a/configure +++ b/configure @@ -2464,9 +2464,9 @@ $as_echo "#define DEFAULT_NAGIOS_GROUP nagios" >>confdefs.h PKG_NAME=ndoutils INIT_PROG=ndo2db -PKG_VERSION="2.1.0" +PKG_VERSION="2.1.1-RC1" PKG_HOME_URL="http://www.nagios.org/" -PKG_REL_DATE="08-01-2016" +PKG_REL_DATE="08-31-2016" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do diff --git a/configure.ac b/configure.ac index 1c76506..97b5f50 100644 --- a/configure.ac +++ b/configure.ac @@ -30,9 +30,9 @@ AC_DEFINE([DEFAULT_NAGIOS_GROUP], [nagios], [Default Nagios Group]) PKG_NAME=ndoutils INIT_PROG=ndo2db -PKG_VERSION="2.1.0" +PKG_VERSION="2.1.1-RC1" PKG_HOME_URL="http://www.nagios.org/" -PKG_REL_DATE="08-01-2016" +PKG_REL_DATE="08-31-2016" dnl Figure out how to invoke "install" and what install options to use. AC_PROG_INSTALL diff --git a/src/file2sock.c b/src/file2sock.c index c674c53..e10e338 100644 --- a/src/file2sock.c +++ b/src/file2sock.c @@ -10,7 +10,7 @@ * License: GPL v2 * * First Written: 05-13-2005 - * Last Modified: 08-01-2016 + * Last Modified: 08-31-2016 * * This file is part of NDOUtils. * @@ -31,9 +31,9 @@ #include "../include/common.h" #include "../include/io.h" -#define FILE2SOCK_VERSION "2.1.0" +#define FILE2SOCK_VERSION "2.1.1-RC1" #define FILE2SOCK_NAME "FILE2SOCK" -#define FILE2SOCK_DATE "08-01-2016" +#define FILE2SOCK_DATE "08-31-2016" int process_arguments(int,char **); diff --git a/src/log2ndo.c b/src/log2ndo.c index 0aaffcb..9ecabd4 100644 --- a/src/log2ndo.c +++ b/src/log2ndo.c @@ -5,7 +5,7 @@ * Copyright 2009-2014 Nagios Core Development Team and Community Contributors * Copyright 2005-2009 Ethan Galstad * - * Last Modified: 08-01-2016 + * Last Modified: 08-31-2016 * * This file is part of NDOUtils. * @@ -27,9 +27,9 @@ #include "../include/io.h" #include "../include/protoapi.h" -#define LOG2NDO_VERSION "2.1.0" +#define LOG2NDO_VERSION "2.1.1-RC1" #define LOG2NDO_NAME "LOG2NDO" -#define LOG2NDO_DATE "08-01-2016" +#define LOG2NDO_DATE "08-31-2016" diff --git a/src/ndo2db.c b/src/ndo2db.c index f1f92e1..4366409 100644 --- a/src/ndo2db.c +++ b/src/ndo2db.c @@ -6,7 +6,7 @@ * Copyright 2005-2009 Ethan Galstad * * First Written: 05-19-2005 - * Last Modified: 08-01-2016 + * Last Modified: 08-31-2016 * * This file is part of NDOUtils. * @@ -50,9 +50,9 @@ #include -#define NDO2DB_VERSION "2.1.0" +#define NDO2DB_VERSION "2.1.1-RC1" #define NDO2DB_NAME "NDO2DB" -#define NDO2DB_DATE "08-01-2016" +#define NDO2DB_DATE "08-31-2016" #ifdef HAVE_SSL # if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux) diff --git a/src/ndomod.c b/src/ndomod.c index bb6cb86..4c87de0 100644 --- a/src/ndomod.c +++ b/src/ndomod.c @@ -5,12 +5,12 @@ * Copyright 2009-2014 Nagios Core Development Team and Community Contributors * Copyright 2005-2009 Ethan Galstad * - * Last Modified: 08-01-2016 + * Last Modified: 08-31-2016 * * This file is part of NDOUtils. * * First Written: 05-19-2005 - * Last Modified: 08-01-2016 + * Last Modified: 08-31-2016 * ***************************************************************************** * NDOUtils is free software: you can redistribute it and/or modify @@ -86,9 +86,9 @@ NEB_API_VERSION(CURRENT_NEB_API_VERSION) -#define NDOMOD_VERSION "2.1.0" +#define NDOMOD_VERSION "2.1.1-RC1" #define NDOMOD_NAME "NDOMOD" -#define NDOMOD_DATE "08-01-2016" +#define NDOMOD_DATE "08-31-2016" #define BD_INT 0 #define BD_TIMEVAL 1 diff --git a/src/sockdebug.c b/src/sockdebug.c index 1e608cc..6d5b85a 100644 --- a/src/sockdebug.c +++ b/src/sockdebug.c @@ -9,7 +9,7 @@ * Copyright (c) 2005-2009 Ethan Galstad * * First Written: 05-13-2005 - * Last Modified: 08-01-2016 + * Last Modified: 08-31-2016 * * This file is part of NDOUtils. * @@ -28,9 +28,9 @@ #include "../include/config.h" -#define SOCKDEBUG_VERSION "2.1.0" +#define SOCKDEBUG_VERSION "2.1.1-RC1" #define SOCKDEBUG_NAME "SOCKDEBUG" -#define SOCKDEBUG_DATE "08-01-2016" +#define SOCKDEBUG_DATE "08-31-2016" int cleanup_socket(int,char *); diff --git a/update-version b/update-version index 55bc026..949985f 100755 --- a/update-version +++ b/update-version @@ -10,10 +10,10 @@ else fi # Current version number -CURRENTVERSION=2.1.0 +CURRENTVERSION=2.1.1-RC1 # Last date -LASTDATE=08-01-2016 +LASTDATE=08-31-2016 if [ "x$1" = "x" ] then From 6ce85cad3c2f35889e598c35868789da5afed7af Mon Sep 17 00:00:00 2001 From: "John C. Frickson" Date: Tue, 6 Sep 2016 09:11:18 -0500 Subject: [PATCH 7/7] Prep for release 2.1.1 --- Changelog | 4 ++++ configure | 4 ++-- configure.ac | 4 ++-- src/file2sock.c | 6 +++--- src/log2ndo.c | 6 +++--- src/ndo2db.c | 6 +++--- src/ndomod.c | 8 ++++---- src/sockdebug.c | 6 +++--- update-version | 4 ++-- 9 files changed, 26 insertions(+), 22 deletions(-) diff --git a/Changelog b/Changelog index 5d02741..711a885 100644 --- a/Changelog +++ b/Changelog @@ -4,6 +4,10 @@ NDO Utils Changelog 2.1.x - 2016-xx-xx ------------------ +* Changed version number from '2.1' to '2.1.0' (John Frickson) +* startup/default-init.in needed a default _set_rc function (John Frickson) +* Removed the alpha/beta quality warning from README (John Frickson) +* Fixed a segfault in ndomod when nagios is reloaded (SIGHUP) (John Frickson) * /usr/lib/tmpfiles.d/ndo2db.conf should have 'd' type, not 'D' (John Frickson) diff --git a/configure b/configure index c4724f5..b954a71 100755 --- a/configure +++ b/configure @@ -2464,9 +2464,9 @@ $as_echo "#define DEFAULT_NAGIOS_GROUP nagios" >>confdefs.h PKG_NAME=ndoutils INIT_PROG=ndo2db -PKG_VERSION="2.1.1-RC1" +PKG_VERSION="2.1.1" PKG_HOME_URL="http://www.nagios.org/" -PKG_REL_DATE="08-31-2016" +PKG_REL_DATE="09-06-2016" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do diff --git a/configure.ac b/configure.ac index 97b5f50..5e17d1e 100644 --- a/configure.ac +++ b/configure.ac @@ -30,9 +30,9 @@ AC_DEFINE([DEFAULT_NAGIOS_GROUP], [nagios], [Default Nagios Group]) PKG_NAME=ndoutils INIT_PROG=ndo2db -PKG_VERSION="2.1.1-RC1" +PKG_VERSION="2.1.1" PKG_HOME_URL="http://www.nagios.org/" -PKG_REL_DATE="08-31-2016" +PKG_REL_DATE="09-06-2016" dnl Figure out how to invoke "install" and what install options to use. AC_PROG_INSTALL diff --git a/src/file2sock.c b/src/file2sock.c index e10e338..202b24d 100644 --- a/src/file2sock.c +++ b/src/file2sock.c @@ -10,7 +10,7 @@ * License: GPL v2 * * First Written: 05-13-2005 - * Last Modified: 08-31-2016 + * Last Modified: 09-06-2016 * * This file is part of NDOUtils. * @@ -31,9 +31,9 @@ #include "../include/common.h" #include "../include/io.h" -#define FILE2SOCK_VERSION "2.1.1-RC1" +#define FILE2SOCK_VERSION "2.1.1" #define FILE2SOCK_NAME "FILE2SOCK" -#define FILE2SOCK_DATE "08-31-2016" +#define FILE2SOCK_DATE "09-06-2016" int process_arguments(int,char **); diff --git a/src/log2ndo.c b/src/log2ndo.c index 9ecabd4..c8875ca 100644 --- a/src/log2ndo.c +++ b/src/log2ndo.c @@ -5,7 +5,7 @@ * Copyright 2009-2014 Nagios Core Development Team and Community Contributors * Copyright 2005-2009 Ethan Galstad * - * Last Modified: 08-31-2016 + * Last Modified: 09-06-2016 * * This file is part of NDOUtils. * @@ -27,9 +27,9 @@ #include "../include/io.h" #include "../include/protoapi.h" -#define LOG2NDO_VERSION "2.1.1-RC1" +#define LOG2NDO_VERSION "2.1.1" #define LOG2NDO_NAME "LOG2NDO" -#define LOG2NDO_DATE "08-31-2016" +#define LOG2NDO_DATE "09-06-2016" diff --git a/src/ndo2db.c b/src/ndo2db.c index 4366409..3a03e5f 100644 --- a/src/ndo2db.c +++ b/src/ndo2db.c @@ -6,7 +6,7 @@ * Copyright 2005-2009 Ethan Galstad * * First Written: 05-19-2005 - * Last Modified: 08-31-2016 + * Last Modified: 09-06-2016 * * This file is part of NDOUtils. * @@ -50,9 +50,9 @@ #include -#define NDO2DB_VERSION "2.1.1-RC1" +#define NDO2DB_VERSION "2.1.1" #define NDO2DB_NAME "NDO2DB" -#define NDO2DB_DATE "08-31-2016" +#define NDO2DB_DATE "09-06-2016" #ifdef HAVE_SSL # if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux) diff --git a/src/ndomod.c b/src/ndomod.c index 4c87de0..aab4f19 100644 --- a/src/ndomod.c +++ b/src/ndomod.c @@ -5,12 +5,12 @@ * Copyright 2009-2014 Nagios Core Development Team and Community Contributors * Copyright 2005-2009 Ethan Galstad * - * Last Modified: 08-31-2016 + * Last Modified: 09-06-2016 * * This file is part of NDOUtils. * * First Written: 05-19-2005 - * Last Modified: 08-31-2016 + * Last Modified: 09-06-2016 * ***************************************************************************** * NDOUtils is free software: you can redistribute it and/or modify @@ -86,9 +86,9 @@ NEB_API_VERSION(CURRENT_NEB_API_VERSION) -#define NDOMOD_VERSION "2.1.1-RC1" +#define NDOMOD_VERSION "2.1.1" #define NDOMOD_NAME "NDOMOD" -#define NDOMOD_DATE "08-31-2016" +#define NDOMOD_DATE "09-06-2016" #define BD_INT 0 #define BD_TIMEVAL 1 diff --git a/src/sockdebug.c b/src/sockdebug.c index 6d5b85a..3e905c1 100644 --- a/src/sockdebug.c +++ b/src/sockdebug.c @@ -9,7 +9,7 @@ * Copyright (c) 2005-2009 Ethan Galstad * * First Written: 05-13-2005 - * Last Modified: 08-31-2016 + * Last Modified: 09-06-2016 * * This file is part of NDOUtils. * @@ -28,9 +28,9 @@ #include "../include/config.h" -#define SOCKDEBUG_VERSION "2.1.1-RC1" +#define SOCKDEBUG_VERSION "2.1.1" #define SOCKDEBUG_NAME "SOCKDEBUG" -#define SOCKDEBUG_DATE "08-31-2016" +#define SOCKDEBUG_DATE "09-06-2016" int cleanup_socket(int,char *); diff --git a/update-version b/update-version index 949985f..e20b573 100755 --- a/update-version +++ b/update-version @@ -10,10 +10,10 @@ else fi # Current version number -CURRENTVERSION=2.1.1-RC1 +CURRENTVERSION=2.1.1 # Last date -LASTDATE=08-31-2016 +LASTDATE=09-06-2016 if [ "x$1" = "x" ] then