[icinga-checkins] icinga.org: icinga-nrpe/master: Revert "* write pid as nrpe user, drop privileges before (Debian patch)"

git at icinga.org git at icinga.org
Sun Nov 13 17:30:40 CET 2011


Module: icinga-nrpe
Branch: master
Commit: b6142629b28413c83f2dcbc57d921d0bda5473a3
URL:    https://git.icinga.org/?p=icinga-nrpe.git;a=commit;h=b6142629b28413c83f2dcbc57d921d0bda5473a3

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sun Nov 13 14:36:50 2011 +0100

Revert "* write pid as nrpe user, drop privileges before (Debian patch)"

This reverts commit 9e0e59302239cdb346571daa56ff3b6925fff0b0.

Conflicts:

	Changelog
	src/nrpe.c

---

 Changelog  |    1 -
 src/nrpe.c |    6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/Changelog b/Changelog
index e074e0b..e5d2be0 100644
--- a/Changelog
+++ b/Changelog
@@ -22,7 +22,6 @@ FIXES
 * increase help output (Debian patch)
 * do not use /dev/urandom, but a generic seed (Debian patch)
 * null the receive buffer before using it (Debian patch)
-* write pid as nrpe user, drop privileges before (Debian patch)
 * correct indent and add scripts like in icinga-core
 
 CHANGES
diff --git a/src/nrpe.c b/src/nrpe.c
index d290495..2d96d97 100644
--- a/src/nrpe.c
+++ b/src/nrpe.c
@@ -311,12 +311,12 @@ int main(int argc, char **argv) {
 		/* log info to syslog facility */
 		syslog(LOG_NOTICE, "Starting up daemon");
 
-		/* drop privileges */
-		drop_privileges(nrpe_user, nrpe_group);
-
 		/* write pid file */
 		if (write_pid_file() == ERROR)
 			return STATE_CRITICAL;
+		
+		/* drop privileges */
+		drop_privileges(nrpe_user,nrpe_group);
 
 		/* make sure we're not root */
 		check_privileges();





More information about the icinga-checkins mailing list