[Pkg-nagios-changes] [pkg-nrpe] 01/02: Add upstream patch to turn seteuid errors into warnings. (closes: #868326)
Bas Couwenberg
sebastic at debian.org
Fri Jul 14 14:57:11 UTC 2017
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository pkg-nrpe.
commit d08771eba0d89844a3f782f9cad8b910373b279c
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Fri Jul 14 16:51:11 2017 +0200
Add upstream patch to turn seteuid errors into warnings. (closes: #868326)
---
debian/changelog | 7 ++++++
.../patches/change-seteuid-errors-to-warning.patch | 29 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 37 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 96c51c8..1e58dd3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+nagios-nrpe (3.2.0-4) UNRELEASED; urgency=medium
+
+ * Add upstream patch to turn seteuid errors into warnings.
+ (closes: #868326)
+
+ -- Bas Couwenberg <sebastic at debian.org> Fri, 14 Jul 2017 16:50:43 +0200
+
nagios-nrpe (3.2.0-3) unstable; urgency=medium
* Re-enable SSL support by default.
diff --git a/debian/patches/change-seteuid-errors-to-warning.patch b/debian/patches/change-seteuid-errors-to-warning.patch
new file mode 100644
index 0000000..aeafee2
--- /dev/null
+++ b/debian/patches/change-seteuid-errors-to-warning.patch
@@ -0,0 +1,29 @@
+Description: changed the seteuid(0) errors to warning, and only print if debugging is enabled
+Author: Bryan Heden <bheden at nagios.com>
+Origin: https://github.com/NagiosEnterprises/nrpe/commit/005e20ffec489bb56871911463d41ca5a465583d
+Bug-Debian: https://bugs.debian.org/868326
+
+--- a/src/nrpe.c
++++ b/src/nrpe.c
+@@ -2221,8 +2221,8 @@ int my_system(char *command, int timeout
+ if (pid == 0) {
+
+ /* get root back so the next call works correctly */
+- if (SETEUID(0) == -1)
+- logit(LOG_ERR, "ERROR: my_system() seteuid(0): %s", strerror(errno));
++ if (SETEUID(0) == -1 && debug)
++ logit(LOG_WARNING, "WARNING: my_system() seteuid(0): %s", strerror(errno));
+
+ drop_privileges(nrpe_user, nrpe_group, 1); /* drop privileges */
+ close(fd[0]); /* close pipe for reading */
+@@ -2493,8 +2493,8 @@ int remove_pid_file(void)
+ return OK; /* pid file was not written */
+
+ /* get root back so we can delete the pid file */
+- if (SETEUID(0) == -1)
+- logit(LOG_ERR, "ERROR: remove_pid_file() seteuid(0): %s", strerror(errno));
++ if (SETEUID(0) == -1 && debug)
++ logit(LOG_WARNING, "WARNING: remove_pid_file() seteuid(0): %s", strerror(errno));
+
+ if (unlink(pid_file) == -1) {
+ logit(LOG_ERR, "Cannot remove pidfile '%s' - check your privileges.", pid_file);
diff --git a/debian/patches/series b/debian/patches/series
index 15e2844..a5e9d10 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
02_nrpe.cfg_local-include_support_nrpe.d.patch
07_warn_ssloption.patch
11_reproducible_dh.h.patch
+change-seteuid-errors-to-warning.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nrpe.git
More information about the Pkg-nagios-changes
mailing list