[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: modify execv to execvp, accepting 4096 cmd args, for both host and service checks with adapted error handling

git at icinga.org git at icinga.org
Tue Jul 13 16:15:11 CEST 2010


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

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Tue Jul 13 16:04:50 2010 +0200

modify execv to execvp, accepting 4096 cmd args, for both host and service checks with adapted error handling

the previous version only allowed 20-1 chld args, and was limited on the
error output. it is now a combined diff from Hiren, Christoph and Matthieu,
having all features applied and several bugs fixed (pipe returns -1 on error)

Furthermore, it's also applied for host checks.

execvp searches in path too, e.g. if plugin path is not set correctly but
is in PATH.

The run check procedure still falls back on popen execution, if the plugin
command contains shell meta characters. (Can be compared to Perl's exec vs
system)

kudos to Hiren Patel, Christoph Maser and Matthieu Kermagoret

refs #436

---

 Changelog        |   45 ++++++---
 base/checks.c    |  309 +++++++++++++++++++++++++++++-------------------------
 include/icinga.h |    3 +-
 3 files changed, 199 insertions(+), 158 deletions(-)

Diff:   https://git.icinga.org/?p=icinga-core.git;a=commitdiff;h=ba8364e27edd05b1735f054736528e6e4a7b995e




More information about the icinga-checkins mailing list