[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: write error in check-outpur if permissions are wrong

git at icinga.org git at icinga.org
Thu Jul 8 21:01:50 CEST 2010


Module: icinga-core
Branch: mfriedrich/core
Commit: ce90e17f2f03bf5cf601b9204a96bb8e336c2424
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=ce90e17f2f03bf5cf601b9204a96bb8e336c2424

Author: Christoph Maser <cmr at financial.com>
Date:   Sun Jul  4 11:58:29 2010 +0200

write error in check-outpur if permissions are wrong

---

 base/checks.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/base/checks.c b/base/checks.c
index b9af01b..93b9018 100644
--- a/base/checks.c
+++ b/base/checks.c
@@ -837,12 +837,14 @@ int run_async_service_check(service *svc, int check_options, double latency, int
 						chldargs[1] = '\0';
 					}
 
-					if (access(chldargs[0], R_OK)) {
+					if (access(chldargs[0], R_OK) !=0 ) {
+						fprintf(stdout,"plugin %s does not exist or is not readable\n",chldargs[0]);
 						logit(NSLOG_RUNTIME_WARNING,TRUE,"plugin %s does not exists or is not readable\n",chldargs[0]);
 						_exit(STATE_UNKNOWN);
 					}
 
 					if (access(chldargs[0], X_OK) != 0  ) {
+						fprintf(stdout,"wrong execution permissions on plugin %s\n",chldargs[0]);
 						logit(NSLOG_RUNTIME_WARNING,TRUE,"wrong execution permissions on plugin %s\n",chldargs[0]);
 						_exit(STATE_UNKNOWN);
 					}





More information about the icinga-checkins mailing list