diff --git a/nrpe-0003-Include-etc-npre.d-config-directory.patch b/nrpe-0003-Include-etc-npre.d-config-directory.patch index 96145a4..17ec192 100644 --- a/nrpe-0003-Include-etc-npre.d-config-directory.patch +++ b/nrpe-0003-Include-etc-npre.d-config-directory.patch @@ -1,7 +1,19 @@ diff -up ./sample-config/nrpe.cfg.in.include_etc_npre_d ./sample-config/nrpe.cfg.in --- ./sample-config/nrpe.cfg.in.include_etc_npre_d 2017-05-24 10:35:00.000000000 -0400 -+++ ./sample-config/nrpe.cfg.in 2017-07-05 14:54:25.260642245 -0400 -@@ -57,6 +57,7 @@ server_port=@nrpe_port@ ++++ ./sample-config/nrpe.cfg.in 2017-07-11 11:33:22.600300225 -0400 +@@ -47,7 +47,10 @@ pid_file=@piddir@/nrpe.pid + # PORT NUMBER + # Port number we should wait for connections on. + # NOTE: This must be a non-privileged port (i.e. > 1024). +-# NOTE: This option is ignored if NRPE is running under either inetd or xinetd ++# NOTE: This option is ignored if NRPE is running under either inetd ++# or xinetd or via systemd. [In systemd please use ++# systemctl edit nrpe.service ++# to set up the port. + + server_port=@nrpe_port@ + +@@ -57,6 +60,7 @@ server_port=@nrpe_port@ # Address that nrpe should bind to in case there are more than one interface # and you do not want nrpe to bind on all interfaces. # NOTE: This option is ignored if NRPE is running under either inetd or xinetd @@ -9,7 +21,41 @@ diff -up ./sample-config/nrpe.cfg.in.include_etc_npre_d ./sample-config/nrpe.cfg #server_address=127.0.0.1 -@@ -269,15 +270,6 @@ connection_timeout=300 +@@ -74,7 +78,10 @@ server_port=@nrpe_port@ + # This determines the effective user that the NRPE daemon should run as. + # You can either supply a username or a UID. + # +-# NOTE: This option is ignored if NRPE is running under either inetd or xinetd ++# NOTE: This option is ignored if NRPE is running under either inetd ++# or xinetd or via systemd. [In systemd please use ++# systemctl edit nrpe.service ++# to set up the group. + + nrpe_user=@nrpe_user@ + +@@ -84,7 +91,10 @@ nrpe_user=@nrpe_user@ + # This determines the effective group that the NRPE daemon should run as. + # You can either supply a group name or a GID. + # +-# NOTE: This option is ignored if NRPE is running under either inetd or xinetd ++# NOTE: This option is ignored if NRPE is running under either inetd ++# or xinetd or via systemd. [In systemd please use ++# systemctl edit nrpe.service ++# to set up the user. + + nrpe_group=@nrpe_group@ + +@@ -101,7 +111,8 @@ nrpe_group=@nrpe_group@ + # file to allow only the specified host to connect to the port + # you are running this daemon on. + # +-# NOTE: This option is ignored if NRPE is running under either inetd or xinetd ++# NOTE: This option is ignored if NRPE is running under either inetd ++# or xinetd or systemd + + allowed_hosts=127.0.0.1,::1 + +@@ -269,15 +280,6 @@ connection_timeout=300 @@ -25,7 +71,7 @@ diff -up ./sample-config/nrpe.cfg.in.include_etc_npre_d ./sample-config/nrpe.cfg # COMMAND DEFINITIONS # Command definitions that this daemon will run. Definitions # are in the following format: -@@ -317,3 +309,11 @@ command[check_total_procs]=@pluginsdir@/ +@@ -317,3 +319,11 @@ command[check_total_procs]=@pluginsdir@/ #command[check_load]=@pluginsdir@/check_load -w $ARG1$ -c $ARG2$ #command[check_disk]=@pluginsdir@/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ #command[check_procs]=@pluginsdir@/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$ diff --git a/nrpe-0005-Fix-bad-ipv6-hostname.patch b/nrpe-0005-Fix-bad-ipv6-hostname.patch new file mode 100644 index 0000000..45bcb8a --- /dev/null +++ b/nrpe-0005-Fix-bad-ipv6-hostname.patch @@ -0,0 +1,15 @@ +diff -up ./src/acl.c.fix_ipv6_address ./src/acl.c +--- ./src/acl.c.fix_ipv6_address 2017-05-24 10:35:00.000000000 -0400 ++++ ./src/acl.c 2017-07-11 12:59:47.021261517 -0400 +@@ -131,6 +131,11 @@ char * acl_substring(char *string, int s + */ + + int add_ipv4_to_acl(char *ipv4) { ++ ++ /* check if it is an ipv6 address before we do the checks */ ++ if (strchr(ipv4, ':') != NULL) ++ return 1; ++ + int state = 0; + int octet = 0; + int index = 0; /* position in data array */ diff --git a/nrpe.spec b/nrpe.spec index 8bbef6a..0d06a70 100644 --- a/nrpe.spec +++ b/nrpe.spec @@ -5,7 +5,7 @@ Name: nrpe Version: 3.1.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Host/service/network monitoring agent for Nagios Group: Applications/System @@ -21,7 +21,7 @@ Source6: nrpe.service.epel Patch0: nrpe-0000-nrpe320-git-allow-noname.patch Patch3: nrpe-0003-Include-etc-npre.d-config-directory.patch - +Patch5: nrpe-0005-Fix-bad-ipv6-hostname.patch Patch13: nrpe-0013-service-rhel6.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -97,7 +97,7 @@ SElinux context for %{name}. %setup -q %patch0 -p1 -b .git-allownoname %patch3 -p1 -b .include_etc_npre_d - +%patch5 -p1 -b .fix_ipv6_address %patch13 -p1 -b .fix_service_rhel6 @@ -261,6 +261,10 @@ fi %endif %changelog +* Tue Jul 11 2017 Stephen Smoogen - 3.1.1-5 +- Add comments to nrpe.cfg to alert user on RHBZ #1318773 +- Backport ipv6 patch for problem + * Fri Jul 7 2017 Stephen Smoogen - 3.1.1-4 - Fix patch name. Silly human. Do a fedpkg srpm before build.