[icinga-checkins] icinga.org: icinga-core/support/1.12: base/icinga: Open debug log after dropping privileges

git at icinga.org git at icinga.org
Thu Dec 22 20:48:58 CET 2016


Module: icinga-core
Branch: support/1.12
Commit: 48ee4cca1795500e0f4d7772d9070377a53f289b
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=48ee4cca1795500e0f4d7772d9070377a53f289b

Author: Markus Frosch <markus.frosch at icinga.com>
Date:   Wed Dec 21 10:49:53 2016 +0100

base/icinga: Open debug log after dropping privileges

refs #13709

---

 base/icinga.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/base/icinga.c b/base/icinga.c
index 6883fb4..b6549ee 100644
--- a/base/icinga.c
+++ b/base/icinga.c
@@ -678,9 +678,6 @@ int main(int argc, char **argv, char **env) {
 			my_free(mac->x[MACRO_PROCESSSTARTTIME]);
 			asprintf(&mac->x[MACRO_PROCESSSTARTTIME], "%lu", (unsigned long)program_start);
 
-			/* open debug log */
-			open_debug_log();
-
 			/* drop privileges */
 			if (drop_privileges(nagios_user, nagios_group) == ERROR) {
 
@@ -690,6 +687,9 @@ int main(int argc, char **argv, char **env) {
 				exit(ERROR);
 			}
 
+			/* open debug log */
+			open_debug_log();
+
 #ifdef USE_EVENT_BROKER
 			/* initialize modules */
 			neb_init_modules();



More information about the icinga-checkins mailing list