Skip to content

Commit

Permalink
Merge branch 'nrpe-3.0-RC2' to produce release nrpe v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
John C. Frickson committed Jul 12, 2016
2 parents 62ad3be + 74a7c3d commit 220e194
Show file tree
Hide file tree
Showing 81 changed files with 17,489 additions and 10,877 deletions.
36 changes: 31 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,40 @@ Makefile
config.log
config.status
include/config.h
include/common.h
include/dh.h
init-script
init-script.debian
init-script.suse
nrpe.spec
paths
uninstall
.cproject
.project
nrpe.cbp
nrpe.layout
package/solaris/Makefile
sample-config/nrpe.cfg
sample-config/nrpe.xinetd
src/Makefile
src/check_nrpe
src/nrpe
subst
autom4te.cache/
nbproject/
.settings/
startup/bsd-init
startup/debian-init
startup/default-inetd
startup/default-init
startup/default-service
startup/default-socket
startup/default-socket-svc
startup/default-xinetd
startup/mac-init.plist
startup/mac-inetd.plist
startup/newbsd-init
startup/openbsd-init
startup/openrc-conf
startup/openrc-init
startup/rh-upstart-init
startup/solaris-inetd.xml
startup/solaris-init.xml
startup/tmpfile.conf
startup/upstart-init

57 changes: 56 additions & 1 deletion Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,70 @@
NRPE Changelog
**************

2.16 = xx/xx/xxxx
3.0 = xx/xx/xxxx
-----------------
SECURITY
- Fix for CVE-2014-2913
- Added function to clean the environment before forking. (John Frickson)

ENHANCEMENTS
- Added support for optional config file to check_nrpe. With the new SSL
parameters, the line was getting long. The config file is specified with
--config-file=<path> or -f <path> parameters. The config file must look
like command line options, but the options can be on separate lines. It
MUST NOT include --config-file (-f), --command (-c) or --args (-a). If any
options are in both the config file and on the command line, the command line
options are used.
- make can now add users and groups using "make install-groups-users" (John Frickson)
- Added "nrpe-uninstall" script to the same directory nrpe get installed to (John Frickson)
- Updated code so configure && make will work on AIX, HP-UX, Solaris, OS X.
There should be no errors or warnings. Let me know if any errors or
warning appear (John Frickson)
- Added command-line option to prevent forking, since some of the init
replacements (such as systemd, etc.) don't want daemons to fork (John Frickson)
- Added autoconf macros and additional files to better support multi-platform
config and compile. The default will still set up to install to
/usr/local/nagios but I added a new configure option:
'--enable-install-method=<method>'. If <method> is 'opt', everything will
install to '/opt/nagios'. If <method> is 'os', installation will be to O/S-
and distribution-specific locations, such as /usr/sbin, /usr/lib/nagios,
/etc/nagios, and so on.
- Added additional init and inetd config files to support more systems,
including SuSE, Debian, Slackware, Gentoo, *BSD, AIX, HP-UX, Solaris, OS X.
- Added listen_queue_size as configuration option (Vadim Antipov, Kaspersky Lab)
- Reworked SSL/TLS. See the README.SSL.md file for full info. (John Frickson)
- Added support for version 3 variable sized packets up to 64KB. nrpe will
accept either version from check_nrpe. check_nrpe will try to send a
version 3 packet first, and fall back to version 2. check_nrpe can be forced
to only send version 2 packets if the switch `-2` is used. (John Frickson)
- Added extended timeout syntax in the -t <secs>:<status> format. (ABrist)

FIXES
- Fixed configure to check more places for SSL headers/libs. (John Frickson)
- Added ifdefs for complete_SSL_shutdown to compile without SSL. (Matthew L. Daniel)
- Renamed configure.in to configure.ac and added check for sigaction (John Frickson)
- Replaced all instances of signal() with sigaction() + blocking (John Frickson)
- check_nrpe does not parse passed arguments correctly (John Frickson)
- NRPE should not start if cannot write pid file (John Frickson)
- Fixed out-of-bounds error (return code 255) for some failures (John Frickson)
- Connection Timeout and Connection Refused messages need a new line (Andrew Widdersheim)
- allowed_hosts doesn't work, if one of the hostnames can't be resolved by dns (John Frickson)
- allowed_hosts doesn't work with a hostname resolving to an IPv6 address (John Frickson)
- Return UNKNOWN when issues occur (Andrew Widdersheim)
- NRPE returns OK if check can't be executed (Andrew Widdersheim)
- nrpe 2.15 [regression in Added SRC support on AIX - 2.14] (frphoebus)
- compile nrpe - Solaris 9 doesn't have isblank() (lilo, John Frickson)
- sample configuration for check_load has crazy sample load avg (ernestoongaro)



2.15 - 09/06/2013
-----------------
- Now compiles on HP-UX (Grant Byers)
- Added support for IPv6 (Leo Baltus, Eric Stanley)



2.14 - 12/21/2012
-----------------
- Added configure option to allow bash command substitutions, disabled by default [bug #400] (Eric Stanley)
Expand All @@ -23,13 +74,16 @@ FIXES
- Updated RPM SPEC file to support creating RPMs on AIX (Eric Stanley)
- Updated logging to support compiling on AIX (Eric Stanley)



2.13 - 11/11/2011
-----------------
- Applied Kaspersky Labs supplied patch for extending allowed_hosts (Konstantin Malov)
- Fixed bug in allowed_hosts parsing (Eric Stanley)
- Updated to support compiling on Solaris 10 (thanks to Kevin Pendleton)



2.12 - 03/10/2008
-----------------
- Fix for unterminated multiline plugin (garbage) output (Krzysztof Oledzki)
Expand All @@ -43,6 +97,7 @@ FIXES
- Added --with-log-facility option to control syslog logging (Ryan Ordway and Brian Seklecki)



2.10 - 10/19/2007
-----------------
- Moved PDF docs to docs/ subdirectory, added OpenOffice source document
Expand Down
182 changes: 144 additions & 38 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,73 +13,179 @@ CC=@CC@
CFLAGS=@CFLAGS@ @DEFS@
LDFLAGS=@LDFLAGS@ @LIBS@

INSTALL=@INSTALL@
GREP=@GREP@
EGREP=@EGREP@

prefix=@prefix@
exec_prefix=@exec_prefix@
CFGDIR=@sysconfdir@
CFGDIR=@pkgsysconfdir@
BINDIR=@bindir@
SBINDIR=@sbindir@
LIBEXECDIR=@libexecdir@
INSTALL=@INSTALL@
NAGIOS_INSTALL_OPTS=@NAGIOS_INSTALL_OPTS@
NRPE_INSTALL_OPTS=@NRPE_INSTALL_OPTS@

INIT_DIR=@init_dir@
OPSYS=@opsys@
DIST=@dist_type@
NRPE_USER=@nrpe_user@
NRPE_GROUP=@nrpe_group@
NAGIOS_USER=@nagios_user@
NAGIOS_GROUP=@nagios_group@

INIT_TYPE=@init_type@
INIT_DIR=@initdir@
INIT_OPTS=-o root -g root

INIT_FILE=@initname@
INETD_TYPE=@inetd_type@
INETD_DIR=@inetddir@
INETD_FILE=@inetdname@
SRC_INETD=@src_inetd@
SRC_INIT=@src_init@


default:
@echo;\
echo Please enter 'make [option]' where [option] is one of:;\
echo;\
echo " all builds nrpe and check_nrpe";\
echo " nrpe builds nrpe only";\
echo " check_nrpe builds check_nrpe only";\
echo " install-groups-users add the users and groups if they do not exist";\
echo " install install nrpe and check_nrpe";\
echo " install-plugin install the check_nrpe plugin";\
echo " install-daemon install the nrpe daemon";\
echo " install-config install the nrpe configuration file";\
echo " install-inetd install the startup files for inetd, launchd, etc.";\
echo " install-init install the startup files for init, systemd, etc.";\
echo

all:
cd $(SRC_BASE); $(MAKE) ; cd ..

@echo ""
@echo "*** Compile finished ***"
@echo ""
@echo "If the NRPE daemon and client compiled without any errors, you"
@echo "can continue with the installation or upgrade process."
@echo ""
@echo "Read the PDF documentation (NRPE.pdf) for information on the next"
@echo "steps you should take to complete the installation or upgrade."
@echo ""
cd $(SRC_BASE); $(MAKE)

@echo "";\
echo "*** Compile finished ***";\
echo "";\
echo "You can now continue with the installation or upgrade process.";\
echo "";\
echo "Read the PDF documentation (NRPE.pdf) for information on the next";\
echo "steps you should take to complete the installation or upgrade.";\
echo ""

nrpe:
cd $(SRC_BASE); $(MAKE) ; cd ..
cd $(SRC_BASE); $(MAKE)

check_nrpe:
cd $(SRC_BASE); $(MAKE) ; cd ..

cd $(SRC_BASE); $(MAKE)

install-plugin:
cd $(SRC_BASE) && $(MAKE) $@
cd $(SRC_BASE); $(MAKE) $@

install-daemon:
cd $(SRC_BASE) && $(MAKE) $@
cd $(SRC_BASE); $(MAKE) $@

install:
cd $(SRC_BASE) && $(MAKE) $@
cd $(SRC_BASE); $(MAKE) $@

install-init:
@if test $(SRC_INIT) = unknown; then \
echo No init file to install; \
exit 1; \
fi
@if test $(INIT_TYPE) = upstart; then\
echo $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \
$(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \
echo initctl reload-configuration; \
initctl reload-configuration; \
elif test $(INIT_TYPE) = systemd; then\
echo $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \
$(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \
elif test $(INIT_TYPE) = smf10 -o $(INIT_TYPE) = smf11; then \
echo $(INSTALL) -m 775 -g sys -d $(INIT_DIR);\
$(INSTALL) -m 775 -g sys -d $(INIT_DIR);\
echo $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \
$(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \
echo svccfg import $(INIT_DIR)/$(INIT_FILE); \
svccfg import $(INIT_DIR)/$(INIT_FILE); \
echo "*** Run 'svcadm enable nrpe' to start it"; \
else\
echo $(INSTALL) -m 755 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \
$(INSTALL) -m 755 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \
if test $(INIT_TYPE) = newbsd; then\
if test $(DIST) = openbsd; then\
echo "# nrpe@bsd_enable@=NO" >> /etc/rc.conf;\
echo "nrpe@bsd_enable@=\"-d -c $(CFGDIR)/nrpe.cfg\"" >> /etc/rc.conf;\
echo "Make sure to enable the nrpe daemon";\
else\
echo "nrpe@bsd_enable@=YES" >> /etc/rc.conf;\
echo "nrpe_configfile=$(CFGDIR)/nrpe.cfg" >> /etc/rc.conf;\
fi;\
elif test $(INIT_TYPE) = launchd; then\
launchctl load $(INIT_DIR)/$(INIT_FILE); \
else\
if test -f /sbin/chkconfig ; then \
/sbin/chkconfig nrpe on;\
else\
echo "Make sure to enable the nrpe daemon";\
fi;\
fi;\
fi

install-xinetd:
$(INSTALL) -m 644 sample-config/nrpe.xinetd /etc/xinetd.d/nrpe
install-inetd:
@if test $(SRC_INETD) = unknown; then \
echo No inetd file to install; \
exit 1; \
fi
@if test $(INETD_TYPE) = inetd; then \
$(EGREP) -q "^\W*nrpe\s+" $(INETD_DIR)/$(INETD_FILE) 2>/dev/null || \
cat startup/$(SRC_INETD) >> $(INETD_DIR)/$(INETD_FILE); \
elif test $(INETD_TYPE) = systemd; then \
SRC_INETD_FILE=`echo "$(SRC_INETD)" | sed -e 's/socket/socket-svc/'`; \
echo $(INSTALL) -m 644 startup/$$SRC_INETD_FILE $(INETD_DIR)/$(INIT_FILE); \
$(INSTALL) -m 644 startup/$$SRC_INETD_FILE $(INETD_DIR)/$(INIT_FILE); \
elif test $(INETD_TYPE) = smf10 -o $(INETD_TYPE) = smf11; then \
echo $(INSTALL) -m 775 -g sys -d $(INETD_DIR);\
$(INSTALL) -m 775 -g sys -d $(INETD_DIR);\
echo $(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \
$(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \
$(INSTALL) -m 775 -d $(INETD_DIR);\
echo svccfg import $(INETD_DIR)/$(INETD_FILE); \
svccfg import $(INETD_DIR)/$(INETD_FILE); \
echo "*** Run 'svcadm enable nrpe' to start it"; \
elif test $(INIT_TYPE) = launchd; then\
$(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \
launchctl load $(INETD_DIR)/$(INETD_FILE); \
else\
echo $(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \
$(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \
fi
@$(EGREP) -q "^nrpe[\t ]+@nrpe_port@/tcp" /etc/services || \
echo "***** MAKE SURE 'nrpe @nrpe_port@/tcp' IS IN YOUR /etc/services FILE"

install-daemon-config:
$(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
$(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) sample-config/nrpe.cfg $(DESTDIR)$(CFGDIR)
install-config:
$(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(CFGDIR)
$(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) sample-config/nrpe.cfg $(CFGDIR)

solaris-package:
@if [ `uname -s` != "SunOS" ] ; then \
echo "It is recommended you be running on Solaris to build a Solaris package"; \
else \
cd package/solaris; $(MAKE) build ; $(MAKE) pkg ; cd ../..; \
install-groups-users:
@macros/add_group_user $(DIST) $(NAGIOS_USER) $(NAGIOS_GROUP)
@if test "$(NAGIOS_USER)" != "$(NRPE_USER)" -o "$(NAGIOS_GROUP)" != "$(NRPE_GROUP)"; then\
macros/add_group_user $(DIST) $(NRPE_USER) $(NRPE_GROUP);\
fi

clean:
cd $(SRC_BASE); $(MAKE) $@ ; cd ..
cd package/solaris; $(MAKE) $@ ; cd ../..
cd $(SRC_BASE); $(MAKE) $@; cd ..
rm -f core
rm -f *~ */*~

distclean: clean
cd $(SRC_BASE); $(MAKE) $@ ; cd ..
cd package/solaris; $(MAKE) $@ ; cd ../..
rm -f config.log config.status config.cache nrpe.cfg nrpe.xinetd subst $(SRC_INCLUDE)/config.h init-script init-script.debian init-script.freebsd init-script.suse
rm -f sample-config/*.cfg sample-config/*.xinetd
cd $(SRC_BASE); $(MAKE) $@; cd ..
rm -rf autom4te.cache
rm -f config.log config.status config.cache sample-config/nrpe.cfg $(SRC_INCLUDE)/config.h
rm -f startup/bsd-init startup/debian-init startup/default-init startup/default-inetd
rm -f startup/default-service startup/default-socket startup/default-socket-svc
rm -f startup/default-xinetd startup/mac-init.plist startup/mac-inetd.plist
rm -f startup/newbsd-init startup/openbsd-init startup/openrc-conf
rm -f startup/openrc-init startup/rh-upstart-init startup/solaris-init.xml
rm -f startup/solaris-inetd.xml startup/tmpfile.conf startup/upstart-init
rm -f Makefile

devclean: distclean
Expand Down
Loading

0 comments on commit 220e194

Please sign in to comment.