pax_global_header00006660000000000000000000000064136521157200014514gustar00rootroot0000000000000052 comment=b226fe4175dc79c9a6d7994614e570b26ad0f0dc nrpe-nrpe-4.0.3/000077500000000000000000000000001365211572000134265ustar00rootroot00000000000000nrpe-nrpe-4.0.3/.gitignore000066400000000000000000000012651365211572000154220ustar00rootroot00000000000000Makefile config.log config.status include/config.h include/common.h include/dh.h nrpe.spec paths uninstall .cproject .project nrpe.cbp nrpe.layout package/solaris/Makefile sample-config/nrpe.cfg src/Makefile src/check_nrpe src/nrpe autom4te.cache/ nbproject/ .settings/ startup/bsd-init startup/debian-init startup/default-inetd startup/default-init startup/default-service startup/default-socket startup/default-socket-svc startup/default-xinetd startup/mac-init.plist startup/mac-inetd.plist startup/newbsd-init startup/openbsd-init startup/openrc-conf startup/openrc-init startup/rh-upstart-init startup/solaris-inetd.xml startup/solaris-init.xml startup/tmpfile.conf startup/upstart-init nrpe-nrpe-4.0.3/.travis.yml000066400000000000000000000001751365211572000155420ustar00rootroot00000000000000 language: c sudo: enabled dist: - trusty compiler: - clang - gcc script: ./configure && make all && sudo ./test-wrapper nrpe-nrpe-4.0.3/CHANGELOG.md000066400000000000000000000525201365211572000152430ustar00rootroot00000000000000NRPE Changelog ============== [4.0.3](https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-4.0.3) - 2020-04-28 --------------------------------------------------------------------------------------- **FIXES** - Fixed nasty_metachars not being read from config file (#235) (Sebastian Wolf) [4.0.2](https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-4.0.2) - 2020-03-11 --------------------------------------------------------------------------------------- **FIXES** - Fixed buffer length calculations/writing past memory boundaries on some systems (#227, #228) (Andreas Baumann, hariwe, Sebastian Wolf) - Fixed use of uninitialized variable when validating requests (#229) (hariwe, Sebastian Wolf) [4.0.1](https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-4.0.1) - 2020-01-22 --------------------------------------------------------------------------------------- **FIXES** * Fixed syslog flooding with CRC-checking errors when both plugin and agent were updated to version 4 (Sebastian Wolf) [4.0.0](https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-4.0.0) - 2019-01-13 --------------------------------------------------------------------------------------- Note: This update includes security fixes which affect both the check_nrpe plugin and the NRPE daemon. The latest version of NRPE is still able to interoperate with previous versions, but for best results, both programs should be updated. **ENHANCEMENTS** * Added TLSv1.3 and TLSv1.3+ support for systems that have it (Nigel Yong, Rahul Golam) * Added IPv6 ip address to list of default allow_from hosts (Troy Lea) * Added -D option to disable logging to syslog (Tom Griep, Sebastian Wolf) * Added -3 option to force check_nrpe to use NRPE v3 packets * OpenRC: provide a default path for nrpe.cfg (Michael Orlitzky) * OpenRC: Use RC_SVCNAME over a hard-coded PID file (j-licht) **FIXES** * Checks for '!' now only occur inside the command buffer (Joni Eskelinen) * NRPE daemon is more resilient to DOS attacks (Leonid Vasiliev) * allowed_hosts will no longer test getaddrinfo records against the wrong protocol (dombenson) * nasty_metachars will now handle C escape sequences properly when specified in the config file (Sebastian Wolf) * Calculated packet sizes now struct padding/alignment when sending and receiving messages (Sebastian Wolf) * Buffer sizes are now checked before use in packet size calculation (Sebastian Wolf) * When using `include_dir`, individual files' errors do not prevent the remaining files from being read (Sebastian Wolf) [3.2.1](https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-3.2.1) - 2017-08-31 --------------------------------------------------------------------------------------- **FIXES** * Change seteuid error messages to warning/debug (Bryan Heden) * Fix segfault when no nrpe_user is specified (Stephen Smoogen, Bryan Heden) * Added additional strings to error messages to remove duplicates (Bryan Heden) * Fix nrpe.spec for rpmbuild (Bryan Heden) * Fix error for drop_privileges when using inetd (xalasys-luc, Bryan Heden) [3.2.0](https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-3.2.0) - 2017-06-26 --------------------------------------------------------------------------------------- **ENHANCEMENTS** * Added max_commands definition to nrpe.cfg to rate limit simultaneous fork()ed children (Bryan Heden) * Added -E, --stderr-to-stdout options for check_nrpe to redirect output (Bryan Heden) * Added support for Gentoo init (Troy Lea @box293) * Cleaned up code a bit, updated readmes and comments across the board (Bryan Heden) * Added -V, --version to nrpe and fixed the output (Bryan Heden) * Added different SSL error messages to be able to pinpoint where some SSL errors occured (Bryan Heden) * Updated logic in al parse_allowed_hosts (Bryan Heden) * Added builtin OpenSSL Engine support where available (Bryan Heden + @skrueger8) * Clean up compilation warnings (Bryan Heden) * Added more commented commands in nrpe.cfg (Bryan Heden) **FIXES** * Undefined check returns UNKNOWN (Bryan Heden) * Fix incompatibility with OpenSSL 1.1.0 via SECLEVEL distinction (Bryan Heden) * Fix ipv4 error in logfile even if address is ipv6 (Bryan Heden) * Fix improper valid/invalid certificate warnings (Bryan Heden) [3.1.1](https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-3.1.1) - 2017-05-24 --------------------------------------------------------------------------------------- **FIXES** * The '--log-file=' or '-g' option is missing from the help (John Frickson) * check_nrpe = segfault when specifying a config file (John Frickson) * Alternate log file not being used soon enough (John Frickson) * Unable to compile v3.1.0rc1 with new SSL checks on rh5 (John Frickson) * Unable to compile nrpe-3.1.0 - undefined references to va_start, va_end (John Frickson) * Can't build on Debian Stretch, openssl 1.1.0c (John Frickson) * Fix build failure with -Werror=format-security (Bas Couwenberg) * Fixed a typo in `nrpe.spec.in` (John Frickson) * More detailed error logging for SSL (John Frickson) * Fix infinite loop when unresolvable host is in allowed_hosts (Nick / John Frickson) [3.1.0](https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-3.1.0) - 2017-04-17 --------------------------------------------------------------------------------------- **ENHANCEMENTS** * Added option to nrpe.cfg.in that can override hard-coded NASTY_METACHARS (John Frickson) * While processing 'include_dir' statement, sort the files (Philippe Kueck / John Frickson) * nrpe can now write to a log file using 'log_file=' in nrpe.cfg (John Frickson) * check_nrpe can now write to a log file using '--log-file=' or '-g' options (John Frickson) **FIXES** * Added missing debugging syslog entries, and changed printf()'s to syslog()'s. (Jobst Schmalenbach) * Fix help output for ssl option (configure) (Ruben Kerkhof) * Fixes to README.SSL.md and SECURITY.md (Elan Ruusamäe) * Changed the 'check_load' command in nrpe.cfg.in (minusdavid) * Cleanup of config.h.in suggested by Ruben Kerkhof * Minor change to logging in check_nrpe (John Frickson) * Solaris 11 detection is broken in configure (John Frickson) * Removed function `b64_decode` which wasn't being used (John Frickson) * check_nrpe ignores -a option when -f option is specified (John Frickson) * Added missing LICENSE file (John Frickson) * Off-by-one BO in my_system() (John Frickson) * Got rid of some compiler warnings (Stefan Krüger / John Frickson) * Add SOURCE_DATE_EPOCH specification support for reproducible builds. (Bas Couwenberg) * nrpe 3.0.1 allows TLSv1 and TLSv1.1 when I configure for TLSv1.2+ (John Frickson) * "Remote %s accepted a Version %s Packet", please add to debug (John Frickson) * nrpe 3.0.1 segfaults when key and/or cert are broken symlinks (John Frickson) * Fixed a couple of typos in docs/NRPE.* files (Ludmil Meltchev) * Changed release date to ISO format (yyyy-mm-dd) (John Frickson) * Fix systemd unit description (Bas Couwenberg) * Add reload command to systemd service file (Bas Couwenberg) * fix file not found error when updating version (Sven Nierlein) * Spelling fixes (Josh Soref) * Return UNKNOWN when check_nrpe cannot communicate with nrpe and -u set (John Frickson) * xinetd.d parameter causes many messages in log file (John Frickson) * Fixes for openssl 1.1.x (Stephen Smoogen / John Frickson) * PATH and other environment variables not set with numeric nrpe_user (John Frickson) * rpmbuild -ta nrpe-3.0.1.tar.gz failed File not found: /etc/init.d/nrpe (bvandi / John Frickson) [3.0.1](https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-3.0.1) - 2016-09-08 --------------------------------------------------------------------------------------- **FIXES** * _set_rc: command not found reported by init script (John Frickson) * Version string contains name (John Frickson) * Changes to get 'rpmbuild' to work - nrpe.spec file outdated (John Frickson) * typo in startup/default-xinetd.in (Philippe Kueck) * debug output missing command name (Philippe Kueck) * /usr/lib/tmpfiles.d/ndo2db.conf should have 'd' type, not 'D' (John Frickson) * Fixes in parse_allowed_hosts() and called functions (Jobst Schmalenbach / John Frickson) * nrpe.cfg: 'debug' statement needs to be first in file (Jobst Schmalenbach / John Frickson) [3.0.0](https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-3.0.0) - 2016-08-01 --------------------------------------------------------------------------------------- **SECURITY** * Fix for CVE-2014-2913 * Added function to clean the environment before forking. (John Frickson) **ENHANCEMENTS** * Added support for optional config file to check_nrpe. With the new SSL parameters, the line was getting long. The config file is specified with --config-file= or -f parameters. The config file must look like command line options, but the options can be on separate lines. It MUST NOT include --config-file (-f), --command (-c) or --args (-a). If any options are in both the config file and on the command line, the command line options are used. * make can now add users and groups using "make install-groups-users" (John Frickson) * Added "nrpe-uninstall" script to the same directory nrpe get installed to (John Frickson) * Updated code so configure && make will work on AIX, HP-UX, Solaris, OS X. There should be no errors or warnings. Let me know if any errors or warning appear (John Frickson) * Added command-line option to prevent forking, since some of the init replacements (such as systemd, etc.) don't want daemons to fork (John Frickson) * Added autoconf macros and additional files to better support multi-platform config and compile. The default will still set up to install to /usr/local/nagios but I added a new configure option: '--enable-install-method='. If is 'opt', everything will install to '/opt/nagios'. If is 'os', installation will be to O/S- and distribution-specific locations, such as /usr/sbin, /usr/lib/nagios, /etc/nagios, and so on. * Added additional init and inetd config files to support more systems, including SuSE, Debian, Slackware, Gentoo, *BSD, AIX, HP-UX, Solaris, OS X. * Added listen_queue_size as configuration option (Vadim Antipov, Kaspersky Lab) * Reworked SSL/TLS. See the README.SSL.md file for full info. (John Frickson) * Added support for version 3 variable sized packets up to 64KB. nrpe will accept either version from check_nrpe. check_nrpe will try to send a version 3 packet first, and fall back to version 2. check_nrpe can be forced to only send version 2 packets if the switch `-2` is used. (John Frickson) * Added extended timeout syntax in the -t : format. (ABrist) **FIXES** * Fixed configure to check more places for SSL headers/libs. (John Frickson) * Added ifdefs for complete_SSL_shutdown to compile without SSL. (Matthew L. Daniel) * Renamed configure.in to configure.ac and added check for sigaction (John Frickson) * Replaced all instances of signal() with sigaction() + blocking (John Frickson) * check_nrpe does not parse passed arguments correctly (John Frickson) * NRPE should not start if cannot write pid file (John Frickson) * Fixed out-of-bounds error (return code 255) for some failures (John Frickson) * Connection Timeout and Connection Refused messages need a new line (Andrew Widdersheim) * allowed_hosts doesn't work, if one of the hostnames can't be resolved by dns (John Frickson) * allowed_hosts doesn't work with a hostname resolving to an IPv6 address (John Frickson) * Return UNKNOWN when issues occur (Andrew Widdersheim) * NRPE returns OK if check can't be executed (Andrew Widdersheim) * nrpe 2.15 [regression in Added SRC support on AIX - 2.14] (frphoebus) * compile nrpe - Solaris 9 doesn't have isblank() (lilo, John Frickson) * sample configuration for check_load has crazy sample load avg (ernestoongaro) 2.15 - 09/06/2013 ----------------- * Now compiles on HP-UX (Grant Byers) * Added support for IPv6 (Leo Baltus, Eric Stanley) 2.14 - 12/21/2012 ----------------- * Added configure option to allow bash command substitutions, disabled by default [bug #400] (Eric Stanley) * Patched to shutdown SSL connection completely (Jari Takkala) * Added SRC support on AIX (Thierry Bertaud) * Updated RPM SPEC file to support creating RPMs on AIX (Eric Stanley) * Updated logging to support compiling on AIX (Eric Stanley) 2.13 - 11/11/2011 ----------------- * Applied Kaspersky Labs supplied patch for extending allowed_hosts (Konstantin Malov) * Fixed bug in allowed_hosts parsing (Eric Stanley) * Updated to support compiling on Solaris 10 (thanks to Kevin Pendleton) 2.12 - 03/10/2008 ----------------- * Fix for unterminated multiline plugin (garbage) output (Krzysztof Oledzki) 2.11 - 12/26/2007 ----------------- * Added lib64 library paths to configure script for 64-bit systems (John Maag) * Added --with-ssl-lib configure script option * Added --with-log-facility option to control syslog logging (Ryan Ordway and Brian Seklecki) 2.10 - 10/19/2007 ----------------- * Moved PDF docs to docs/ subdirectory, added OpenOffice source document * A critical result is now returned for child processed that die due to a signal (Klas Lindfors) 2.9 - 08/13/2007 ---------------- * Fixed bug with --with-nrpe-group configure script option (Graham Collinson) * Fixed bug with check_disk thresholds in sample config file (Patric Wust) * Added NRPE_PROGRAMVERSION and NRPE_MULTILINESUPPORT environment variables for scripts that need to detect NRPE version and capabilities (Gerhard Lausser) * Added asprintf() support for systems that are missing it (Samba team) 2.8.1 - 05/10/2007 ----------------- * Fixed configure script error with user-specified NRPE group 2.8 - 05/08/2007 --------------- * Added support for multiline plugin output (limited to 1KB at the moment) (Matthias Flacke) 2.8b1 - 03/14/2007 ----------------- * Changes to sample config files * Added ';' as an additional prohibited metachar for command arguments * Updated documentation and added easier installation commands 2.7.1 - 03/08/2007 ------------------ * Changed C++ style comment to C style to fix compilation errors on AIX (Ryan McGarry) 2.7 - 02/18/2007 ---------------- * Patches for detection SSL header and library locations (Andrew Boyce-Lewis) * NRPE daemon will now partially ignore non-fatal configuration file errors and attempt to startup (Andrew Boyce-Lewis) 2.6 - 12/11/2006 ---------------- * Added -u option to check_nrpe to return UNKNOWN states on socket timeouts (Bjoern Beutel) * Added connection_timeout variable to NRPE daemon to catch dead client connections (Ton Voon) * Added graceful timeout to check_nrpe to ensure connection to NRPE daemon is properly closed (Mark Plaksin) 2.5.2 - 06/30/2006 ------------------ * Fixed incorrect service name in sample xinetd config file * Added note on how to restart inetd for OpenBSD users (Robert Peaslee) * Fix for nonblocking accept()s on systems that define EAGAIN differently than EWOULDBLOCK (Gerhard Lausser) * Fix to (re)allow week random seed (Gerhard Lausser) 2.5.1 - 04/09/2006 ------------------ * Patch to fix segfault if --no-ssl option is used (Sean Finney/Peter Palfrader) 2.5 - 04/06/2006 ---------------- * (Re)added allowed_hosts option for systems that don't support TCP wrappers * Fix for SSL errors under Solaris 8 (Niels Endres) * Fix for config file directory inclusion on ReiserFS (Gerhard Lausser) 2.4 - 02/22/2006 ---------------- * Added option to allow week random seed (Gerhard Lausser) * Added optional command line prefix (Sean Finney) * Added ability to reload config file with SIGHUP * Fixed bug with location of dh.h include file * Fixed bug with disconnect message in debug mode 2.3 - 01/23/2006 ---------------- * Spec file fixes * Removed errant PID file debugging code * Fixed problem with trimming command definitions 2.2 - 01/22/2006 ---------------- * Spec file fix * Patch to add Tru64 and IRIX support (Ton Voon) * Updated config.sub and config.guess * Fixed bug with config file lines with only whitespace * Fixed bug with missing getopt() command line option for -V * Removed sample FreeBSD init script (now maintained by FreeBSD port) * Added config file option for writing a PID file 2.1 - 01/19/2004 ---------------- * Replaced host access list with TCP wrapper support * Removed length restrictions for command names and command lines * Configure script patch for getopt_long on Solaris * Bug fixes for accept() on HP-UX 11.0 * Init script for SUSE Linux (Subhendu Ghosh) * SSL protocol used is now limited to TLSv1 * Any output from plugins after first line is now ignored before plugin process is closed 2.0 - 09/08/2003 ---------------- * Added support for passing arguments to command * NRPE daemon can no longer be run as root user/group * Added getopt support * Added 'include' variable to config file to allow inclusion of external config files * Added 'include_dir' variable to allow inclusion of external config files in directories (with recursion) * Added native SSL support (Derrick Bennett) * Added my_strsep(), as Solaris doesn't have strsep() * Added license exemption for use with OpenSSL 1.8 - 01/16/2003 ---------------- * Daemon now closes stdio/out/err properly (James Peterson) * Makefile changes (James Peterson) * Mode command line option bug fix in daemon * Fixed incorrect command line options in check_nrpe plugin 1.7 - 01/08/2003 ---------------- * Spec file updates and minor bug fixes (James Peterson) * Bug fix with default nrpe port definition * Added sample xinetd config file (nrpe.xinetd) * Bug fix for command_timeout variable (James Peterson) 1.6 - 12/30/2002 ---------------- * Updated sample commands to match new plugin argument format * Added sample init scripts for FreeBSD and Debian (Andrew Ryder) * Syntax changes (-H option specifies host name in check_nrpe, -c option specifies config file in nrpe) * Added command_timeout directive to config file to allow user to specify timeout for executing plugins * Added spec file and misc patches for building RPMs (James Peterson) * Added --with-nrpe-port config directive (James Peterson) 1.5 - 06/03/2002 ---------------- * Added setuid/setgid option to config file (suggested by Marek Cervenka) 1.4 - 06/01/2002 ---------------- * Changed STATE_UNKNOWN to value of 3 instead of -1 (old style) * Minor doc and sample config file changes 1.3 - 02/21/2002 ---------------- * Name and version change * Ignore SIGHUP, minor cleanup (Jon Andrews) 1.2.5 - 12/22/2001 ------------------ * Implemented Beej's sendall() to handle partial send()s * Added instructions on running under xinetd to README * Removed some old crud 1.2.4 - 02/22/2001 ------------------ * I forgot what changes I made. Go figure... 1.2.3 - 12/21/2000 ------------------ * A bit more documentation on configuring command definitions for the plugin 1.2.2 - 06/05/2000 ------------------ * Fixed error in docs for running under inetd using TCP wrappers * Replaced old email address in src/netutils.h with new one 1.2.1 - 05/07/2000 ------------------ * Removed trapping of SIGCHLD * Changed wait4() to waitpid() to allow compilation on HP-UX and AIX 1.2.0 - 04/18/2000 ------------------ * Server forks twice after accepting a client connection, so as to prevent the creation of zombies 1.1.5 - 04/07/2000 ------------------ * Fixed a small bug where one debug message was not getting logged properly 1.1.4 - 03/30/2000 ------------------ * Added option to disable/enable debug messages using the debug option in the config file 1.1.3 - 03/11/2000 ------------------ * Changed config file to use an absolute path * Changed all debug output to use syslog (Rene Klootwijk) * No convert all data to network order before sending it and convert it back to host order when receiving it. This makes it possible to mix Solaris and Linux, e.g. running check_nrpe on Linux and nrpe on Solaris. (Rene Klootwijk) 1.1.2 - 03/07/2000 ------------------ * Removed unnecessary code in signal handler routine * Unused signals are no longer trapper 1.1.1 - 02/28/2000 - RKL --------------------------- * Modified syslog code to include string describing the error code. * Changed hardcoded number in signal handler to its name. This prevented nrpe to run on Solaris. * Fixed race condition in accept loop. The result of accept should also be checked for EINTR. * Modified recv and send function calls to compile without warnings on Solaris. * Modified configure.in,configure and Makefile.in to include nsl and socket libs for Solaris. * Modified the signal handler to reestablish itself after being called. 1.1 - 02/24/2000 - Rene Klootwijk ----------------- * Added ability to bind nrpe to a specific interface by specifying the address of this interface in the nrpe.cfg file (e.g. server_address=192.168.2.3) 1.0 - 02/16/2000 ------------------ * Added ability to run as a service under inetd 1.0b6 - 02/01/2000 ------------------ * Added configure script * Netutils functions from the NetSaint plugins is now used * Reset SIGCHLD to default behavior before calling popen() to prevent race condition with pclose() (Reported by Rene Klootwijk) * Cleaned up code 1.0b5 - 01/10/2000 ------------------ * Added init script contributed by Jacob L * Incorporated syslog code and other patches contributed by Jacob L 1.0b4 - 11/04/1999 ------------------ * Changed 'allowed_ip' option in configuration file to 'allowed_hosts' and added support for multiple hosts * Minor buffer overflow protection fixes * main() returned STATE_UNKNOWN on successful launch, changed to STATE_OK (jaclu@grm.se) * Added syslog support (jaclu@grm.se) nrpe-nrpe-4.0.3/CONTRIBUTING.md000066400000000000000000000142171365211572000156640ustar00rootroot00000000000000# Contributing Thank you for considering contributing your time and effort to this Nagios project. This document serves as our guidelines for contribution. Keep in mind that these are simply *guidelines* - nothing here is set in stone. ## Questions If you have a question, you don't need to file an Issue. You can simply connect with the Nagios Support Team via the [Nagios Support Forum](https://support.nagios.com/forum/). Not to say that you **can't** open an Issue - but you'll likely get a much faster response by posting it on the forum. ## Ideas If you have an idea your best bet is to open an Issue. This gets it on the radar much quicker than any other method. First, let's define what an "Idea" really is. An Idea is simply an [Enhancement](#enhancements) request in its infancy. There's really nothing to it! Something as simple as "I think that this project should somehow connect with a widget" is a valid Idea. These are unrefined and raw. That's why you open an issue - so everyone gets a chance to chime in and come up with a plan! ## Feedback Feedback can be given via several methods. The *easiest* method is by opening an Issue. You're more than welcome to leave feedback on the [Nagios Support Forum](https://support.nagios.com/forum/) as well. By opening an Issue, however, you're insuring that the maintainers and reviewers are the first ones to see the feedback. In most cases, this is likely ideal. ## Bugs Here's where it starts to get serious. Following the guidelines outlined in this section allows the maintainers, developers, and community to understand and reproduce your bug report. Make sure to search existing open and closed [Issues](https://guides.github.com/features/issues/) before opening a bug report. If you find a closed Issue that seems like it's the same thing that you're experiencing, open a new Issue and include a link to the original Issue in the body of the new one. **If you have a bug, you *NEED* to open an Issue.** Not only that, but when you open the Issue, this is what we ***absolutely require***: * Use a clear and concise title for the Issue to identify the problem accurately * Describe the bug with as much detail as you can * Include the version of the project containing the bug you're reporting * Include your operating system information (`uname -a`) * Include a list of third party modules that are installed and/or loaded * Explain the behavior you expected to see (and why) vs. what actually happened Once you've got that covered - there's still more to include if you want to make a ***killer*** report: * Describe the ***exact steps*** that reproduce the problem * Provide **specific** examples to demonstrate those steps * If your bug is from an older version, make sure test against the latest (and/or the `maint` branch) * Include any screenshots that can help explain the issue * Include a file containing `strace` and/or `valgrind` output * Explain when the problem started happening: was it after an upgrade? or was it always present? * Define how reliably you can reproduce the bug * Any other information that you decide is relevant is also welcome ## Enhancements An enhancement is either a completely new feature or an improvement to existing functionality. We consider it to be a bit different than idea - based solely on the fact that it's more detailed than an idea would be. So you've got an idea for an ehancement? Great! Following the guidelines outlined in this section allows maintainers, developers, and the community to understand your enhancement and determine whether or not it's worth doing and/or what's involved in carrying it out. Make sure to search open and closed Issues and Pull Requests to determine if someone has either submitted the enhancement. If you feel like your enhancement is similar to one found, make sure to link the original in your request. Enhancements are submitted by opening an Issue. Unlike an [Idea](#idea), when you decide to submit your enhancement and open the Issue, we require at least the following information: * Use a clear and descriptive title to illustrate the enhancement you're requesting * Describe the current behavior (if it exists) and what changes you think should be made * Explain the enhancement in detail - make sure it makes sense and is easily understandable * Specify why the enhancement would be useful and who it would be useful to * If there is some other project or program where this enhancement already exists, make sure to link to it Beyond that, there are a few more things you can do to make sure you **really** get your point across: * Create a mockup of the enhancement (if applicable) and attach whatever files you can * Provide a step-by-step description of the suggested enhancement * Generate a fully dressed use-case for the enhancement request * Create a specification for the preferred implementation of the enhancement * Include a timeline regarding development expectations towards the request ## Submitting Code Everything else in this document has lead up to this moment - how can ***you*** submit code to the **project**. We allow code submissions via [Pull Requests](https://help.github.com/articles/about-pull-requests/). These let you (and us) discuss and review any changes to code in any repository you've made. How to create and manage Pull Requests is outside of the scope of this document, but make sure to check out GitHub's official documentation ([link here](https://help.github.com/)) to get a handle on it. While you're forking the repository to create a patch or an enhancement, create a *new branch* to make the change - it will be easier to submit a pull request using a new branch in your forked repository! When you submit a Pull Request, make sure you follow the guidelines: * Make sure you're submitting to the proper branch. Branch `maint` is used for the **next** bugfix release. The next enhancement release branch will vary. * ***NEVER*** submit a Pull Request to `master` branch. * Keep commit messages as concise as possible. * Update the appropriate files in regards to your changes: * `CHANGES` * `THANKS` * End all committed files with a newline. * Test your changes and include the results as a comment.nrpe-nrpe-4.0.3/LEGAL000066400000000000000000000006711365211572000142010ustar00rootroot00000000000000 All source code, binaries, documentation, and information contained in this distribution are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Nagios and the Nagios logo are registered trademarks of Nagios Enterprises. All other trademarks, servicemarks, registered trademarks, and registered servicemarks are the property of their respective owner(s). nrpe-nrpe-4.0.3/LICENSE.md000066400000000000000000000355051365211572000150420ustar00rootroot00000000000000The GNU General Public License, Version 2, June 1991 (GPLv2) ============================================================ > Copyright (C) 1989, 1991 Free Software Foundation, Inc. > 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -------- The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. Terms And Conditions For Copying, Distribution And Modification --------------------------------------------------------------- **0.** This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. **1.** You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. **2.** You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: * **a)** You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. * **b)** You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. * **c)** If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. **3.** You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: * **a)** Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, * **b)** Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, * **c)** Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. **4.** You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. **5.** You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. **6.** Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. **7.** If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. **8.** If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. **9.** The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. **10.** If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. No Warranty ----------- **11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. **12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.nrpe-nrpe-4.0.3/Makefile.in000066400000000000000000000154031365211572000154760ustar00rootroot00000000000000############################### # # NRPE Makefile # ############################### # Source code directories SRC_BASE=./src/ SRC_INCLUDE=./include/ # Mainly used for rpmbuild # DESTDIR= CC=@CC@ CFLAGS=@CFLAGS@ @DEFS@ LDFLAGS=@LDFLAGS@ @LIBS@ INSTALL=@INSTALL@ GREP=@GREP@ EGREP=@EGREP@ prefix=$(DESTDIR)@prefix@ exec_prefix=$(DESTDIR)@exec_prefix@ CFGDIR=$(DESTDIR)@pkgsysconfdir@ BINDIR=$(DESTDIR)@bindir@ SBINDIR=$(DESTDIR)@sbindir@ LIBEXECDIR=$(DESTDIR)@libexecdir@ NAGIOS_INSTALL_OPTS=@NAGIOS_INSTALL_OPTS@ NRPE_INSTALL_OPTS=@NRPE_INSTALL_OPTS@ OPSYS=@opsys@ DIST=@dist_type@ NRPE_USER=@nrpe_user@ NRPE_GROUP=@nrpe_group@ NAGIOS_USER=@nagios_user@ NAGIOS_GROUP=@nagios_group@ INIT_TYPE=@init_type@ INIT_DIR=$(DESTDIR)@initdir@ INIT_OPTS=-o root -g root INIT_FILE=@initname@ INETD_TYPE=@inetd_type@ INETD_DIR=$(DESTDIR)@inetddir@ INETD_FILE=@inetdname@ SRC_INETD=@src_inetd@ SRC_INIT=@src_init@ default: @echo;\ echo Please enter 'make [option]' where [option] is one of:;\ echo;\ echo " all builds nrpe and check_nrpe";\ echo " nrpe builds nrpe only";\ echo " check_nrpe builds check_nrpe only";\ echo " install-groups-users add the users and groups if they do not exist";\ echo " install install nrpe and check_nrpe";\ echo " install-plugin install the check_nrpe plugin";\ echo " install-daemon install the nrpe daemon";\ echo " install-config install the nrpe configuration file";\ echo " install-inetd install the startup files for inetd, launchd, etc.";\ echo " install-init install the startup files for init, systemd, etc.";\ echo all: cd $(SRC_BASE); $(MAKE) @echo "";\ echo "*** Compile finished ***";\ echo "";\ echo "You can now continue with the installation or upgrade process.";\ echo "";\ echo "Read the PDF documentation (docs/NRPE.pdf) for information on the next";\ echo "steps you should take to complete the installation or upgrade.";\ echo "" nrpe: cd $(SRC_BASE); $(MAKE) check_nrpe: cd $(SRC_BASE); $(MAKE) install-plugin: cd $(SRC_BASE); $(MAKE) $@ install-daemon: cd $(SRC_BASE); $(MAKE) $@ install: cd $(SRC_BASE); $(MAKE) $@ install-init: @if test $(SRC_INIT) = unknown; then \ echo No init file to install; \ exit 1; \ fi @if test $(INIT_TYPE) = upstart; then\ echo $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \ $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \ echo initctl reload-configuration; \ initctl reload-configuration; \ elif test $(INIT_TYPE) = systemd; then\ echo $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \ $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \ elif test $(INIT_TYPE) = smf10 -o $(INIT_TYPE) = smf11; then \ echo $(INSTALL) -m 775 -g sys -d $(INIT_DIR);\ $(INSTALL) -m 775 -g sys -d $(INIT_DIR);\ echo $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \ $(INSTALL) -m 644 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \ echo svccfg import $(INIT_DIR)/$(INIT_FILE); \ svccfg import $(INIT_DIR)/$(INIT_FILE); \ echo "*** Run 'svcadm enable nrpe' to start it"; \ elif test $(INIT_TYPE) = gentoo; then\ $(INSTALL) -m 755 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \ echo rc-update add nrpe default; \ rc-update add nrpe default; \ else\ echo $(INSTALL) -m 755 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \ $(INSTALL) -m 755 startup/$(SRC_INIT) $(INIT_DIR)/$(INIT_FILE); \ if test $(INIT_TYPE) = newbsd; then\ if test $(DIST) = openbsd; then\ echo "# nrpe@bsd_enable@=NO" >> /etc/rc.conf;\ echo "nrpe@bsd_enable@=\"-d -c $(CFGDIR)/nrpe.cfg\"" >> /etc/rc.conf;\ echo "Make sure to enable the nrpe daemon";\ else\ echo "nrpe@bsd_enable@=YES" >> /etc/rc.conf;\ echo "nrpe_configfile=$(CFGDIR)/nrpe.cfg" >> /etc/rc.conf;\ fi;\ elif test $(INIT_TYPE) = launchd; then\ launchctl load $(INIT_DIR)/$(INIT_FILE); \ else\ if test -f /sbin/chkconfig ; then \ case "$(DESTDIR)" in */rpmbuild/*) break;; \ *)/sbin/chkconfig nrpe on;; \ esac; \ else\ echo "Make sure to enable the nrpe daemon";\ fi;\ fi;\ fi install-inetd: @if test $(SRC_INETD) = unknown; then \ echo No inetd file to install; \ exit 1; \ fi @if test $(INETD_TYPE) = inetd; then \ $(EGREP) -q "^\W*nrpe\s+" $(INETD_DIR)/$(INETD_FILE) 2>/dev/null || \ cat startup/$(SRC_INETD) >> $(INETD_DIR)/$(INETD_FILE); \ elif test $(INETD_TYPE) = systemd; then \ SRC_INETD_FILE=`echo "$(SRC_INETD)" | sed -e 's/socket/socket-svc/'`; \ echo $(INSTALL) -m 644 startup/$$SRC_INETD_FILE $(INETD_DIR)/$(INIT_FILE); \ $(INSTALL) -m 644 startup/$$SRC_INETD_FILE $(INETD_DIR)/$(INIT_FILE); \ elif test $(INETD_TYPE) = smf10 -o $(INETD_TYPE) = smf11; then \ echo $(INSTALL) -m 775 -g sys -d $(INETD_DIR);\ $(INSTALL) -m 775 -g sys -d $(INETD_DIR);\ echo $(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \ $(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \ $(INSTALL) -m 775 -d $(INETD_DIR);\ echo svccfg import $(INETD_DIR)/$(INETD_FILE); \ svccfg import $(INETD_DIR)/$(INETD_FILE); \ echo "*** Run 'svcadm enable nrpe' to start it"; \ elif test $(INIT_TYPE) = launchd; then\ $(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \ launchctl load $(INETD_DIR)/$(INETD_FILE); \ else\ echo $(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \ $(INSTALL) -m 644 startup/$(SRC_INETD) $(INETD_DIR)/$(INETD_FILE); \ fi @$(EGREP) -q "^nrpe[\t ]+@nrpe_port@/tcp" /etc/services || \ echo "***** MAKE SURE 'nrpe @nrpe_port@/tcp' IS IN YOUR /etc/services FILE" install-config: $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(CFGDIR) $(INSTALL) -m 644 $(NRPE_INSTALL_OPTS) sample-config/nrpe.cfg $(CFGDIR) install-groups-users: @macros/add_group_user $(DIST) $(NAGIOS_USER) $(NAGIOS_GROUP) @if test "$(NAGIOS_USER)" != "$(NRPE_USER)" -o "$(NAGIOS_GROUP)" != "$(NRPE_GROUP)"; then\ macros/add_group_user $(DIST) $(NRPE_USER) $(NRPE_GROUP);\ fi clean: cd $(SRC_BASE); $(MAKE) $@; cd .. rm -f core rm -f *~ */*~ distclean: clean cd $(SRC_BASE); $(MAKE) $@; cd .. rm -rf autom4te.cache rm -f config.log config.status config.cache sample-config/nrpe.cfg $(SRC_INCLUDE)/config.h rm -f startup/bsd-init startup/debian-init startup/default-init startup/default-inetd rm -f startup/default-service startup/default-socket startup/default-socket-svc rm -f startup/default-xinetd startup/mac-init.plist startup/mac-inetd.plist rm -f startup/newbsd-init startup/openbsd-init startup/openrc-conf rm -f startup/openrc-init startup/rh-upstart-init startup/solaris-init.xml rm -f startup/solaris-inetd.xml startup/tmpfile.conf startup/upstart-init rm -f nrpe.spec uninstall include/common.h rm -f Makefile devclean: distclean nrpe-nrpe-4.0.3/README.SSL.md000066400000000000000000000266541365211572000153620ustar00rootroot00000000000000NRPE With SSL/TLS ================= This document covers the different methods of SSL transport that NRPE allows for. If there was a TL;DR here, it is these: ### Don't use NRPE without encryption and ### Use Public Key Encryption Contents -------- 1. [Introduction](#introduction) 2. [NRPE Changes](#nrpe-changes) 3. [check_nrpe Changes](#check_nrpe-changes) 4. [Certificate Generation Example](#certificate-generation-example) Introduction ------------ NRPE has had basic support for SSL/TLS for some time now, but it was severely lacking. It only allowed anonymous Diffie Hellman (ADH) key exchange, it used a fixed 512-bit key (generated at `./configure` time and extremely insecure) and originally allowed SSLv2. In 2004, SSLv2 and SSLv3 support was disabled. `nrpe` and `check_nrpe` have been updated to offer much more secure encryption and more options. And the updates are done in a backward- compatible way, allowing you to migrate to the newer versions without having to do it all at once, and possibly miss updating some machines, causing lost reporting. NRPE Changes ------------ Running `./configure` will now create a 2048-bit DH key instead of the old 512-bit key. The most current versions of openSSL will still not allow it. In my testing, openSSL 1.0.1e allowed DH keys of 512 bits, and 1.0.1k would not allow 2048 bit keys. In addition we now call `SSL_CTX_set_options(ctx, SSL_OP_SINGLE_DH_USE)` so a new key is generated on each connection, based on the 2048-bit key generated. The NRPE configuration file has added new SSL/TLS options. The defaults currently will allow old check_nrpe plugins to continue to connect to the nrpe daemon, but can report on "old style" connections, or enforce more secure communication as your migration progresses. The new options are in the "SSL/TLS OPTIONS" section of nrpe.cfg, about two-thirds of the way down. If you are upgrading NRPE from a prior version, you can run the `update-cfg.pl` script to add the new parameters to your nrpe.cfg. The `ssl_version` directive lets you set which versions of SSL/TLS you want to allow. SSLv2, SSLv3, TLSv1, TLSv1.1 and TLSv1.2 are allowed, or those litereals with a `+` after them (as in TLSv1.1+). Without the `+`, *that version only* will be used. With the `+`, that *version or above* will be used. openSSL will always negotiate the highest available allowed version available on both ends. This directive currently defaults to `TLSv1+`. The `ssl_use_adh` directive is **DEPRECATED**, even though it is new. Possible values are `0` to not allow ADH at all, `1` to allow ADH, and `2` to require ADH. The `2` should never be required, but it's there just in case it's needed, for whatever reason. `1` is currently the default, which allows older `check_nrpe` plugins to connect using ADH. When all the plugins are migrated to the newer version, it should be set to `0`. In an upcoming version of NRPE, ADH will no longer be allowed at all. Note that if you use a `2` here, NRPE will override any `ssl_cipher_list` entries (below) to *only* allow ADH. The `ssl_cipher_list` directive lets you specify which ciphers you want to allow. It currently defaults to `ALL:!MD5:@STRENGTH` but can take any value allowed by openSSL. In an upcoming version of NRPE, it will be changed to something more secure, something like `ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!RC4:!MD5:@STRENGTH`. Note that if you have `ssl_use_adh=2`, this string will be overridden with `ADH` which only only allow ADH. The `ssl_cacert_file`, `ssl_cert_file` and `ssl_privatekey_file` directives are used to specify which *.pem files are to be used for Public-Key Encryption (PKE). Setting these will allow clients to use PKE to communicate with the server, similar to how the HTTPS protocol works. The `ssl_client_certs` directive specifies whether or not a client certificate will be requested when a client tries to connect. A value of `0` means the nrpe daemon will not ask for or require a client certificate. A `1` will cause it to ask for a client certificate, but not require one. A `2` will require the client to present a valid certificate. This currently defaults to `0`. If you want to use client certificates and are upgrading the clients over time, you can set this to `1` once many have been upgraded, then set to `2` to force the use of client certs. Note that the client certs _must_ be signed by the CA cert specified in the `ssl_cacert_file` directive. The `ssl_logging` directive allows you to log some additional data to syslog. OR (or add) values together to have more than one option enabled. Values are `0` for no additional logging (the default), `1` to log startup SSL/TLS parameters from the nrpe.cfg file, `2` to log the SSL/TLS version of connections, `4` to log which cipher is being used for the connection, `8` to log if the plugin has a cert, and `16` to log details of plugin's certificate. `-1` will enable all. This can be especially helpful during plugin migration, so you can tell which plugins have certificates, what SSL/TLS version is being used, and which ciphers are being used. check_nrpe Changes ------------------ The `check_nrpe` plugin has also been updated to provide more secure encryption and allow the use of client certificates. The command line has several new options, which are outlined below. Both the long and short arguments are presented. `--no-adh` or `-d` will disable the use of ADH. This option is **DEPRECATED**, even though it's new. It will be removed in a future version. `--ssl-version=` or `-S ` specifies minimum SSL/TLS version to use. See the `ssl_version` directive above for possible values. `--cipher-list=` determines which ciphers will and won't be allowed. See the `ssl_cipher_list` directive above. `--client-cert=` or `-C ` specifies an optional client certificate to use. If this value is entered, the next one below is required. `--key-file=` or `-K ` specifies the client certificate key file to use. This goes along with `--client-cert` above. `--ca-cert-file=` or `-A ` specifies the CA certificate to use in order to validate the nrpe daemon's public key. `--no-adh` or `-d` is **DEPRECATED** `--use-adh` or `-d [num]` is **DEPRECATED**, even though it is new. If you use `-d` or `-d 0` it acts the same way as as the old `-d`. Otherwise, use `1` to allow ADH, and `2` to require ADH. `--ssl-logging=` or `-s ` allows you to log some additional data to syslog. OR (or add) values together to have more than one option enabled. See the description of the `ssl_logging` directive from NRPE above. Certificate Generation Example ------------------------------ **Note** _The following example does not follow best practice for creating and running a CA or creating certificates. It is for testing or possibly for use in a small environment. Sloppy security is as bad as no security._ In this example, we are going to put everything in the `/usr/local/nagios/etc/ssl` directory. You may want to use the more common `/etc/ssl` directory, or somewhere else entirely. We are going to assume your company name is Foo Widgets, LLC; the server running the nagios process (and thus the check_nrpe program) is called `nag_serv`; and there are two Linux machines that will run the nrpe daemon: `db_server` and `bobs_workstation`. #### Set up the directories As root, do the following: mkdir -p -m 750 /usr/local/nagios/etc/ssl chown root:nagios /usr/local/nagios/etc/ssl cd /usr/local/nagios/etc/ssl mkdir -m 750 ca chown root:root ca mkdir -m 750 server_certs chown root:nagios server_certs mkdir -m 750 client_certs chown root:nagios client_certs #### Create Certificate Authority If you want to validate client or server certificates, you will need to create a Certificate Authority (CA) that will sign all client and server certificates. If your organization already has a CA, you can use that. As root, do the following: cd /usr/local/nagios/etc/ssl/ca openssl req -x509 -newkey rsa:4096 -keyout ca_key.pem \ -out ca_cert.pem -utf8 -days 3650 When asked, enter a passphrase. Then follow the prompts. You will probably want to include `CA` or `Certificate Authority` in for `Organizational Unit Name` and `Common Name`. For example: Organization Name (eg, company) []:Foo Widgets LLC Organizational Unit Name (eg, section) []:Foo Certificate Authority Common Name (e.g. server FQDN or YOUR name) []:Foo Nagios CA #### Create NRPE Server Certificate Requests For each of the hosts that will be running the nrpe daemon, you will need a server certificate. You can create a key, and the CSR (Certificate Signing Request) separately, but the following commands will do both with one command. As root, do the following: cd /usr/local/nagios/etc/ssl/server_certs openssl req -new -newkey rsa:2048 -keyout db_server.key \ -out db_server.csr -nodes openssl req -new -newkey rsa:2048 -keyout bobs_workstation.key \ -out bobs_workstation.csr -nodes Follow the prompts. The `-nodes` at the end of the lines tells openssl to generate the key without a passphrase. Leave it off if you want someone to enter a passphrase whenever the machine boots. Now you need to sign the CSRs with your CA key. If you have the default `/etc/openssl.cnf`, either change it, or as root, do: cd /usr/local/nagios/etc/ssl mkdir demoCA mkdir demoCA/newcerts touch demoCA/index.txt echo "01" > demoCA/serial chown -R root:root demoCA chmod 700 demoCA chmod 700 demoCA/newcerts chmod 600 demoCA/serial chmod 600 demoCA/index.txt Now, sign the CSRs. As root, do the following: cd /usr/local/nagios/etc/ssl openssl ca -days 365 -notext -md sha256 \ -keyfile ca/ca_key.pem -cert ca/ca_cert.pem \ -in server_certs/db_server.csr \ -out server_certs/db_server.pem chown root:nagios server_certs/db_server.pem chmod 440 server_certs/db_server.pem openssl ca -days 365 -notext -md sha256 \ -keyfile ca/ca_key.pem -cert ca/ca_cert.pem \ -in server_certs/bobs_workstation.csr \ -out server_certs/bobs_workstation.pem chown root:nagios server_certs/bobs_workstation.pem chmod 440 server_certs/bobs_workstation.pem Now, copy the `db_server.pem` and `db_server.key` files to the db_server machine, and the `bobs_workstation.pem` and `bobs_workstation.key` files to bobs_workstation. Copy the `ca/ca_cert.pem` file to both machines. #### Create NRPE Client Certificate Requests Now you need to do the same thing for the machine that will be running the check_nrpe program. cd /usr/local/nagios/etc/ssl/client_certs openssl req -new -newkey rsa:2048 -keyout nag_serv.key \ -out nag_serv.csr -nodes cd /usr/local/nagios/etc/ssl openssl ca -extensions usr_cert -days 365 -notext -md sha256 \ -keyfile ca/ca_key.pem -cert ca/ca_cert.pem \ -in client_certs/nag_serv.csr \ -out client_certs/nag_serv.pem chown root:nagios client_certs/nag_serv.pem chmod 440 client_certs/nag_serv.pem Now, copy the `nag_serv.pem`, `nag_serv.key` and `ca/ca_cert.pem` files to the nag_serv machine, if you did the above on a different computer. Put the location of each computers' three files in the `nrpe.cfg` file or in the check_nrpe command line. You should now have encryption and, if desired, key validation. nrpe-nrpe-4.0.3/README.md000066400000000000000000000234471365211572000147170ustar00rootroot00000000000000![Nagios!](https://www.nagios.com/wp-content/uploads/2015/05/Nagios-Black-500x124.png) [![Build Status](https://travis-ci.org/NagiosEnterprises/nrpe.svg?branch=master)](https://travis-ci.org/NagiosEnterprises/nrpe) 🔴 🔴 🔴 ***Notice: As of NRPE version 4.0.1, this project is deprecated. It will not receive any more bugfixes or features, except to resolve security issues.*** 🔴 🔴 🔴 Nagios Remote Plugin Executor (NRPE) ==================================== For installation instructions and information on the design overview of the NRPE addon, please read the PDF documentation that is found in this directory: `docs/NRPE.pdf`. If you are upgrading from a previous version, you'll want to check the [Changelog](CHANGELOG.md) and then run `./update-cfg.pl` to add the new SSL parameters to your config file. TL;DR: You can jump straight to [Compiling](#compiling) and [Installing](#installing) You'll want to read up on the [Security](SECURITY.md) document regarding NRPE, no doubt. And make sure to check out the [SSL Readme](README.SSL.md) as well, if you plan on using encryption methods to transmit `nrpe` data. Purpose ------- The purpose of this addon is to allow you to execute Nagios plugins on a remote host in as transparent a manner as possible. Contents -------- There are two pieces to this addon: 1. `nrpe` This program runs as a background process on the remote host and processes command execution requests from the check_nrpe plugin on the Nagios host. Upon receiving a plugin request from an authorized host, it will execute the command line associated with the command name it received and send the program output and return code back to the check_nrpe plugin 2. `check_nrpe` This is a plugin that is run on the Nagios host and is used to contact the NRPE process on remote hosts. The plugin requests that a plugin be executed on the remote host and wait for the NRPE process to execute the plugin and return the result. The plugin then uses the output and return code from the plugin execution on the remote host for its own output and return code. Compiling --------- If you are having any problems compiling on your system, please let us know (preferrably with fixes). Most users should be able to compile `nrpe` and the `check_nrpe` plugin with the following commands... ./configure make all ***HINT:*** `./configure --help` **NOTE:** If you're cloning from GitHub, you'll need to run `autoconf` first. **NOTE:** Since the check_nrpe plugin and nrpe daemon run on different machines (the plugin runs on the Nagios host and the daemon runs on the remote host), you will have to compile the nrpe daemon on the target machine. Installing ---------- You have a few options here. The binaries created from `make all` were placed in your `src/` directory. You can either copy these where they need to be, or you can run any of the following `make install` options: * `make install-groups-users` Add the users and groups sepcified during `./configure`. Defaults to nagios and nagios, respectively. You can override these with the `./configure --with-nrpe-user=USER --with-nrpe-group=GROUP`. * `make install` This will run both `install-plugin` and `install-daemon`. * `make install-plugin` This will install the plugin by default in `/usr/local/nagios/libexec`. You can override this behavior by using the `--with-pluginsdir=DIR` flag during `./configure`. * `make install-daemon` This will install the plugin by default in `/usr/local/nagios/bin`. You can override this behavior by using the `--prefix=DIR` or `--bindir=DIR` flags during `./configure`. * `make install-config` This will install the sample config by default in `/usr/local/nagios/etc`. You can override this behavior by using the `--with-pkgsysconfdir=DIR` flag during `./configure`. * `make install-inetd` `./configure` attempts to determine your inetd type. If it finds it, it will install the appropriate inetd script in the proper location. You can help it out with `./configure --with-inetd-type=TYPE` where `TYPE` can be one of: `inetd`, `xinetd`, `systemd`, `launchd`, `smf10`, `smf11`. * `make install-init` `./configure` attempts to determine the appropriate init type. If it figures it out, will install the required startup script. You can help it out with `./configure --with-init-type=TYPE` where TYPE can be one of: `bsd`, `sysv`, `systemd`, `launchd`, `smf10`, `smf11`, `upstart`, `openrc`. If you used all the necessary `./configure` flags, you shouldn't need to tweak your config file any at this point, and a simple `service nrpe start` or `systemctl start nrpe.service` should work just fine. Configuring ----------- A sample config file for the NRPE daemon are located in the `sample-config/` subdirectory. If you used the proper flags during `./configure`, this file should contain all of the appropriate information as a starting point. Running Under `inetd` or `xinetd` --------------------------------- If you plan on running nrpe under inetd or xinetd and making use of TCP wrappers, you need to add a line to your `/etc/services` file as follows (modify the port number as you see fit) nrpe 5666/tcp # NRPE The run `make install-inetd` to copy the appropriate file, or add the appropriate line to your `/etc/inetd.conf`. **NOTE:** If you run nrpe under inetd or xinetd, the server_port and allowed_hosts variables in the nrpe configuration file are ignored. * `inetd` After running `make install-inetd`, your `/etc/inetd.conf` file will contain lines similar to the following: # Enable the following entry to enable the nrpe daemon #nrpe stream tcp nowait nagios /usr/local/nagios/bin/nrpe nrpe -c /usr/local/nagios/etc/nr # Enable the following entry if the nrpe daemon didn't link with libwrap #nrpe stream tcp nowait nagios /usr/sbin/tcpd /usr/local/nagios/bin/nrpe -c /usr/local/nag Un-comment the appropriate line, then Restart inetd: /etc/rc.d/init.d/inet restart OpenBSD users can use the following command to restart inetd: kill -HUP `cat /var/run/inet.pid` Then add entries to your `/etc/hosts.allow` and `/etc/hosts.deny` file to enable TCP wrapper protection for the nrpe service. This is optional, although highly recommended. * `xinetd` If your system uses xinetd instead of inetd, `make install-inetd` will create a file called `nrpe` in your `/etc/xinetd.d` directory that contains a file similar to this: # default: off # description: NRPE (Nagios Remote Plugin Executor) service nrpe { disable = yes socket_type = stream port = @NRPE_PORT@ wait = no user = nagios group = nagios server = /usr/local/nagios/bin/nrpe server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd only_from = 127.0.0.1 log_on_failure += USERID } * Replace `disable = yes` with `disable = no` * Replace the `127.0.0.1` field with the IP addresses of hosts which are allowed to connect to the NRPE daemon. This only works if xinetd was compiled with support for tcpwrappers. * Add entries to your `/etc/hosts.allow` and `/etc/hosts.deny` file to enable TCP wrapper protection for the nrpe service. This is optional, although highly recommended. * Restart xinetd: /etc/rc.d/init.d/xinetd restart Configuring Things On The Nagios Host --------------------------------------- Examples for configuring the nrpe daemon are found in the sample `nrpe.cfg` file included in this distribution. That config file resides on the remote host(s) along with the nrpe daemon. The check_nrpe plugin gets installed on the Nagios host. In order to use the check_nrpe plugin from within Nagios, you will have to define a few things in the host config file. An example command definition for the check_nrpe plugin would look like this: define command{ command_name check_nrpe command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ } In any service definitions that use the nrpe plugin/daemon to get their results, you would set the service check command portion of the definition to something like this (sample service definition is simplified for this example): define service{ host_name someremotehost service_description someremoteservice check_command check_nrpe!yourcommand ... etc ... } where `yourcommand` is a name of a command that you define in your `nrpe.cfg` file on the remote host (see the docs in the sample nrpe.cfg file for more information). License Notice -------------- NRPE - Nagios Remote Plugin Executor Copyright (c) 2017 Nagios Enterprises This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Questions? ---------- If you have questions about this addon, or encounter problems getting things working along the way, your best bet for an answer or quick resolution is to check the [Nagios Support Forums](https://support.nagios.com/forum/viewforum.php?f=5). nrpe-nrpe-4.0.3/SECURITY.md000066400000000000000000000070771365211572000152320ustar00rootroot00000000000000NRPE SECURITY README ==================== TCP Wrapper Support ------------------- NRPE 2.x includes native support for TCP wrappers. Once you compile NRPE you can check to see if it has wrapper support built in by running the daemon from the command line without any arguments like this: ./nrpe --help Command Arguments ----------------- NRPE 2.0 includes the ability for clients to supply arguments to commands which should be run. Please note that this feature should be considered a security risk, and you should only use it if you know what you're doing! Bash Command Substitution ------------------------- Even with the metacharacter restrictions below, if command arguments are enabled, it is still possible to send bash command substitutions in the form `$(...)` as an argument. This is explicitly disabled by default, but can be enabled by a configure-time option and a configuration file option. Enabling this option is **VERY RISKY** and its use is **HIGHLY DISCOURAGED**. Enabling Arguments ------------------ To enable support for command argument in the daemon, you must do two things: 1. Run the configure script with the `--enable-command-args` option 2. Set the `dont_blame_nrpe` directive in the NRPE config file to `1`. Enabling Bash Command Substitution ---------------------------------- To enable support for arguments containing bash command substitutions, you must do two things: 1. Enable arguments as described above 2. Include the `--enable-bash-command-substitution` configure option when running the configure script 3. Set the `allow_bash_command_substitutions` directive in the NRPE config file to `1`. Nasty Metacharacters -------------------- To help prevent some nasty things from being done by evil clients, the following metacharacters are not allowed in client command arguments: | ` & > < ' \ [ ] { } ; ! \r \n You can override these defaults by adjusting the `nasty_metachars` flag in the config file. Any client request which contains the above mentioned metachars is discarded. User/Group Restrictions ----------------------- The NRPE daemon cannot be run with (effective) root user/group privileges. You must run the daemon with an account that does not have superuser rights. Use the `--with-nrpe-user` and `--with-nrpe-group` flags during `./configure`, or the `nrpe_user` and `nrpe_group` config file options to specify which user/group the daemon should run as. Encryption ---------- If you do enable support for command arguments in the NRPE daemon, make sure that you encrypt communications either by using: 1. Stunnel (see http://www.stunnel.org for more info) 2. Native SSL support (See the [SSL Readme](README.SSL.md) file for more info) Do **NOT** assume that just because the daemon is behind a firewall that you are safe! ***Always encrypt NRPE traffic!*** Using Arguments --------------- How do you use command arguments? Well, lets say you define a command in the NRPE config file that looks like this: command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$ You could then call the check_nrpe plugin like this: ./check_nrpe -H -c check_users -a 5 10 The arguments '5' and '10' get substituted into the appropriate `$ARGx$` macros in the command (`$ARG1$` and `$ARG2$`, respectively). The command that would be executed by the NRPE daemon would look like this: /usr/local/nagios/libexec/check_users -w 5 -c 10 You can supply up to 16 arguments to be passed to the command for substitution in `$ARG$` macros (`$ARG1$` - `$ARG16$`). nrpe-nrpe-4.0.3/THANKS000066400000000000000000000014161365211572000143430ustar00rootroot00000000000000Alex Weber Andrea Morgan-Brist Andrew Boyce-Lewis Andrew Ryder Andrew Widdersheim Bartosz Woronicz Bas Couwenberg Bill Mitchell Bjoern Beutel Brian Seklecki Bryan Heden Derrick Bennett Elan Ruusamäe Eric Mislivec Eric Stanley Gerhard Lausser Graham Collinson Grant Byers Grégory Starck jaclu@grm.se James Peterson Jari Takkala Jason Cook Jobst Schmalenbach John Frickson John Maag Jon Andrews Josh Soref Kaspersky Lab Kevin Pendleton Konstantin Malov Krzysztof Oledzki Leo Baltus Mark Plaksin Matthew L. Daniel Matthias Flacke Niels Endres Patric Wust Peter Palfrader Philippe Kueck Rene Klootwijk Robert Peaslee Ruben Kerkhof Ryan McGarry Ryan Ordway Sean Finney Spenser Reinhardt Stefan Krüger Stephen Smoogen Subhendu Ghosh Sven Nierlein Thierry Bertaud Ton Voon Vadim Antipovnrpe-nrpe-4.0.3/aclocal.m4000077500000000000000000000004331365211572000152710ustar00rootroot00000000000000m4_include([macros/ax_nagios_get_os]) m4_include([macros/ax_nagios_get_distrib]) m4_include([macros/ax_nagios_get_init]) m4_include([macros/ax_nagios_get_inetd]) m4_include([macros/ax_nagios_get_paths]) m4_include([macros/ax_nagios_get_files]) m4_include([macros/ax_nagios_get_ssl]) nrpe-nrpe-4.0.3/build-aux/000077500000000000000000000000001365211572000153205ustar00rootroot00000000000000nrpe-nrpe-4.0.3/build-aux/config.guess000077500000000000000000001244211365211572000176440ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-11-04' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac case "${UNAME_MACHINE}" in i?86) test -z "$VENDOR" && VENDOR=pc ;; *) test -z "$VENDOR" && VENDOR=unknown ;; esac test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-${VENDOR}-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-${VENDOR}-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-${VENDOR}-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-${VENDOR}-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-${VENDOR}-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-${VENDOR}-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-${VENDOR}-osf1mk else echo ${UNAME_MACHINE}-${VENDOR}-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-${VENDOR}-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-${VENDOR}-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-${VENDOR}-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-${VENDOR}-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-${VENDOR}-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-${VENDOR}-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-${VENDOR}-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-${VENDOR}-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-${VENDOR}-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-${VENDOR}-linux-${LIBC} ;; PA8*) echo hppa2.0-${VENDOR}-linux-${LIBC} ;; *) echo hppa-${VENDOR}-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-${VENDOR}-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-${VENDOR}-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-${VENDOR}-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-${VENDOR}-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-${VENDOR}-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-${VENDOR}-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-${VENODR}-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-${VENODR}-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-${VENDOR}-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-${VENDOR}-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-${VENDOR}-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-${VENDOR}-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-${VENDOR}-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-${VENDOR}-tops10 exit ;; *:TENEX:*:*) echo pdp10-${VENDOR}-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-${VENDOR}-tops20 exit ;; *:ITS:*:*) echo pdp10-${VENDOR}-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-${VENDOR}-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: nrpe-nrpe-4.0.3/build-aux/config.sub000077500000000000000000001062231365211572000173070ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-12-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: nrpe-nrpe-4.0.3/build-aux/custom_help.m4000077500000000000000000000111551365211572000201120ustar00rootroot00000000000000# _AC_INIT_HELP # ------------- # Handle the `configure --help' message. m4_define([_AC_INIT_HELP], [m4_divert_push([HELP_BEGIN])dnl # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures m4_ifset([AC_PACKAGE_STRING], [AC_PACKAGE_STRING], [this package]) to adapt to many kinds of systems. Usage: $[0] [[OPTION]]... [[VAR=VALUE]]... [To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local/nagios] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`/usr/local/nagios/bin', \`/usr/local/nagios/lib' etc. You can specify an installation prefix other than \`/usr/local/nagios' using \`--prefix', for instance \`--prefix=$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR plugins, brokers, CGI [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR r/o arch.-independent data [DATAROOTDIR/PKG_NAME] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] _ACEOF cat <<\_ACEOF] m4_divert_pop([HELP_BEGIN])dnl dnl The order of the diversions here is dnl - HELP_BEGIN dnl which may be extended by extra generic options such as with X or dnl AC_ARG_PROGRAM. Displayed only in long --help. dnl dnl - HELP_CANON dnl Support for cross compilation (--build, --host and --target). dnl Display only in long --help. dnl dnl - HELP_ENABLE dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section, dnl then implements the header of the non generic options. dnl dnl - HELP_WITH dnl dnl - HELP_VAR dnl dnl - HELP_VAR_END dnl dnl - HELP_END dnl initialized below, in which we dump the trailer (handling of the dnl recursion for instance). m4_divert_push([HELP_ENABLE])dnl _ACEOF fi if test -n "$ac_init_help"; then m4_ifset([AC_PACKAGE_STRING], [ case $ac_init_help in short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";; esac]) cat <<\_ACEOF m4_divert_pop([HELP_ENABLE])dnl m4_divert_push([HELP_END])dnl Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [], [the package provider]).dnl m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [ AC_PACKAGE_NAME home page: .])dnl m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [ General help using GNU software: .])]) _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue _AC_SRCDIRS(["$ac_dir"]) cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else AC_MSG_WARN([no configuration information is in $ac_dir]) fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status m4_divert_pop([HELP_END])dnl ])# _AC_INIT_HELP nrpe-nrpe-4.0.3/build-aux/install-sh000077500000000000000000000345231365211572000173330ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: nrpe-nrpe-4.0.3/configure000077500000000000000000007463361365211572000153600ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for nrpe newdate. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: nagios-users@lists.sourceforge.net about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nrpe' PACKAGE_TARNAME='nrpe' PACKAGE_VERSION='newdate' PACKAGE_STRING='nrpe newdate' PACKAGE_BUGREPORT='nagios-users@lists.sourceforge.net' PACKAGE_URL='https://www.nagios.org/downloads/nagios-core-addons/' ac_unique_file="src/nrpe.c" ac_default_prefix=/usr/local/nagios # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='PERL sslbin PKG_CONFIG SSL_LIB_DIR SSL_INC_PREFIX SSL_HDR SSL_INC_DIR SSL_TYPE HAVE_SSL EGREP GREP CPP SET_MAKE OBJEXT EXEEXT ac_ct_CC CPPFLAGS CFLAGS CC LTLIBOBJS LIBOBJS bsd_enable src_tmpfile src_inetd src_init subsyslockfile subsyslockdir tmpfilesd inetddir initdir spooldir pipedir piddir logdir pkglocalstatedir privatesysconfdir webdir cgibindir brokersdir pluginsdir inetdname initname objsysconfdir pkgsysconfdir inetd_type init_type dist_ver dist_type arch opsys INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM TARGET_PLATFORM TARGET_ARCH TARGET_OS TARGET_VER NAGIOS_INSTALL_OPTS nagios_group nagios_user nrpe_port nrpe_group nrpe_user log_facility NRPE_INSTALL_OPTS LIBWRAPLIBS SOCKETLIBS OTHERLIBS LDFLAGS SNPRINTF_O INSTALL RPM_RELEASE PKG_REL_DATE PKG_HOME_URL PKG_VERSION PKG_NAME target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_opsys with_dist_type with_init_type with_inetd_type enable_install_method enable_showdirs_only with_pkgsysconfdir with_objsysconfdir with_privatesysconfdir with_webdir with_pluginsdir with_brokersdir with_cgibindir with_logdir with_piddir with_pipedir enable_ssl with_need_dh with_ssl with_ssl_inc with_ssl_lib with_kerberos_inc with_log_facility with_nrpe_user with_nrpe_group with_nrpe_port with_nagios_user with_nagios_group enable_command_args enable_bash_command_substitution ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures nrpe newdate to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local/nagios] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`/usr/local/nagios/bin', \`/usr/local/nagios/lib' etc. You can specify an installation prefix other than \`/usr/local/nagios' using \`--prefix', for instance \`--prefix=$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR plugins, brokers, CGI [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR r/o arch.-independent data [DATAROOTDIR/PKG_NAME] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of nrpe newdate:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-install-method= sets the install method to use: 'default' (the default) will install to /usr/local/nagios, 'os' will try to determine which method to use based on OS type and distribution. Fine tuning using the '--bindir', etc. overrides above will still work --enable-showdirs-only=yes This option will cause 'configure' to stop after determining the install locations based on '--enable-install-method', so you can see the destinations before a full './configure', 'make', 'make install' process. --disable-ssl disables native SSL support [default=check] --enable-command-args allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option! --enable-bash-command-substitution allows clients to pass bash command substitutions of the form $(command). *** THIS IS A HIGH SECURITY RISK! *** Read the SECURITY file before using this option! Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-opsys=OS specify operating system (linux, osx, bsd, solaris, irix, cygwin, aix, hp-ux, etc.) --with-dist-type=type specify distribution type (suse, rh, debian, etc.) --with-init-type=type specify init type (bsd, sysv, systemd, launchd, smf10, smf11, upstart, openrc, etc.) --with-inetd-type=type which super-server the system runs (inetd, xinetd, systemd, launchd, smf10, smf11, etc.) --with-pkgsysconfdir=DIR where configuration files should be placed --with-objsysconfdir=DIR where object configuration files should be placed --with-privatesysconfdir=DIR where private configuration files should be placed --with-webdir=DIR where the website files should be placed --with-pluginsdir=DIR where the plugins should be placed --with-brokersdir=DIR where the broker modules should be placed --with-cgibindir=DIR where the CGI programs should be placed --with-logdir=DIR where log files should be placed --with-piddir=DIR where the PID file should be placed --with-pipedir=DIR where socket and pipe files should be placed --with-need-dh set to 'no' to not include Diffie-Hellman SSL logic --with-ssl=DIR sets location of the SSL installation --with-ssl-inc=DIR sets location of the SSL include files --with-ssl-lib=DIR sets location of the SSL libraries --with-kerberos-inc=DIR sets location of the Kerberos include files --with-log-facility= sets NRPE syslog facility --with-nrpe-user= sets user name to run NRPE --with-nrpe-group= sets group name to run NRPE --with-nrpe-port= sets port number for NRPE to listen on --with-nagios-user= sets user name for file permissions --with-nagios-group= sets group name file permissions Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . nrpe home page: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF nrpe configure newdate generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------------- ## ## Report this to nagios-users@lists.sourceforge.net ## ## ------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by nrpe $as_me newdate, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. PKG_NAME=nrpe PKG_VERSION="4.0.3" PKG_HOME_URL="http://www.nagios.org/" PKG_REL_DATE="2020-04-28" RPM_RELEASE=1 LANG=C LC_ALL=C LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C LC_MONETARY=C LC_NUMERIC=C LC_TIME=C # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # # Get user hints # { $as_echo "$as_me:${as_lineno-$LINENO}: checking what the operating system is " >&5 $as_echo_n "checking what the operating system is ... " >&6; } # Check whether --with-opsys was given. if test "${with_opsys+set}" = set; then : withval=$with_opsys; # # Run this if --with was specified # if test "x$withval" = x -o x$withval = xno; then opsys_wanted=yes else opsys_wanted=no opsys="$withval" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $opsys" >&5 $as_echo "$opsys" >&6; } fi else # # Run this if --with was not specified # opsys_wanted=yes fi if test x$opsys = xno; then opsys="" opsys_wanted=yes elif test x$opsys = xyes; then as_fn_error $? "you must enter an O/S type if '--with-opsys' is specified" "$LINENO" 5 fi # # Determine operating system if it wasn't supplied # if test $opsys_wanted=yes; then opsys=`uname -s | tr "[A-Z]" "[a-z]"` if test x"$opsys" = "x"; then opsys="unknown"; fi case $opsys in #( darwin*) : opsys="osx" ;; #( *bsd*) : opsys="bsd" ;; #( dragonfly) : opsys="bsd" ;; #( sunos) : opsys="solaris" ;; #( gnu/hurd) : opsys="linux" ;; #( irix*) : opsys="irix" ;; #( cygwin*) : opsys="cygwin" ;; #( mingw*) : opsys="mingw" ;; #( msys*) : opsys="msys" ;; #( *) : ;; esac fi arch=`uname -m | tr "[A-Z]" "[a-z]"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $opsys" >&5 $as_echo "$opsys" >&6; } # # Get user hints for possible cross-compile # { $as_echo "$as_me:${as_lineno-$LINENO}: checking what the distribution type is " >&5 $as_echo_n "checking what the distribution type is ... " >&6; } # Check whether --with-dist-type was given. if test "${with_dist_type+set}" = set; then : withval=$with_dist_type; # # Run this if --with was specified # if test "x$withval" = x -o x$withval = xno; then dist_type_wanted=yes else dist_type_wanted=no dist_type="$withval" dist_ver="unknown" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dist_type" >&5 $as_echo "$dist_type" >&6; } fi else # # Run this if --with was not specified # dist_type_wanted=yes fi if test x$dist_type = xno; then dist_type_wanted=yes elif test x$dist_type = xyes; then as_fn_error $? "you must enter a distribution type if '--with-dist-type' is specified" "$LINENO" 5 fi # # Determine distribution type if it wasn't supplied # dist_ver="unknown" if test $dist_type_wanted=yes; then dist_type="unknown" if test "$opsys" != "linux"; then dist_type="$opsys" case $opsys in #( bsd) : dist_type=`uname -s | tr "A-Z" "a-z"` dist_ver=`uname -r` ;; #( aix) : dist_ver="`uname -v`.`uname -r`" ;; #( hp-ux) : dist_ver=`uname -r | cut -d'.' -f1-3` ;; #( solaris) : dist_ver=`uname -r | cut -d'.' -f2` ;; #( *) : dist_ver=$OSTYPE ;; #( *) : ;; esac else if test -r "/etc/gentoo-release"; then dist_type="gentoo" dist_ver=`cat /etc/gentoo-release` elif test -r "/etc/os-release"; then . /etc/os-release if test x"$ID_LIKE" != x; then dist_type=`echo $ID_LIKE | cut -d' ' -f1 | tr "[A-Z]" "[a-z]"` elif test x"$ID" = xol; then dist_type=rh else dist_type=`echo $ID | tr "[A-Z]" "[a-z]"` fi if test x"$dist_type" = sles; then dist_type=suse fi if test x"$VERSION_ID" != x; then dist_ver=$VERSION_ID elif test x"$VERSION" != x; then dist_ver=`echo $VERSION | cut -d'.' -f1 | tr -d :alpha::blank::punct:` fi elif test -r "/etc/redhat-release"; then dist_type=rh dist_ver=`cat /etc/redhat-release` elif test -r "/etc/debian_version"; then dist_type="debian" if test -r "/etc/lsb-release"; then . /etc/lsb-release dist_ver=`echo "$DISTRIB_RELEASE"` else dist_ver=`cat /etc/debian_version` fi elif test -r "/etc/SuSE-release"; then dist_type=suse dist_ver=`grep VERSION /etc/SuSE-release` fi fi if test "$dist_ver" != "unknown"; then dist_ver=`echo "$dist_ver" | cut -d'.' -f1 | tr -d :alpha::blank::punct:` fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dist_type" >&5 $as_echo "$dist_type" >&6; } # # Get user hints for possible cross-compile # { $as_echo "$as_me:${as_lineno-$LINENO}: checking what init system is being used " >&5 $as_echo_n "checking what init system is being used ... " >&6; } # Check whether --with-init_type was given. if test "${with_init_type+set}" = set; then : withval=$with_init_type; # # Run this if --with was specified # if test "x$withval" = x -o x$withval = xno; then init_type_wanted=yes else init_type_wanted=no init_type="$withval" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $init_type" >&5 $as_echo "$init_type" >&6; } fi else # # Run this if --with was not specified # init_type_wanted=yes fi if test x$init_type = xno; then init_type_wanted=yes elif test x$init_type = xyes; then as_fn_error $? "you must enter an init type if '--with-init-type' is specified" "$LINENO" 5 fi # # Determine init type if it wasn't supplied # if test $init_type_wanted = yes; then init_type="" if test x"$opsys" = x; then init_type="unknown" init_type_wanted=no elif test x"$dist_type" = x; then init_type="unknown" init_type_wanted=no elif test "$opsys" = "osx"; then init_type="launchd" init_type_wanted=no elif test "$opsys" = "bsd"; then init_type="newbsd" init_type_wanted=no elif test "$dist_type" = "solaris"; then if test -d "/lib/svc/manifest"; then init_type="smf11" init_type_wanted=no elif test -d "/lib/svc/monitor"; then init_type="smf10" init_type_wanted=no else init_type="sysv" init_type_wanted=no fi elif test "$dist_type" = "slackware"; then init_type="bsd" init_type_wanted=no elif test "$dist_type" = "aix"; then init_type="bsd" init_type_wanted=no elif test "$dist_type" = "hp-ux"; then init_type="unknown" init_type_wanted=no fi fi PSCMD="ps -p1 -o args" if test $dist_type = solaris; then PSCMD="env UNIX95=1; ps -p1 -o args" fi if test "$init_type_wanted" = yes; then pid1=`$PSCMD | grep -vi COMMAND | cut -d' ' -f1` if test x"$pid1" = "x"; then init_type="unknown" init_type_wanted=no fi if `echo $pid1 | grep "systemd" > /dev/null`; then init_type="systemd" init_type_wanted=no fi if test "$init_type_wanted" = yes; then if test "$pid1" = "init"; then if test -e "/sbin/init"; then pid1="/sbin/init"; elif test -e "/usr/sbin/init"; then pid1="/usr/sbin/init" else init_type="unknown" init_type_wanted=no fi fi if test -L "$pid1"; then pid1=`readlink "$pid1"` fi fi if test "$init_type_wanted" = yes; then if `echo $pid1 | grep "systemd" > /dev/null`; then init_type="systemd" init_type_wanted=no elif test -f "/sbin/rc"; then if test -f /sbin/runscript; then init_type_wanted=no if `/sbin/start-stop-daemon -V | grep "OpenRC" > /dev/null`; then init_type="openrc" else init_type="gentoo" fi fi fi fi if test "$init_type_wanted" = yes; then if test "$pid1" = "/sbin/init" -o "$pid1" = "/usr/sbin/init"; then if `$pid1 --version 2>/dev/null | grep "upstart" >/dev/null`; then init_type="upstart" init_type_wanted=no elif test -f "/etc/rc" -a ! -L "/etc/rc"; then init_type="newbsd" init_type_wanted=no else init_type="sysv" init_type_wanted=no fi fi fi if test "$init_type_wanted" = yes; then init_type="unknown" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $init_type" >&5 $as_echo "$init_type" >&6; } # # Get user hints for possible cross-compile # { $as_echo "$as_me:${as_lineno-$LINENO}: checking what inetd is being used " >&5 $as_echo_n "checking what inetd is being used ... " >&6; } # Check whether --with-inetd_type was given. if test "${with_inetd_type+set}" = set; then : withval=$with_inetd_type; inetd_type_wanted=yes # # Run this if --with was specified # if test "x$withval" = x -o x$withval = xno; then inetd_type_wanted=yes else inetd_type_wanted=no inetd_type="$withval" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $inetd_type" >&5 $as_echo "$inetd_type" >&6; } fi else # # Run this if --with was not specified # inetd_type_wanted=yes fi if test x$inetd_type = xno; then inetd_type_wanted=yes elif test x$inetd_type = xyes; then as_fn_error $? "you must enter an inetd type if '--with-inetd-type' is specified" "$LINENO" 5 fi # # Determine inetd type if it wasn't supplied # if test $inetd_type_wanted = yes; then inetd_disabled="" case $dist_type in #( solaris) : if test x"$init_type" = "xsmf10" -o x"$init_type" = "xsmf11"; then inetd_type="$init_type" else inetd_type="inetd" fi ;; #( *bsd*) : inetd_type=`ps -A -o comm -c | grep inetd` ;; #( osx) : inetd_type=`launchd` ;; #( aix|hp-ux) : inetd_type=`UNIX95= ps -A -o comm | grep inetd | head -1` ;; #( *) : inetd_type=`ps -C "inetd,xinetd" -o fname | grep -vi COMMAND | head -1` ;; #( *) : ;; esac if test x"$inetd_type" = x; then if test -f /etc/xinetd.conf -a -d /etc/xinetd.d; then inetd_disabled="(Not running)" inetd_type=xinetd elif test -f /etc/inetd.conf -o -f /usr/sbin/inetd; then inetd_type=inetd inetd_disabled="(Not running)" fi fi if test x"$inetd_type" = x; then if test x"$init_type" = "xupstart"; then inetd_type="upstart" fi fi if test x"$inetd_type" = x; then if test x"$init_type" = "xsystemd"; then inetd_type="systemd" else inetd_type="unknown" fi fi if test -n "$inetd_disabled"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $inetd_type $inetd_disabled" >&5 $as_echo "$inetd_type $inetd_disabled" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $inetd_type" >&5 $as_echo "$inetd_type" >&6; } fi fi if test x$DBG_PATHS != x; then echo echo Incoming paths: echo " prefix $prefix" echo " exec_prefix $exec_prefix" echo " bindir $bindir" echo " sbindir $sbindir" echo " libexecdir $libexecdir" echo " sysconfdir $sysconfdir" echo " localstatedir $localstatedir" echo " datarootdir $datarootdir" echo " datadir $datadir" echo " localedir $localedir" echo fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which paths to use " >&5 $as_echo_n "checking for which paths to use ... " >&6; } # Check whether --enable-install_method was given. if test "${enable_install_method+set}" = set; then : enableval=$enable_install_method; install_method=$enableval else install_method=default fi # Check whether --enable-showdirs_only was given. if test "${enable_showdirs_only+set}" = set; then : enableval=$enable_showdirs_only; showdirs_only=$enableval else showdirs_only=no fi case $install_method in #( yes) : install_method="os" ;; #( no) : install_method="default" ;; #( default|os) : : ;; #( *) : echo >&6; as_fn_error $? "'--enable-install-method=$install_method' is invalid" "$LINENO" 5 ;; #( *) : ;; esac if test $showdirs_only != "no"; then showdirs_only="yes"; fi case $dist_type in #( *solaris*|*hp-ux*|*aix*|*osx*) : opsys=unix ;; #( *) : ;; esac # Does this package need to know: need_cgi=no # where the cgi-bin directory is need_web=no # where the website directory is need_brk=no # where the event broker modules directory is need_plg=no # where the plugins directory is need_pipe=no # where the pipe directory is need_spl=no # where the spool directory is need_loc=no # where the locale directory is need_log_subdir=no # where the loc sub-directory is need_etc_subdir=no # where the etc sub-directory is need_pls_dir=no # where the package locate state directory is if test x"$INIT_PROG" = x; then INIT_PROG="$PKG_NAME" fi case $PKG_NAME in #( nagios) : need_log_subdir=yes need_etc_subdir=yes need_pls_dir=yes need_brk=yes need_pipe=yes need_spl=yes need_loc=yes need_cgi=yes need_web=yes ;; #( ndoutils) : need_brk=yes need_spl=yes ;; #( nrpe) : need_plg=yes ;; #( nsca) : need_cgi=no ;; #( plugins) : need_loc=yes need_plg=yes ;; #( *) : ;; esac # Check whether --with-pkgsysconfdir was given. if test "${with_pkgsysconfdir+set}" = set; then : withval=$with_pkgsysconfdir; if test x$withval != x -a x$withval != xno -a x$withval != xyes; then pkgsysconfdir="$withval" fi fi # Check whether --with-objsysconfdir was given. if test "${with_objsysconfdir+set}" = set; then : withval=$with_objsysconfdir; if test x$withval != x -a x$withval != xno -a x$withval != xyes; then objsysconfdir="$withval" fi fi # Check whether --with-privatesysconfdir was given. if test "${with_privatesysconfdir+set}" = set; then : withval=$with_privatesysconfdir; if test x$withval != x -a x$withval != xno -a x$withval != xyes; then privatesysconfdir="$withval" fi fi # Check whether --with-webdir was given. if test "${with_webdir+set}" = set; then : withval=$with_webdir; if test x$withval != x -a x$withval != xno -a x$withval != xyes; then webdir="$withval" fi fi # Check whether --with-pluginsdir was given. if test "${with_pluginsdir+set}" = set; then : withval=$with_pluginsdir; if test x$withval != x -a x$withval != xno -a x$withval != xyes; then pluginsdir="$withval" fi fi # Check whether --with-brokersdir was given. if test "${with_brokersdir+set}" = set; then : withval=$with_brokersdir; if test x$withval != x -a x$withval != xno -a x$withval != xyes; then brokersdir="$withval" fi fi # Check whether --with-cgibindir was given. if test "${with_cgibindir+set}" = set; then : withval=$with_cgibindir; if test x$withval != x -a x$withval != xno -a x$withval != xyes; then cgibindir="$withval" fi fi # Check whether --with-logdir was given. if test "${with_logdir+set}" = set; then : withval=$with_logdir; if test x$withval != x -a x$withval != xno -a x$withval != xyes; then logdir="$withval" fi fi # Check whether --with-piddir was given. if test "${with_piddir+set}" = set; then : withval=$with_piddir; if test x$withval != x -a x$withval != xno -a x$withval != xyes; then piddir="$withval" fi fi # Check whether --with-pipedir was given. if test "${with_pipedir+set}" = set; then : withval=$with_pipedir; if test x$withval != x -a x$withval != xno -a x$withval != xyes; then pipedir="$withval" fi fi # # Setup the base directory # if test $install_method = "default"; then if test $opsys = "unix"; then if test x"$prefix" = "xNONE"; then prefix="/usr/local/nagios"; fi else if test x"$prefix" = "xNONE"; then prefix=${ac_default_prefix}; fi fi datarootdir=${datarootdir="$prefix"} else if test x"$datadir" = x'${datarootdir}'; then { datadir=; unset datadir;}; fi if test x"$sysconfdir" = x'${prefix}/etc'; then { sysconfdir=; unset sysconfdir;}; fi if test x"$prefix" = "xNONE"; then if test $dist_type = freebsd -o $dist_type = openbsd -o $dist_type = osx; then prefix="/usr/local" elif test $dist_type = netbsd; then prefix="/usr/pkg" else prefix="/usr" fi fi if test x"$exec_prefix" = "xNONE"; then exec_prefix=$prefix; fi if test x"$localstatedir" = x'${prefix}/var'; then if test $dist_type = "osx"; then localstatedir="/private/var" else localstatedir="/var" fi fi if test $opsys = "unix"; then if test x"$datarootdir" = x'${prefix}/share'; then if test $dist_type = "hp-ux"; then datarootdir="/usr/local/share" if test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir="/usr/nagios" fi elif test $dist_type = "osx"; then datarootdir="/usr/local/share" if test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir="/usr/local/nagios" fi elif test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir="/usr/lib/nagios" fi fi if test $dist_type = "osx"; then if test x"$sbindir" = x'${exec_prefix}/sbin'; then sbindir="$libexecdir" fi if test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir="/usr/local/libexec/nagios" fi fi elif test $opsys = "bsd"; then if test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir=${exec_prefix}/libexec/nagios; fi elif test x"$libexecdir" = x'${exec_prefix}/lib'; then libexecdir=${libexecdir}/nagios; elif test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir=${exec_prefix}/lib/nagios; fi fi if test x"$exec_prefix" = "xNONE"; then exec_prefix=${prefix}; fi tmpfilesd=${tmpfilesd="/usr/lib/tmpfiles.d"} if test ! -d "$tmpfilesd"; then tmpfilesd="N/A" else tmpfilesd="$tmpfilesd/$INIT_PROG.conf" fi subsyslockdir=${subsyslockdir="/var/lock/subsys"} if test ! -d "$subsyslockdir"; then subsyslockdir="N/A" subsyslockfile="N/A" else subsyslockfile="$subsyslockdir/$INIT_PROG" fi if test "$need_loc" = no; then localedir="N/A" fi if test $install_method = "default" ; then # # Do the default setup # sbindir=${bindir} datadir=${datadir="$datarootdir"} if test $need_web = yes; then webdir=${webdir="$datadir"} else webdir="N/A" fi if test $opsys = "unix"; then sysconfdir=${sysconfdir="/etc/opt"} fi pkgsysconfdir=${pkgsysconfdir="$sysconfdir"} if test $need_etc_subdir = yes; then objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"} else objsysconfdir="N/A" fi privatesysconfdir=${privatesysconfdir="$pkgsysconfdir"} logdir=${logdir="$localstatedir"} piddir=${piddir="$localstatedir"} if test "$need_pipe" = yes; then pipedir=${pipedir="$localstatedir/rw"} else pipedir="N/A" fi if test "$need_pls_dir" = yes; then pkglocalstatedir=${pkglocalstatedir="$localstatedir"} else pkglocalstatedir="N/A" fi if test "$need_spl" = yes; then spooldir=${spooldir="$localstatedir/var"} else spooldir="N/A" fi if test $need_brk = yes; then brokersdir=${brokersdir="$bindir"} else brokersdir="N/A" fi if test $need_plg = yes; then pluginsdir=${pluginsdir="$libexecdir"} else pluginsdir="N/A" fi if test $need_cgi = yes; then cgibindir=${cgibindir="$prefix/sbin"} else cgibindir="N/A" fi elif test $opsys = "linux"; then # # Linux "Standard" install # install_method="$install_method : FHS" datadir=${datadir="$datarootdir/nagios"} if test $need_web = yes; then webdir=${webdir="$datadir/html"} else webdir="N/A" fi sysconfdir=${sysconfdir="/etc"} pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"} if test $need_etc_subdir = yes; then objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"} else objsysconfdir="N/A" fi privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"} if test $need_log_subdir = yes; then logdir=${logdir="$localstatedir/log/$INIT_PROG"} else logdir=${logdir="$localstatedir/log"} fi piddir=${piddir="$localstatedir/run/${INIT_PROG}"} if test "$need_pipe" = yes; then pipedir=${pipedir="$localstatedir/run/${INIT_PROG}"} else pipedir="N/A" fi if test "$need_pls_dir" = yes; then pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$INIT_PROG"} else pkglocalstatedir="N/A" fi if test "$need_spl" = yes; then spooldir=${spooldir="$localstatedir/spool/$INIT_PROG"} else spooldir="N/A" fi if test $need_brk = yes; then brokersdir=${brokersdir="$libexecdir/brokers"} else brokersdir="N/A" fi if test $need_plg = yes; then pluginsdir=${pluginsdir="$libexecdir/plugins"} else pluginsdir="N/A" fi if test $need_cgi = yes; then cgibindir=${cgibindir="$libexecdir/cgi-bin"} else cgibindir="N/A" fi elif test $opsys = "unix"; then # # "Standard" Unix install # install_method="$install_method : Unix Standard" if test $dist_type = osx; then install_method="$install_method : OS X Standard" sbindir=${sbindir="/usr/local/libexec"} fi datadir=${datadir="$datarootdir/nagios"} if test $need_web = yes; then webdir=${webdir="$datadir/html"} else webdir="N/A" fi if test $dist_type = osx; then sysconfdir=${sysconfdir="/private/etc"} else sysconfdir=${sysconfdir="/etc"} fi pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"} if test $need_etc_subdir = yes; then objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"} else objsysconfdir="N/A" fi privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"} if test "$need_pls_dir" = yes; then pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$INIT_PROG"} else pkglocalstatedir="N/A" fi if test "$need_loc" = yes; then localedir=${localedir="/usr/local/share/locale//LC_MESSAGES/nagios-plugins.mo"} fi if test "$need_spl" = yes; then spooldir=${spooldir="$localstatedir/spool/$INIT_PROG"} else spooldir="N/A" fi if test $need_brk = yes; then brokersdir=${brokersdir="$libexecdir/brokers"} else brokersdir="N/A" fi if test $need_plg = yes; then pluginsdir=${pluginsdir="$libexecdir/plugins"} else pluginsdir="N/A" fi if test $need_cgi = yes; then cgibindir=${cgibindir="$libexecdir/cgi-bin"} else cgibindir="N/A" fi case $dist_type in #( *hp-ux*) : piddir=${piddir="$pkgsysconfdir"} pipedir=${pipedir="$pkglocalstatedir"} logdir=${logdir="$pkglocalstatedir/log"} ;; #( *) : piddir=${piddir="$localstatedir/run/${INIT_PROG}"} if test "$need_pipe" = yes; then pipedir=${pipedir="$localstatedir/run/${INIT_PROG}"} else pipedir="N/A" fi if test $need_log_subdir = yes; then logdir=${logdir="$localstatedir/log/$INIT_PROG"} else logdir=${logdir="$localstatedir/log"} fi ;; #( *) : ;; esac elif test $opsys = "bsd"; then # # "Standard" BSD install # install_method="$install_method : BSD" if test $dist_type = freebsd -o $dist_type = openbsd; then prefix=${prefix="/usr/local"} exec_prefix=${exec_prefix="/usr/local"} if test $dist_type = freebsd; then install_method="$install_method : FreeBSD" else install_method="$install_method : OpenBSD" fi elif test $dist_type = netbsd; then prefix=${prefix="/usr/pkg"} exec_prefix=${exec_prefix="/usr/pkg"} install_method="$install_method : NetBSD" fi datadir=${datadir="$datarootdir/nagios"} if test $need_web = yes -o $need_cgi = yes; then if test $dist_type = freebsd; then webdir=${webdir="$prefix/www/nagios"} elif test $dist_type = netbsd; then webdir=${webdir="$prefix/share/nagios"} elif test $dist_type = openbsd; then webdir=${webdir="/var/www/nagios"} fi else webdir="N/A" fi if test $dist_type = freebsd; then sysconfdir=${sysconfdir="/usr/local/etc"} else sysconfdir=${sysconfdir="/etc"} fi pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"} if test $need_etc_subdir = yes; then objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"} else objsysconfdir="N/A" fi privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"} if test "$need_pls_dir" = yes; then pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$INIT_PROG"} else pkglocalstatedir="N/A" fi if test "$need_loc" = yes; then localedir=${localedir="/usr/local/share/locale//LC_MESSAGES/nagios-plugins.mo"} fi if test "$need_spl" = yes; then spooldir=${spooldir="$localstatedir/spool/$INIT_PROG"} else spooldir="N/A" fi if test $need_brk = yes; then brokersdir=${brokersdir="$libexecdir/brokers"} else brokersdir="N/A" fi if test $need_plg = yes; then pluginsdir=${pluginsdir="$libexecdir/plugins"} else pluginsdir="N/A" fi if test $need_cgi = yes; then if test $dist_type = freebsd; then cgibindir=${cgibindir="$webdir/cgi-bin"} elif test $dist_type = netbsd; then cgibindir=${pluginsdir="$libexecdir/cgi-bin"} elif test $dist_type = openbsd; then cgibindir=${pluginsdir="/var/www/cgi-bin/nagios"} fi else cgibindir="N/A" fi piddir=${piddir="$localstatedir/run/${INIT_PROG}"} if test "$need_pipe" = yes; then pipedir=${pipedir="$localstatedir/run/${INIT_PROG}"} else pipedir="N/A" fi if test $need_log_subdir = yes; then logdir=${logdir="$localstatedir/log/$INIT_PROG"} else logdir=${logdir="$localstatedir/log"} fi else # # Unknown install # install_method="unknown" webdir=unknown pkgsysconfdir=unknown objsysconfdir=unknown privatesysconfdir=unknown logdir=unknown piddir=unknown pipedir=unknown pkglocalstatedir=unknown spooldir=unknown brokersdir=unknown pluginsdir=unknown cgibindir=unknown fi eval prefix=$prefix eval exec_prefix=$exec_prefix eval bindir=$bindir eval sbindir=$sbindir eval datarootdir=$datarootdir eval datadir=$datadir eval libexecdir=$libexecdir eval brokersdir=$brokersdir eval pluginsdir=$pluginsdir eval cgibindir=$cgibindir eval localstatedir=$localstatedir eval pkglocalstatedir=$pkglocalstatedir eval webdir=$webdir eval localedir=$localedir eval sysconfdir=$sysconfdir eval pkgsysconfdir=$pkgsysconfdir eval logdir=$logdir eval piddir=$piddir # # Init scripts/files # case $init_type in #( sysv) : if test $dist_type = "hp-ux"; then initdir=${initdir="/sbin/init.d"} else initdir=${initdir="/etc/init.d"} fi initname=${initname="$INIT_PROG"} initconfdir=${initconfdir="/etc/conf.d"} initconf=${initconf="$initconfdir/$INIT_PROG"} ;; #( systemd) : if test $dist_type = "debian"; then initdir=${initdir="/lib/systemd/system"} else initdir=${initdir="/usr/lib/systemd/system"} fi initname=${initname="$INIT_PROG.service"} ;; #( bsd) : if test $dist_type = "aix"; then initdir=${initdir="/sbin/rc.d/init.d"} initname=${initname="$INIT_PROG"} else initdir=${initdir="/etc/rc.d"} initname=${initname="rc.$INIT_PROG"} fi ;; #( newbsd) : initdir=${initdir="/etc/rc.d"} initname=${initname="$INIT_PROG"} ;; #( gentoo) : initdir=${initdir="/etc/init.d"} initname=${initname="$INIT_PROG"} initconfdir=${initconfdir="/etc/init.d"} initconf=${initconf="$initconfdir/$INIT_PROG"} ;; #( openrc) : initdir=${initdir="/etc/init.d"} initname=${initname="$INIT_PROG"} initconfdir=${initconfdir="/etc/conf.d"} initconf=${initconf="$initconfdir/$INIT_PROG"} ;; #( smf*) : if test $init_type = smf10; then initdir=${initdir="/var/svc/manifest/network/nagios"} else initdir=${initdir="/lib/svc/manifest/network/nagios"} fi initname=${initname="$INIT_PROG.xml"} initconfdir=unknown initconf=unknown ;; #( upstart) : initdir=${initdir="/etc/init"} initname=${initname="$INIT_PROG.conf"} initconfdir=${initconfdir="/etc/default"} initconf=${initconf="$initconfdir/$INIT_PROG"} ;; #( launchd) : initdir=${initdir="/Library/LaunchDaemons"} initname=${initname="org.nagios.$INIT_PROG.plist"} ;; #( # initconfdir=${initconfdir="/private/etc"} # initconf=${initconf="$initconfdir/$INIT_PROG"}, *) : initdir=unknown initname=unknown ;; #( *) : ;; esac # # Inetd (per connection) scripts/files # case $inetd_type in #( inetd*) : inetddir=${inetddir="/etc"} inetdname=${inetdname="inetd.conf"} ;; #( xinetd) : inetddir=${inetddir="/etc/xinetd.d"} inetdname=${inetdname="$INIT_PROG"} ;; #( systemd) : if test $dist_type = "debian"; then inetddir=${inetddir="/lib/systemd/system"} else inetddir=${inetddir="/usr/lib/systemd/system"} fi netdname=${inetdname="$INIT_PROG.socket"} ;; #( smf*) : if test $init_type = smf10; then inetddir=${inetddir="/var/svc/manifest/network/nagios"} else inetddir=${inetddir="/lib/svc/manifest/network/nagios"} fi inetdname=${inetdname="$INIT_PROG.xml"} ;; #( # [upstart], # inetddir=${inetddir="/etc/init.d"} # inetdname=${inetdname="$INIT_PROG"}, launchd) : inetddir=${inetddir="/Library/LaunchDaemons"} inetdname=${inetdname="org.nagios.$INIT_PROG.plist"} ;; #( *) : inetddir=${inetddir="unknown"} inetdname=${inetdname="unknown"} ;; #( *) : ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $install_method" >&5 $as_echo "$install_method" >&6; } src_inetd="" src_init="" bsd_enable="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which init file to use " >&5 $as_echo_n "checking for which init file to use ... " >&6; } case $init_type in #( sysv) : src_init=default-init ;; #( systemd) : src_tmpfile=tmpfile.conf src_init=default-service ;; #( bsd) : src_init=bsd-init ;; #( newbsd) : if test $dist_type = freebsd ; then bsd_enable="_enable" src_init=newbsd-init elif test $dist_type = openbsd ; then bsd_enable="_flags" src_init=openbsd-init elif test $dist_type = netbsd ; then bsd_enable="" src_init=newbsd-init fi ;; #( # [gentoo], openrc) : src_init=openrc-init ;; #( smf*) : src_init="solaris-init.xml" src_inetd="solaris-inetd.xml" ;; #( upstart) : if test $dist_type = rh ; then src_init=rh-upstart-init else src_init=upstart-init fi ;; #( launchd) : src_init="mac-init.plist" ;; #( *) : src_init="unknown" ;; #( *) : ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $src_init" >&5 $as_echo "$src_init" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which inetd files to use " >&5 $as_echo_n "checking for which inetd files to use ... " >&6; } if test x$src_inetd = x; then case $inetd_type in #( inetd*) : src_inetd=default-inetd ;; #( xinetd) : src_inetd=default-xinetd ;; #( systemd) : src_inetd=default-socket ;; #( launchd) : src_inetd="mac-inetd.plist" ;; #( *) : src_inetd="unknown" ;; #( *) : ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $src_inetd" >&5 $as_echo "$src_inetd" >&6; } if test "$dist_type" = solaris -a "$dist_ver" = 10; then $as_echo "#define SOLARIS_10 yes" >>confdefs.h fi if test x${showdirs_only} = xyes; then ac_config_files="$ac_config_files paths" test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by nrpe $as_me newdate, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to . nrpe home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ nrpe config.status newdate configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "paths") CONFIG_FILES="$CONFIG_FILES paths" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi chmod 755 paths ./paths exit 0 fi ac_config_headers="$ac_config_headers include/config.h" ac_config_files="$ac_config_files Makefile src/Makefile nrpe.spec uninstall sample-config/nrpe.cfg startup/bsd-init startup/debian-init startup/default-init startup/default-inetd startup/default-service startup/default-socket startup/default-socket-svc startup/default-xinetd startup/mac-init.plist startup/mac-inetd.plist startup/newbsd-init startup/openbsd-init startup/openrc-conf startup/openrc-init startup/solaris-init.xml startup/solaris-inetd.xml startup/tmpfile.conf startup/upstart-init startup/rh-upstart-init include/common.h" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in ctype.h dirent.h errno.h fcntl.h getopt.h grp.h inttypes.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in netdb.h pwd.h signal.h stdint.h strings.h string.h syslog.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in tcpd.h unistd.h arpa/inet.h netinet/in.h socket.h sys/types.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in paths.h do : ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default" if test "x$ac_cv_header_paths_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PATHS_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then : ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then $as_echo "#define uid_t int" >>confdefs.h $as_echo "#define gid_t int" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 $as_echo_n "checking type of array argument to getgroups... " >&6; } if ${ac_cv_type_getgroups+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_type_getgroups=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Mike Rendell for this test. */ $ac_includes_default #define NGID 256 #undef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) int main () { gid_t gidset[NGID]; int i, n; union { gid_t gval; long int lval; } val; val.lval = -1; for (i = 0; i < NGID; i++) gidset[i] = val.gval; n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, gidset); /* Exit non-zero if getgroups seems to require an array of ints. This happens when gid_t is short int but getgroups modifies an array of ints. */ return n > 0 && gidset[n] != val.gval; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_type_getgroups=gid_t else ac_cv_type_getgroups=int fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_type_getgroups = cross; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : ac_cv_type_getgroups=gid_t else ac_cv_type_getgroups=int fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 $as_echo "$ac_cv_type_getgroups" >&6; } cat >>confdefs.h <<_ACEOF #define GETGROUPS_T $ac_cv_type_getgroups _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 $as_echo_n "checking size of short... " >&6; } if ${ac_cv_sizeof_short+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : else if test "$ac_cv_type_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 $as_echo "$ac_cv_sizeof_short" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default" if test "x$ac_cv_type_uint32_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define uint32_t unsigned int _ACEOF fi ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default" if test "x$ac_cv_type_u_int32_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define u_int32_t unsigned int _ACEOF fi if test "$ac_cv_type_u_int32_t" = no ; then if test "$ac_cv_type_u_int32_t" = yes ; then $as_echo "#define U_INT32_T_IS_UINT32_T 1" >>confdefs.h else if test "$ac_cv_sizeof_int" = 4 ; then $as_echo "#define U_INT32_T_IS_UINT 1" >>confdefs.h else if test "$ac_cv_sizeof_long" = 4 ; then $as_echo "#define U_INT32_T_IS_ULONG 1" >>confdefs.h else if test "$ac_cv_sizeof_short" = 4 ; then $as_echo "#define U_INT32_T_IS_USHORT 1" >>confdefs.h fi fi fi fi fi ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default" if test "x$ac_cv_type_int32_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define int32_t int _ACEOF fi if test "$ac_cv_type_int32_t" = no ; then if test "$ac_cv_sizeof_int" = 4 ; then $as_echo "#define INT32_T_IS_UINT 1" >>confdefs.h else if test "$ac_cv_sizeof_long" = 4 ; then $as_echo "#define INT32_T_IS_ULONG 1" >>confdefs.h else if test "$ac_cv_sizeof_short" = 4 ; then $as_echo "#define INT32_T_IS_USHORT 1" >>confdefs.h fi fi fi fi ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include " if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_STORAGE 1 _ACEOF fi ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid" if test "x$ac_cv_func_seteuid" = xyes; then : $as_echo "#define SETEUID(id) seteuid(id)" >>confdefs.h else $as_echo "#define SETEUID(id) setresuid((uid_t) -1, id, (uid_t) -1)" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 $as_echo_n "checking for va_copy... " >&6; } if ${ac_cv_HAVE_VA_COPY+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include va_list ap1,ap2; int main () { va_copy(ap1,ap2); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_HAVE_VA_COPY=yes else ac_cv_HAVE_VA_COPY=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_VA_COPY" >&5 $as_echo "$ac_cv_HAVE_VA_COPY" >&6; } if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then $as_echo "#define HAVE_VA_COPY 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __va_copy" >&5 $as_echo_n "checking for __va_copy... " >&6; } if ${ac_cv_HAVE___VA_COPY+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include va_list ap1,ap2; int main () { __va_copy(ap1,ap2); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_HAVE___VA_COPY=yes else ac_cv_HAVE___VA_COPY=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE___VA_COPY" >&5 $as_echo "$ac_cv_HAVE___VA_COPY" >&6; } if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then $as_echo "#define HAVE___VA_COPY 1" >>confdefs.h fi fi ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" if test "x$ac_cv_func_vsnprintf" = xyes; then : else SNPRINTF_O=./snprintf.o fi ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" if test "x$ac_cv_func_snprintf" = xyes; then : else SNPRINTF_O=./snprintf.o fi ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" if test "x$ac_cv_func_asprintf" = xyes; then : else SNPRINTF_O=./snprintf.o fi ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" if test "x$ac_cv_func_vasprintf" = xyes; then : else SNPRINTF_O=./snprintf.o fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 vsnprintf" >&5 $as_echo_n "checking for C99 vsnprintf... " >&6; } if ${ac_cv_HAVE_C99_VSNPRINTF+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_HAVE_C99_VSNPRINTF=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include void foo(const char *format, ...) { va_list ap; int len; char buf[5]; va_start(ap, format); len = vsnprintf(buf, 0, format, ap); va_end(ap); if (len != 5) exit(1); va_start(ap, format); len = vsnprintf(0, 0, format, ap); va_end(ap); if (len != 5) exit(1); if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); exit(0); } main() { foo("hello"); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_HAVE_C99_VSNPRINTF=yes else ac_cv_HAVE_C99_VSNPRINTF=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_C99_VSNPRINTF" >&5 $as_echo "$ac_cv_HAVE_C99_VSNPRINTF" >&6; } if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then $as_echo "#define HAVE_C99_VSNPRINTF 1" >>confdefs.h fi for ac_func in getopt_long do : ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" if test "x$ac_cv_func_getopt_long" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_LONG 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getopt_long in -liberty" >&5 $as_echo_n "checking for getopt_long in -liberty... " >&6; } if ${ac_cv_lib_iberty_getopt_long+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-liberty $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getopt_long (); int main () { return getopt_long (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_iberty_getopt_long=yes else ac_cv_lib_iberty_getopt_long=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iberty_getopt_long" >&5 $as_echo "$ac_cv_lib_iberty_getopt_long" >&6; } if test "x$ac_cv_lib_iberty_getopt_long" = xyes; then : OTHERLIBS="$OTHERLIBS -liberty" fi fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 $as_echo_n "checking for main in -lnsl... " >&6; } if ${ac_cv_lib_nsl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_main=yes else ac_cv_lib_nsl_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 $as_echo "$ac_cv_lib_nsl_main" >&6; } if test "x$ac_cv_lib_nsl_main" = xyes; then : SOCKETLIBS="$SOCKETLIBS -lnsl" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : SOCKETLIBS="$SOCKETLIBS -lsocket" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwrap" >&5 $as_echo_n "checking for main in -lwrap... " >&6; } if ${ac_cv_lib_wrap_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lwrap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_wrap_main=yes else ac_cv_lib_wrap_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wrap_main" >&5 $as_echo "$ac_cv_lib_wrap_main" >&6; } if test "x$ac_cv_lib_wrap_main" = xyes; then : LIBWRAPLIBS="$LIBWRAPLIBS -lwrap" $as_echo "#define HAVE_LIBWRAP 1" >>confdefs.h cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int a = rfc931_timeout; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : $as_echo "#define HAVE_RFC931_TIMEOUT 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi for ac_func in strdup strstr strtoul strtok_r initgroups closesocket sigaction scandir do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include #include " if test "x$ac_cv_type_socklen_t" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 $as_echo_n "checking for socklen_t equivalent... " >&6; } if ${curl_cv_socklen_t_equiv+:} false; then : $as_echo_n "(cached) " >&6 else # Systems have either "struct sockaddr *" or # "void *" as the second argument to getpeername curl_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void; do for t in int size_t unsigned long "unsigned long"; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif int getpeername (int, $arg2 *, $t *); int main () { $t len; getpeername(0,0,&len); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : curl_cv_socklen_t_equiv="$t" break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done if test "x$curl_cv_socklen_t_equiv" = x; then as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5 $as_echo "$curl_cv_socklen_t_equiv" >&6; } cat >>confdefs.h <<_ACEOF #define socklen_t $curl_cv_socklen_t_equiv _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of socket size" >&5 $as_echo_n "checking for type of socket size... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int a = send(1, (const void *)0, (size_t *) 0, (int *) 0); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define SOCKET_SIZE_TYPE size_t" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: size_t" >&5 $as_echo "size_t" >&6; } else $as_echo "#define SOCKET_SIZE_TYPE int" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5 $as_echo "int" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Check whether --enable-ssl was given. if test "${enable_ssl+set}" = set; then : enableval=$enable_ssl; if test x$enableval = xyes; then check_for_ssl=yes else check_for_ssl=no fi else check_for_ssl=yes fi need_dh=yes # Check whether --with-need_dh was given. if test "${with_need_dh+set}" = set; then : withval=$with_need_dh; need_dh=$withval else nrpe_group=need_dh fi if test x$check_for_ssl = xyes; then # need_dh should only be set for NRPE #need_dh=yes # ------------------------------- # SSL library and include paths # ------------------------------- SSL_TYPE=openssl try_pkg_config=1 ssl_dir= ssl_inc_dir= ssl_lib_dir= SSL_INC_DIR= SSL_INC_PREFIX= SSL_HDR= SSL_LIB_DIR= # gnutls/openssl.h # nss_compat_ossl/nss_compat_ossl.h # Check whether --with-ssl was given. if test "${with_ssl+set}" = set; then : withval=$with_ssl; ssl_dir=$withval fi # Check whether --with-ssl-inc was given. if test "${with_ssl_inc+set}" = set; then : withval=$with_ssl_inc; ssl_inc_dir=$withval fi # Check whether --with-ssl-lib was given. if test "${with_ssl_lib+set}" = set; then : withval=$with_ssl_lib; ssl_lib_dir=$withval fi if test x$ssl_inc_dir != x -o x$ssl_lib_dir != x; then try_pkg_config=0 fi # Check whether --with-kerberos-inc was given. if test "${with_kerberos_inc+set}" = set; then : withval=$with_kerberos_inc; kerberos_inc_dir=$withval fi if test x$SSL_TYPE = xyes; then SSL_TYPE=openssl fi dflt_hdrs="$ssl_inc_dir $ssl_dir $ssl_inc_dir/include $ssl_dir/include \ /usr/local/opt/{BBB} /usr/include/{BBB} /usr/local/include/{BBB} \ /usr/local/{AAA} /usr/local/{BBB} /usr/lib/{AAA} /usr/lib/{BBB} \ /usr/{AAA} /usr/pkg /usr/local /usr /usr/freeware/lib/{BBB} \ /usr/sfw /usr/sfw/include /opt/{BBB}" dflt_libs="$ssl_lib_dir {ssldir} {ssldir}/lib {ssldir}/lib64 /usr/lib64 \ /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu \ /usr/local/lib /usr/lib/{AAA} /usr/{AAA}/lib /usr/{BBB}/lib \ /usr/pkg/lib /usr/freeware/lib/{BBB} /usr/sfw/lib /opt/freeware/lib \ /opt/{BBB}/lib/hpux64 /opt/{BBB}/lib/pa20_64 /opt/{BBB}/lib/hpux32 \ /opt/{BBB}/lib /opt/{BBB}"; case $SSL_TYPE in #( no) : SSL_TYPE=NONE ;; #( yes|openssl) : ssl_hdr_dirs=`echo "$dflt_hdrs" | sed -e 's/{AAA}/ssl/g' | sed -e 's/{BBB}/openssl/g'` ssl_lib_dirs=`echo "$dflt_libs" | sed -e 's/{AAA}/ssl/g' | sed -e 's/{BBB}/openssl/g'` SSL_INC_PREFIX=openssl SSL_HDR=ssl.h ssl_lib=libssl ;; #( gnutls) : ssl_hdr_dirs=`echo "$dflt_hdrs" | sed -e 's/{AAA}/gnutls/g' | sed -e 's/{BBB}/gnutls/g'` ssl_lib_dirs=`echo "$dflt_libs" | sed -e 's/{AAA}/gnutls/g' | sed -e 's/{BBB}/gnutls/g'` SSL_INC_PREFIX=gnutls SSL_TYPE=gnutls_compat SSL_HDR=compat.h ssl_lib=libgnutls ;; #( nss) : ssl_hdr_dirs=`echo "$dflt_hdrs" | sed -e 's/{AAA}/nss_compat_ossl/g' | sed -e 's/{BBB}/nss_compat_ossl/g'` ssl_lib_dirs=`echo "$dflt_libs" | sed -e 's/{AAA}/nss_compat_ossl/g' | sed -e 's/{BBB}/nss_compat_ossl/g'` SSL_HDR=nss_compat_ossl.h ssl_lib=libnss_compat ;; #( *) : echo >&6; as_fn_error $? "'--with-ssl-type=$SSL_TYPE' is invalid" "$LINENO" 5 ;; #( *) : ;; esac # Check for SSL support if test x$SSL_TYPE != xNONE; then found_ssl=no # RedHat 8.0 and 9.0 include openssl compiled with kerberos, # so we must include header file # Must come before openssl checks for Redhat EL 3 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos include files" >&5 $as_echo_n "checking for Kerberos include files... " >&6; } found_kerberos=no for dir in $kerberos_inc_dir /usr/kerberos/include /usr/include/krb5 \ /usr/include; do kerbdir="$dir" if test -f "$dir/krb5.h"; then found_kerberos=yes CFLAGS="$CFLAGS -I$kerbdir" cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_H 1 _ACEOF break fi done if test x_$found_kerberos != x_yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find include files" >&5 $as_echo "$as_me: WARNING: could not find include files" >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found Kerberos include files in $kerbdir" >&5 $as_echo "found Kerberos include files in $kerbdir" >&6; } fi # First, try using pkg_config if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PKG_CONFIG"; then ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PKG_CONFIG=$ac_cv_prog_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_PKG_CONFIG"; then ac_ct_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_PKG_CONFIG"; then ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG if test -n "$ac_ct_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5 $as_echo "$ac_ct_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_ct_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_prog_PKG_CONFIG" fi if test x"$PKG_CONFIG" != x -a $try_pkg_config -ne 0 ; then cflags=`$PKG_CONFIG $SSL_TYPE --cflags-only-I 2>/dev/null` if test $? -eq 0; then CFLAGS="$CFLAGS $cflags" LDFLAGS="$LDFLAGS `$PKG_CONFIG $SSL_TYPE --libs-only-L 2>/dev/null`" LIBS="$LIBS `$PKG_CONFIG $SSL_TYPE --libs-only-l 2>/dev/null`" found_ssl=yes cat >>confdefs.h <<_ACEOF #define HAVE_SSL 1 _ACEOF fi fi if test x_$found_ssl != x_yes; then # Find the SSL Headers { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL headers" >&5 $as_echo_n "checking for SSL headers... " >&6; } for dir in $ssl_hdr_dirs; do if test "$dir" = "/include"; then continue fi ssldir="$dir" if test -f "$dir/include/$SSL_INC_PREFIX/$SSL_HDR"; then found_ssl=yes CFLAGS="$CFLAGS -I$dir/include/$SSL_INC_PREFIX -I$ssldir/include" SSL_INC_DIR="$dir/include/$SSL_INC_PREFIX" break fi if test -f "$dir/include/$SSL_HDR"; then found_ssl=yes if test "$SSL_HDR" != compat.h ; then SSL_INC_PREFIX="" fi CFLAGS="$CFLAGS -I$dir/include" SSL_INC_DIR="$dir/include" break fi if test -f "$dir/$SSL_HDR"; then found_ssl=yes SSL_INC_PREFIX="" CFLAGS="$CFLAGS -I$dir" SSL_INC_DIR="$dir" break fi if test -f "$dir/$SSL_INC_PREFIX/$SSL_HDR"; then found_ssl=yes CFLAGS="$CFLAGS -I$dir/$SSL_INC_PREFIX" SSL_INC_DIR="$dir/$SSL_INC_PREFIX" ssldir="$dir/.." break fi done if test x_$found_ssl != x_yes; then as_fn_error $? "Cannot find ssl headers" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $ssldir" >&5 $as_echo "found in $ssldir" >&6; } # Now try and find SSL libraries { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL libraries" >&5 $as_echo_n "checking for SSL libraries... " >&6; } found_ssl=no ssl_lib_dirs=`echo "$ssl_lib_dirs" | sed -e "s|{ssldir}|$ssldir|g"` if test "`uname -s`" = "Darwin" ; then soext="dylib" elif test "`uname -s`" = "HP-UX" ; then if test x$arch = "xia64"; then soext="so" else soext="sl" fi elif test "`uname -s`" = "AIX" ; then soext="a" else soext="so" fi for dir in $ssl_lib_dirs; do if test -f "$dir/$ssl_lib.$soext"; then found_ssl=yes SSL_LIB_DIR="$dir" break fi done if test x_$found_ssl != x_yes; then as_fn_error $? "Cannot find ssl libraries" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $SSL_LIB_DIR" >&5 $as_echo "found in $SSL_LIB_DIR" >&6; } LDFLAGS="$LDFLAGS -L$SSL_LIB_DIR"; LIBS="$LIBS -l`echo $ssl_lib | sed -e 's/^lib//'` -lcrypto"; cat >>confdefs.h <<_ACEOF #define HAVE_SSL 1 _ACEOF fi fi fi if test x$found_ssl = xyes ; then if test -n "$SSL_INC_PREFIX" ; then SSL_INC_PREFIX="${SSL_INC_PREFIX}/" fi # try to compile and link to see if SSL is set up properly { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against SSL works" >&5 $as_echo_n "checking whether compiling and linking against SSL works... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${SSL_INC_PREFIX}${SSL_HDR}> int main () { SSL_new(NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "no" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test x$found_ssl = xyes -a x$need_dh = xyes; then # Find the openssl program if test x$need_dh = xyes; then # Extract the first word of "openssl", so it can be a program name with args. set dummy openssl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_sslbin+:} false; then : $as_echo_n "(cached) " >&6 else case $sslbin in [\\/]* | ?:[\\/]*) ac_cv_path_sslbin="$sslbin" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $ssl_dir/sbin$PATH_SEPARATOR$ssl_dir/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_sslbin="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_sslbin" && ac_cv_path_sslbin="value-if-not-found" ;; esac fi sslbin=$ac_cv_path_sslbin if test -n "$sslbin"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sslbin" >&5 $as_echo "$sslbin" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi $as_echo "#define USE_SSL_DH 1" >>confdefs.h # Generate DH parameters if test -f "$sslbin"; then echo "" echo "*** Generating DH Parameters for SSL/TLS ***" # awk to strip off meta data at bottom of dhparam output $sslbin dhparam -C 2048 | awk '/^-----/ {exit} {print}' > include/dh.h fi fi fi fi fi # Check whether --with-log_facility was given. if test "${with_log_facility+set}" = set; then : withval=$with_log_facility; log_facility=$withval else log_facility=daemon fi cat >>confdefs.h <<_ACEOF #define NRPE_LOG_FACILITY "$log_facility" _ACEOF # Check whether --with-nrpe_user was given. if test "${with_nrpe_user+set}" = set; then : withval=$with_nrpe_user; nrpe_user=$withval else nrpe_user=nagios fi # Check whether --with-nrpe_group was given. if test "${with_nrpe_group+set}" = set; then : withval=$with_nrpe_group; nrpe_group=$withval else nrpe_group=nagios fi # Check whether --with-nrpe_port was given. if test "${with_nrpe_port+set}" = set; then : withval=$with_nrpe_port; nrpe_port=$withval else nrpe_port=5666 fi NRPE_INSTALL_OPTS="-o $nrpe_user -g $nrpe_group" cat >>confdefs.h <<_ACEOF #define DEFAULT_SERVER_PORT $nrpe_port _ACEOF # Check whether --with-nagios_user was given. if test "${with_nagios_user+set}" = set; then : withval=$with_nagios_user; nagios_user=$withval else nagios_user=nagios fi # Check whether --with-nagios_group was given. if test "${with_nagios_group+set}" = set; then : withval=$with_nagios_group; nagios_group=$withval else nagios_group=nagios fi NAGIOS_INSTALL_OPTS="-o $nagios_user -g $nagios_group" if test "`uname -s`" = "HP-UX" ; then LDFLAGS="$LDFLAGS -Wl,+allowdups"; fi # Check whether --enable-command-args was given. if test "${enable_command_args+set}" = set; then : enableval=$enable_command_args; cat >>confdefs.h <<_ACEOF #define ENABLE_COMMAND_ARGUMENTS 1 _ACEOF fi # Check whether --enable-bash-command-substitution was given. if test "${enable_bash_command_substitution+set}" = set; then : enableval=$enable_bash_command_substitution; cat >>confdefs.h <<_ACEOF #define ENABLE_BASH_COMMAND_SUBSTITUTION 1 _ACEOF fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by nrpe $as_me newdate, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to . nrpe home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ nrpe config.status newdate configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "paths") CONFIG_FILES="$CONFIG_FILES paths" ;; "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "nrpe.spec") CONFIG_FILES="$CONFIG_FILES nrpe.spec" ;; "uninstall") CONFIG_FILES="$CONFIG_FILES uninstall" ;; "sample-config/nrpe.cfg") CONFIG_FILES="$CONFIG_FILES sample-config/nrpe.cfg" ;; "startup/bsd-init") CONFIG_FILES="$CONFIG_FILES startup/bsd-init" ;; "startup/debian-init") CONFIG_FILES="$CONFIG_FILES startup/debian-init" ;; "startup/default-init") CONFIG_FILES="$CONFIG_FILES startup/default-init" ;; "startup/default-inetd") CONFIG_FILES="$CONFIG_FILES startup/default-inetd" ;; "startup/default-service") CONFIG_FILES="$CONFIG_FILES startup/default-service" ;; "startup/default-socket") CONFIG_FILES="$CONFIG_FILES startup/default-socket" ;; "startup/default-socket-svc") CONFIG_FILES="$CONFIG_FILES startup/default-socket-svc" ;; "startup/default-xinetd") CONFIG_FILES="$CONFIG_FILES startup/default-xinetd" ;; "startup/mac-init.plist") CONFIG_FILES="$CONFIG_FILES startup/mac-init.plist" ;; "startup/mac-inetd.plist") CONFIG_FILES="$CONFIG_FILES startup/mac-inetd.plist" ;; "startup/newbsd-init") CONFIG_FILES="$CONFIG_FILES startup/newbsd-init" ;; "startup/openbsd-init") CONFIG_FILES="$CONFIG_FILES startup/openbsd-init" ;; "startup/openrc-conf") CONFIG_FILES="$CONFIG_FILES startup/openrc-conf" ;; "startup/openrc-init") CONFIG_FILES="$CONFIG_FILES startup/openrc-init" ;; "startup/solaris-init.xml") CONFIG_FILES="$CONFIG_FILES startup/solaris-init.xml" ;; "startup/solaris-inetd.xml") CONFIG_FILES="$CONFIG_FILES startup/solaris-inetd.xml" ;; "startup/tmpfile.conf") CONFIG_FILES="$CONFIG_FILES startup/tmpfile.conf" ;; "startup/upstart-init") CONFIG_FILES="$CONFIG_FILES startup/upstart-init" ;; "startup/rh-upstart-init") CONFIG_FILES="$CONFIG_FILES startup/rh-upstart-init" ;; "include/common.h") CONFIG_FILES="$CONFIG_FILES include/common.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo "" echo "" { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Configuration summary for $PKG_NAME $PKG_VERSION $PKG_REL_DATE ***:" >&5 $as_echo "*** Configuration summary for $PKG_NAME $PKG_VERSION $PKG_REL_DATE ***:" >&6; } echo "";\ echo " General Options:";\ echo " -------------------------" { $as_echo "$as_me:${as_lineno-$LINENO}: result: NRPE port: $nrpe_port" >&5 $as_echo " NRPE port: $nrpe_port" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: NRPE user: $nrpe_user" >&5 $as_echo " NRPE user: $nrpe_user" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: NRPE group: $nrpe_group" >&5 $as_echo " NRPE group: $nrpe_group" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: Nagios user: $nagios_user" >&5 $as_echo " Nagios user: $nagios_user" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: Nagios group: $nagios_group" >&5 $as_echo " Nagios group: $nagios_group" >&6; } echo "";\ echo "";\ echo "Review the options above for accuracy. If they look okay,";\ echo "type 'make all' to compile the NRPE daemon and client";\ echo "or type 'make' to get a list of make options.";\ echo "" nrpe-nrpe-4.0.3/configure.ac000066400000000000000000000262001365211572000157140ustar00rootroot00000000000000dnl Process this -*-m4-*- file with autoconf to produce a configure script. dnl Disable caching define([AC_CACHE_LOAD],) define([AC_CACHE_SAVE],) m4_include([build-aux/custom_help.m4]) AC_INIT([nrpe],[newdate],[nagios-users@lists.sourceforge.net],[nrpe],[https://www.nagios.org/downloads/nagios-core-addons/]) AC_CONFIG_SRCDIR([src/nrpe.c]) AC_CONFIG_AUX_DIR([build-aux]) AC_PREFIX_DEFAULT(/usr/local/nagios) PKG_NAME=nrpe PKG_VERSION="4.0.3" PKG_HOME_URL="http://www.nagios.org/" PKG_REL_DATE="2020-04-28" RPM_RELEASE=1 LANG=C LC_ALL=C LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C LC_MONETARY=C LC_NUMERIC=C LC_TIME=C AC_SUBST(PKG_NAME) AC_SUBST(PKG_VERSION) AC_SUBST(PKG_HOME_URL) AC_SUBST(PKG_REL_DATE) AC_SUBST(RPM_RELEASE) AC_SUBST(INSTALL) AC_SUBST(SNPRINTF_O) AC_SUBST(LDFLAGS) AC_SUBST(OTHERLIBS) AC_SUBST(SOCKETLIBS) AC_SUBST(LIBWRAPLIBS) AC_SUBST(NRPE_INSTALL_OPTS) AC_SUBST(log_facility) AC_SUBST(nrpe_user) AC_SUBST(nrpe_group) AC_SUBST(nrpe_port) AC_SUBST(nagios_user) AC_SUBST(nagios_group) AC_SUBST(NAGIOS_INSTALL_OPTS) AC_SUBST(TARGET_VER) AC_SUBST(TARGET_OS) AC_SUBST(TARGET_ARCH) AC_SUBST(TARGET_PLATFORM) dnl Figure out how to invoke "install" and what install options to use. AC_PROG_INSTALL dnl Get O/S, Distribution, init, inetd, system-specific directories AC_NAGIOS_GET_OS AC_NAGIOS_GET_DISTRIB_TYPE AC_NAGIOS_GET_INIT AC_NAGIOS_GET_INETD AC_NAGIOS_GET_PATHS AC_NAGIOS_GET_FILES if test "$dist_type" = solaris -a "$dist_ver" = 10; then AC_DEFINE(SOLARIS_10,yes) fi dnl Do they just want to see where things will go? if test x${showdirs_only} = xyes; then AC_CONFIG_FILES([paths]) AC_OUTPUT() chmod 755 paths ./paths exit 0 fi AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_FILES([Makefile src/Makefile nrpe.spec uninstall sample-config/nrpe.cfg startup/bsd-init startup/debian-init startup/default-init startup/default-inetd startup/default-service startup/default-socket startup/default-socket-svc startup/default-xinetd startup/mac-init.plist startup/mac-inetd.plist startup/newbsd-init startup/openbsd-init startup/openrc-conf startup/openrc-init startup/solaris-init.xml startup/solaris-inetd.xml startup/tmpfile.conf startup/upstart-init startup/rh-upstart-init include/common.h ]) dnl Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET dnl Checks for header files. AC_HEADER_STDC AC_HEADER_TIME AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h getopt.h grp.h inttypes.h) AC_CHECK_HEADERS(netdb.h pwd.h signal.h stdint.h strings.h string.h syslog.h) AC_CHECK_HEADERS(tcpd.h unistd.h arpa/inet.h netinet/in.h socket.h sys/types.h) AC_CHECK_HEADERS(sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h) AC_CHECK_HEADERS(paths.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_STRUCT_TM AC_TYPE_MODE_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_SIGNAL AC_TYPE_GETGROUPS dnl Check lengths for later tests of u_int32_t and int32_t AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(long) dnl Define u_int32_t if we don't have it already (Solaris, etc.) AC_CHECK_TYPE(uint32_t,unsigned int) AC_CHECK_TYPE(u_int32_t,unsigned int) if test "$ac_cv_type_u_int32_t" = no ; then if test "$ac_cv_type_u_int32_t" = yes ; then AC_DEFINE(U_INT32_T_IS_UINT32_T,[1],[u_int32_t is uint32_t]) else if test "$ac_cv_sizeof_int" = 4 ; then AC_DEFINE(U_INT32_T_IS_UINT,[1],[u_int32_t is uint]) else if test "$ac_cv_sizeof_long" = 4 ; then AC_DEFINE(U_INT32_T_IS_ULONG,[1],[u_int32_t is ulong]) else if test "$ac_cv_sizeof_short" = 4 ; then AC_DEFINE(U_INT32_T_IS_USHORT,[1],[u_int32_t is ushort]) fi fi fi fi fi dnl Define int32_t if we don't have it already AC_CHECK_TYPE(int32_t,int) if test "$ac_cv_type_int32_t" = no ; then if test "$ac_cv_sizeof_int" = 4 ; then AC_DEFINE(INT32_T_IS_UINT,[1],[int32_t is uint]) else if test "$ac_cv_sizeof_long" = 4 ; then AC_DEFINE(INT32_T_IS_ULONG,[1],[int32_t is ulong]) else if test "$ac_cv_sizeof_short" = 4 ; then AC_DEFINE(INT32_T_IS_USHORT,[1],[int32_t is ushort]) fi fi fi fi dnl Check for struct sockaddr_storate AC_CHECK_TYPES([struct sockaddr_storage],[],[],[#include ]) dnl Should we use seteuid() or setresuid()? AC_CHECK_FUNC(seteuid, AC_DEFINE(SETEUID(id),[seteuid(id)]), AC_DEFINE(SETEUID(id),[setresuid((uid_t) -1, id, (uid_t) -1)]) ) dnl Check for asprintf() and friends... AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ AC_TRY_LINK([#include va_list ap1,ap2;], [va_copy(ap1,ap2);], ac_cv_HAVE_VA_COPY=yes, ac_cv_HAVE_VA_COPY=no)]) if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available]) else AC_CACHE_CHECK([for __va_copy],ac_cv_HAVE___VA_COPY,[ AC_TRY_LINK([#include va_list ap1,ap2;], [__va_copy(ap1,ap2);], ac_cv_HAVE___VA_COPY=yes, ac_cv_HAVE___VA_COPY=no)]) if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available]) fi fi AC_CHECK_FUNC(vsnprintf,,SNPRINTF_O=./snprintf.o) AC_CHECK_FUNC(snprintf,,SNPRINTF_O=./snprintf.o) AC_CHECK_FUNC(asprintf,,SNPRINTF_O=./snprintf.o) AC_CHECK_FUNC(vasprintf,,SNPRINTF_O=./snprintf.o) AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ AC_TRY_RUN([ #include #include void foo(const char *format, ...) { va_list ap; int len; char buf[5]; va_start(ap, format); len = vsnprintf(buf, 0, format, ap); va_end(ap); if (len != 5) exit(1); va_start(ap, format); len = vsnprintf(0, 0, format, ap); va_end(ap); if (len != 5) exit(1); if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1); exit(0); } main() { foo("hello"); } ], ac_cv_HAVE_C99_VSNPRINTF=yes,ac_cv_HAVE_C99_VSNPRINTF=no,ac_cv_HAVE_C99_VSNPRINTF=cross)]) if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Define if system has C99 compatible vsnprintf]) fi dnl AC_CHECK_FUNC(snprintf,AC_DEFINE(HAVE_SNPRINTF),SNPRINTF_O=./snprintf.o) dnl Check for getopt_long (Solaris) AC_CHECK_FUNCS([getopt_long],,AC_CHECK_LIB([iberty],[getopt_long],OTHERLIBS="$OTHERLIBS -liberty")) dnl Checks for library functions. AC_CHECK_LIB(nsl,main,SOCKETLIBS="$SOCKETLIBS -lnsl") AC_CHECK_LIB(socket,socket,SOCKETLIBS="$SOCKETLIBS -lsocket") AC_CHECK_LIB(wrap,main,[ LIBWRAPLIBS="$LIBWRAPLIBS -lwrap" AC_DEFINE(HAVE_LIBWRAP,[1],[Have the TCP wrappers library]) AC_TRY_LINK([#include ],[int a = rfc931_timeout;],AC_DEFINE(HAVE_RFC931_TIMEOUT)) ]) AC_CHECK_FUNCS(strdup strstr strtoul strtok_r initgroups closesocket sigaction scandir) dnl socklen_t check - from curl AC_CHECK_TYPE([socklen_t], ,[ AC_MSG_CHECKING([for socklen_t equivalent]) AC_CACHE_VAL([curl_cv_socklen_t_equiv], [ # Systems have either "struct sockaddr *" or # "void *" as the second argument to getpeername curl_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void; do for t in int size_t unsigned long "unsigned long"; do AC_TRY_COMPILE([ #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif int getpeername (int, $arg2 *, $t *); ],[ $t len; getpeername(0,0,&len); ],[ curl_cv_socklen_t_equiv="$t" break ]) done done if test "x$curl_cv_socklen_t_equiv" = x; then AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) fi ]) AC_MSG_RESULT($curl_cv_socklen_t_equiv) AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, [type to use in place of socklen_t if not defined])], [#include #include ]) AC_MSG_CHECKING(for type of socket size) AC_TRY_COMPILE([#include #include #include ], [int a = send(1, (const void *)0, (size_t *) 0, (int *) 0);], [AC_DEFINE(SOCKET_SIZE_TYPE, size_t, [Socket Size Type]) AC_MSG_RESULT(size_t)], [AC_DEFINE(SOCKET_SIZE_TYPE, int, [Socket Size Type]) AC_MSG_RESULT(int)]) dnl Does user want to check for SSL? AC_ARG_ENABLE([ssl], AS_HELP_STRING([--disable-ssl],[disables native SSL support @<:@default=check@:>@]),[ if test x$enableval = xyes; then check_for_ssl=yes else check_for_ssl=no fi ],check_for_ssl=yes) need_dh=yes AC_ARG_WITH([need_dh], AS_HELP_STRING([--with-need-dh],[set to 'no' to not include Diffie-Hellman SSL logic]), [need_dh=$withval], [nrpe_group=need_dh]) dnl Optional SSL library and include paths if test x$check_for_ssl = xyes; then # need_dh should only be set for NRPE #need_dh=yes AC_NAGIOS_GET_SSL fi AC_ARG_WITH([log_facility], AS_HELP_STRING([--with-log-facility=], [sets NRPE syslog facility]), [log_facility=$withval], [log_facility=daemon]) AC_DEFINE_UNQUOTED(NRPE_LOG_FACILITY,["$log_facility"],[NRPE syslog facility]) AC_ARG_WITH([nrpe_user], AS_HELP_STRING([--with-nrpe-user=],[sets user name to run NRPE]), [nrpe_user=$withval], [nrpe_user=nagios]) AC_ARG_WITH([nrpe_group], AS_HELP_STRING([--with-nrpe-group=],[sets group name to run NRPE]), [nrpe_group=$withval], [nrpe_group=nagios]) AC_ARG_WITH([nrpe_port], AS_HELP_STRING([--with-nrpe-port=], [sets port number for NRPE to listen on]), [nrpe_port=$withval], [nrpe_port=5666]) NRPE_INSTALL_OPTS="-o $nrpe_user -g $nrpe_group" AC_DEFINE_UNQUOTED(DEFAULT_SERVER_PORT,$nrpe_port,[Default port for NRPE daemon]) AC_ARG_WITH([nagios_user], AS_HELP_STRING([--with-nagios-user=], [sets user name for file permissions]), [nagios_user=$withval], [nagios_user=nagios]) AC_ARG_WITH([nagios_group], AS_HELP_STRING([--with-nagios-group=], [sets group name file permissions]), [nagios_group=$withval], [nagios_group=nagios]) NAGIOS_INSTALL_OPTS="-o $nagios_user -g $nagios_group" dnl On HP-UX the compile will fail with a 'Duplicate symbol "setenv"' error dnl in '/usr/local/lib/libwrap.a(setenv.o)' and '/usr/local/lib/libiberty.a(setenv.o)' dnl so allow duplicate symbols, and use the first one if test "`uname -s`" = "HP-UX" ; then LDFLAGS="$LDFLAGS -Wl,+allowdups"; fi AC_ARG_ENABLE([command-args], AS_HELP_STRING([--enable-command-args],[allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!]), AC_DEFINE_UNQUOTED(ENABLE_COMMAND_ARGUMENTS,[1],[Enable command-line arguments])) AC_ARG_ENABLE([bash-command-substitution], AS_HELP_STRING([--enable-bash-command-substitution],[allows clients to pass bash command substitutions of the form $(command). *** THIS IS A HIGH SECURITY RISK! *** Read the SECURITY file before using this option!]), AC_DEFINE_UNQUOTED(ENABLE_BASH_COMMAND_SUBSTITUTION,[1],[Enable bash command substitution])) AC_PATH_PROG(PERL,perl) AC_OUTPUT() dnl Review options echo "" echo "" AC_MSG_RESULT([*** Configuration summary for $PKG_NAME $PKG_VERSION $PKG_REL_DATE ***:]) echo "";\ echo " General Options:";\ echo " -------------------------" AC_MSG_RESULT([ NRPE port: $nrpe_port]) AC_MSG_RESULT([ NRPE user: $nrpe_user]) AC_MSG_RESULT([ NRPE group: $nrpe_group]) AC_MSG_RESULT([ Nagios user: $nagios_user]) AC_MSG_RESULT([ Nagios group: $nagios_group]) echo "";\ echo "";\ echo "Review the options above for accuracy. If they look okay,";\ echo "type 'make all' to compile the NRPE daemon and client";\ echo "or type 'make' to get a list of make options.";\ echo "" nrpe-nrpe-4.0.3/contrib/000077500000000000000000000000001365211572000150665ustar00rootroot00000000000000nrpe-nrpe-4.0.3/contrib/README.nrpe_check_control000066400000000000000000000033751365211572000216160ustar00rootroot00000000000000NOTES: ------ The service definition below assumes you have a command called "check_tcp" already setup in your config files. The command definition below assumes that the $USER1$ macro is used to define the location of your Nagios plugins (i.e. "/usr/local/nagios/libexec") and that the nrpe_check_control service is located in that directory. SAMPLE CONFIG FILE SNIPPETS: ---------------------------- define service { host_name description NRPE ... event_handler nrpe_check_control check_command check_tcp!-p 5666 } define command { command_name nrpe_check_control command_line $USER1$/nrpe_check_control $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ "$HOSTNAME$" } ORIGINAL EMAIL SNIPPET: ----------------------- Date sent: Fri, 30 Mar 2001 18:51:48 -0500 From: adam.bowen@<> Subject: Event Handler To: [nagios@nagios.org] I am attaching the source code for an event handler I wrote to control checks using nrpe. I add the following check to all remote hosts using nrpe: I added this line to the commands.cfg file: When the NRPE service check listed above has 3 failed connection attempts, it will run the nrpe_check_control which will search the services file for all services for $HOSTNAME$ that use the check_nrpe. It will then request that all these services be disabled. When the NRPE check returns to the OK state, it will request that all services using check_nrpe be re-enabled. This will prevent unnecessary e-mail when there is a problem with the NRPE daemon. This does require that external commands be enabled. (See attached file: nrpe_check_control.c) I thought some other [Nagios] users might find this useful. Adam G. Bowen nrpe-nrpe-4.0.3/contrib/nrpe_check_control.c000066400000000000000000000064271365211572000211040ustar00rootroot00000000000000#include #include #include #define MAX_CHARS 1024 #define SERVICE_COUNT 12 #define COMMAND_FILE "/usr/local/nagios/var/rw/nagios.cmd" #define SERVICES_FILE "/usr/local/nagios/etc/services.cfg" int main(int argc, char *argv[]) { char check_name[MAX_CHARS]; char ent_type[MAX_CHARS]; char input_buffer[MAX_CHARS]; char host_name[MAX_CHARS]; char service_name[MAX_CHARS]; char state[MAX_CHARS]; char state_type[MAX_CHARS]; char temp_input[MAX_CHARS]; char temp_string[MAX_CHARS]; char test_host[MAX_CHARS]; char *temp_var; FILE *command_fp; FILE *services_fp; int attempt; int i; time_t current_time; strcpy(state,argv[1]); strcpy(state_type,argv[2]); attempt=atoi(argv[3]); strcpy(host_name,argv[4]); if(strcmp(state,"OK") == 0) { services_fp=fopen(SERVICES_FILE,"r"); command_fp=fopen(COMMAND_FILE,"a"); while((fgets(input_buffer,MAX_CHARS-1,services_fp)) != NULL) { if(input_buffer[0]=='#' || input_buffer[0]=='\x0' || input_buffer[0]=='\n' || input_buffer[0]=='\r') { continue; } else { strcpy(temp_input,input_buffer); strcpy(temp_string,strtok(temp_input,"=")); strcpy(ent_type,strtok(temp_string,"[")); if(strcmp(ent_type,"service") == 0) { strcpy(test_host,strtok(NULL,"]")); if(strcmp(test_host,host_name) == 0) { temp_var=strtok(input_buffer,"="); strcpy(service_name,strtok(NULL,";")); for(i=1;i<=SERVICE_COUNT;i++) { temp_var=strtok(NULL,";"); } strcpy(check_name,strtok(temp_var,"!")); if(strcmp(check_name,"check_nrpe") == 0) { time(¤t_time); fprintf(command_fp,"[%lu] ENABLE_SVC_CHECK;%s;%s\n",current_time,host_name,service_name); } } } } } fclose(command_fp); fclose(services_fp); } else if(strcmp(state,"CRITICAL") == 0) { if(attempt == 3) { services_fp=fopen(SERVICES_FILE,"r"); command_fp=fopen(COMMAND_FILE,"a"); while((fgets(input_buffer,MAX_CHARS-1,services_fp)) != NULL) { if(input_buffer[0]=='#' || input_buffer[0]=='\x0' || input_buffer[0]=='\n' || input_buffer[0]=='\r') { continue; } else { strcpy(temp_input,input_buffer); strcpy(temp_string,strtok(temp_input,"=")); strcpy(ent_type,strtok(temp_string,"[")); if(strcmp(ent_type,"service") == 0) { strcpy(test_host,strtok(NULL,"]")); if(strcmp(test_host,host_name) == 0) { temp_var=strtok(input_buffer,"="); strcpy(service_name,strtok(NULL,";")); for(i=1;i<=SERVICE_COUNT;i++) { temp_var=strtok(NULL,";"); } strcpy(check_name,strtok(temp_var,"!")); if(strcmp(check_name,"check_nrpe") == 0) { time(¤t_time); fprintf(command_fp,"[%lu] DISABLE_SVC_CHECK;%s;%s\n",current_time,host_name,service_name); } } } } } fclose(command_fp); fclose(services_fp); } } return 0; } nrpe-nrpe-4.0.3/docs/000077500000000000000000000000001365211572000143565ustar00rootroot00000000000000nrpe-nrpe-4.0.3/docs/NRPE.odt000066400000000000000000003402061365211572000156370ustar00rootroot00000000000000PKqK^2 ''mimetypeapplication/vnd.oasis.opendocument.textPKqKConfigurations2/floater/PKqK'Configurations2/accelerator/current.xmlPKPKqKConfigurations2/images/Bitmaps/PKqKConfigurations2/progressbar/PKqKConfigurations2/menubar/PKqKConfigurations2/popupmenu/PKqKConfigurations2/toolbar/PKqK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嫺v:X^b ` Fh&NN>( n ڠ7x6qtSO=ƾgA}@< 5}-7:#>w'v3vzדI+kk=. x934UB"}0*nXO:Gpsp#!Z(`y?u<~ðRM|ԳSqH<\Gl}9Cקt (Z*H~ ܴRdj*7?o嫈lq/\nJⶈEwUjure31w5֝+]soaΟ1~֪X~/66/ɩX~A[;"t e?b{݁3w: F{|:F<7\_irQ|N߱ؓC./%\e jtnJa:$YP{ b ޲VFdt״+,v|ϻw Ï+1]~MTD@p8,ߦ@3f;Q]7+0$;_ ?:P@0OntDIK_4>Ʀ+=WF㑁#=GAWFk4~ ^4?_{&NQ^1h<~U4֮9cPw򺨫_tNpQh^'z3W"U*Y_,N1)#j&~ Mz>toO#AՋۖr``_250e0jxa`ՅQ/Q ^/z_250e0.^\8R->3& f  K"GgɅϜ*V>sV/\XYi4sa3gͅϜ;V>sV/]XYyхOK"Gx$W8뜐L"Hy-Or~kL䅲a}QmI9qh>֌wc0OzxG@79EWⴙ< T D]y ^1R?z+K9B > {tiJxOP<]%9=Sw-"NzUhr]_}-Svëbð&Un_}U_}8*O4zWG<+|fWnfeB61 خrr;!ip2 @[84UiQJ*/J{^td:t&@\6UXTc̜fP! O2mZ'7]w Ȥ˞xΒߒxR+;L S{UveK~'!=EPKNF1/Ab#+PKD PKqK manifest.rdf͓n0 2016-06-01T10:04:22.3360229902017-11-17T12:39:43.89PT4H11M32S56OpenOffice/4.1.2$Win32 OpenOffice.org_project/412m3$Build-9782PKqKMETA-INF/manifest.xmlO0W,}5mȘ:}?c)EE|z)].o(T1(^BmEf9ZL [c\)&i+-TZpxO:(ZG^&$xu9y*!A,Mx/wΞc3'W2MAU {m9HBnCگq p RmNWںE1! ~H3Kѽtu YU8qƷp= nCMq}:逩 B}:A4ZB?lr0-kڎcE|6 =5`mCa[IR:ͮ3\G]Tz?ePKATPKqK^2 ''mimetypePKqKMConfigurations2/floater/PKqK'Configurations2/accelerator/current.xmlPKqKConfigurations2/images/Bitmaps/PKqKConfigurations2/progressbar/PKqKQConfigurations2/menubar/PKqKConfigurations2/popupmenu/PKqKConfigurations2/toolbar/PKqKConfigurations2/statusbar/PKqK-Configurations2/toolpanel/PKqKcK(!!eThumbnails/thumbnail.pngPKqK`fn3' =$content.xmlPKqKCu, Wlayout-cachePKqK@5@5-XPictures/1000000000000349000000CA07007802.pngPKqK6//-3Pictures/10000000000002AD000000CA361E6218.pngPKqKŮ^^- Pictures/100000000000025300000096BB289E21.jpgPKqKm!~!~-(Pictures/100000000000028E000000A246953620.pngPKqK3eDj! settings.xmlPKqKD  styles.xmlPKqKh Omanifest.rdfPKqK {meta.xmlPKqKATMETA-INF/manifest.xmlPKZnrpe-nrpe-4.0.3/docs/NRPE.pdf000066400000000000000000006642371365211572000156370ustar00rootroot00000000000000%PDF-1.4 %äüöß 2 0 obj <> stream x\K#7W9`Jox3r9Mؽ離~'hoV,|n$գJٽ ;dݏu嫢e'5|=3t?Ľ9 Q({8 ~a{KO.ȃtߑ?ԓ(oO\B2 Q#bUFtwK]]g8XW6Jځ9@+ &ߍ`+,F~)98)dlE' e~n/dhFd"rЫbhH?QN$V@<'j<l6% N4lS}(|NPW i ظtt(_8?C!_:UBu1BD2k_'"Un5u9Cxbݬ DWpK\ L^3(B"HI[ 0, o*AD}+" QVf_Z צӑIMif!IZ*/4t1ݴ.ݬj6L,QOt6:?56]_(Y?-*כ?'c'm0efk Mcd(Bа{7KMf8חM`8\v0F$=킩~XjP548\6=X؄Rm'ʘE)p\ȎQsػɐl%al§ u<ʇUB;|8t \Nhd3|?'(ߕ+VCI Q T _`n2 f*Ƙ g6 PhqQl _o JU)Ġ:P፥~)E ٭x.|6ʵУ<92+o~ հED&m\e$Y I' Jc؞ ~jv(2ޕ/ZAn u7t"+|Tϥ@Dn29f5v[l옳pYNnPiJJC7^Qi$C%XWtIgg>{0W!`1(6}qS^6\^۔]屡i_ܽWYWCխ <᷃\ 9bsh 䇛0W/Æ_+(g2$@0!9? \9ϧgf'?␷ o5$iJL^r. p6͹Ӱu.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[>KFÿ6TΜRDZ SQeHG,BmBM#mV&Ƃf \@ok5[Ft{nnm͠>V& ]mv@k``h`A(Ԡ1h$V,^(y endstream endobj 132 0 obj 17899 endobj 133 0 obj <> endobj 134 0 obj <> stream x]n0E /%E)C 4Rq"}}=n+u: gfo)~C{IzY7۲:7&N4c:eoNCUE񛻻Nfn8C؎moj>6_|a3$kyj±;wO+KxȟCױi6Q$v:bB~6֥j$yV;gJSp!g~\x)$g ^KF%x+$:B-Yg? :>S̫ſ؀,)$)ĿD>w '8瘋ğn$%f_c-?ڛnrvFT7JO endstream endobj 135 0 obj <> endobj 136 0 obj <> endobj 137 0 obj <> /ProcSet[/PDF/Text/ImageC/ImageI/ImageB] >> endobj 1 0 obj <>/Contents 2 0 R>> endobj 5 0 obj <>/Contents 6 0 R>> endobj 10 0 obj <>/Contents 11 0 R>> endobj 17 0 obj <>/Contents 18 0 R>> endobj 20 0 obj <>/Contents 21 0 R>> endobj 23 0 obj <>/Contents 24 0 R>> endobj 26 0 obj <>/Contents 27 0 R>> endobj 29 0 obj <>/Contents 30 0 R>> endobj 32 0 obj <>/Contents 33 0 R>> endobj 35 0 obj <>/Contents 36 0 R>> endobj 38 0 obj <>/Contents 39 0 R>> endobj 41 0 obj <>/Contents 42 0 R>> endobj 44 0 obj <>/Contents 45 0 R>> endobj 47 0 obj <>/Contents 48 0 R>> endobj 50 0 obj <>/Contents 51 0 R>> endobj 53 0 obj <>/Contents 54 0 R>> endobj 56 0 obj <>/Contents 57 0 R>> endobj 59 0 obj <>/Contents 60 0 R>> endobj 62 0 obj <>/Contents 63 0 R>> endobj 65 0 obj <>/Contents 66 0 R>> endobj 68 0 obj <>/Contents 69 0 R>> endobj 138 0 obj <> endobj 139 0 obj < /Dest[5 0 R/XYZ 36 690 0]/Parent 138 0 R/Next 142 0 R>> endobj 140 0 obj < /Dest[5 0 R/XYZ 37.5 656 0]/Parent 139 0 R/Next 141 0 R>> endobj 141 0 obj < /Dest[5 0 R/XYZ 37.5 482.4 0]/Parent 139 0 R/Prev 140 0 R>> endobj 142 0 obj < /Dest[10 0 R/XYZ 36 690 0]/Parent 138 0 R/Prev 139 0 R/Next 145 0 R>> endobj 143 0 obj < /Dest[10 0 R/XYZ 37.5 656 0]/Parent 142 0 R/Next 144 0 R>> endobj 144 0 obj < /Dest[10 0 R/XYZ 37.5 422.5 0]/Parent 142 0 R/Prev 143 0 R>> endobj 145 0 obj < /Dest[17 0 R/XYZ 36 690 0]/Parent 138 0 R/Prev 142 0 R/Next 161 0 R>> endobj 146 0 obj < /Dest[17 0 R/XYZ 37.5 509.4 0]/Parent 145 0 R/Next 147 0 R>> endobj 147 0 obj < /Dest[17 0 R/XYZ 37.5 348.9 0]/Parent 145 0 R/Prev 146 0 R/Next 155 0 R>> endobj 148 0 obj < /Dest[17 0 R/XYZ 36 317.8 0]/Parent 147 0 R/Next 149 0 R>> endobj 149 0 obj < /Dest[17 0 R/XYZ 36 243.7 0]/Parent 147 0 R/Prev 148 0 R/Next 150 0 R>> endobj 150 0 obj < /Dest[20 0 R/XYZ 36 320.6 0]/Parent 147 0 R/Prev 149 0 R/Next 151 0 R>> endobj 151 0 obj < /Dest[20 0 R/XYZ 36 232.2 0]/Parent 147 0 R/Prev 150 0 R/Next 152 0 R>> endobj 152 0 obj < /Dest[23 0 R/XYZ 36 193.7 0]/Parent 147 0 R/Prev 151 0 R/Next 153 0 R>> endobj 153 0 obj < /Dest[26 0 R/XYZ 36 470.8 0]/Parent 147 0 R/Prev 152 0 R/Next 154 0 R>> endobj 154 0 obj < /Dest[26 0 R/XYZ 36 320.2 0]/Parent 147 0 R/Prev 153 0 R>> endobj 155 0 obj < /Dest[32 0 R/XYZ 37.5 691.9 0]/Parent 145 0 R/Prev 147 0 R>> endobj 156 0 obj < /Dest[32 0 R/XYZ 36 506.3 0]/Parent 155 0 R/Next 157 0 R>> endobj 157 0 obj < /Dest[35 0 R/XYZ 36 694.8 0]/Parent 155 0 R/Prev 156 0 R/Next 158 0 R>> endobj 158 0 obj < /Dest[35 0 R/XYZ 36 449.5 0]/Parent 155 0 R/Prev 157 0 R/Next 159 0 R>> endobj 159 0 obj < /Dest[38 0 R/XYZ 36 694.8 0]/Parent 155 0 R/Prev 158 0 R/Next 160 0 R>> endobj 160 0 obj < /Dest[50 0 R/XYZ 36 694.8 0]/Parent 155 0 R/Prev 159 0 R>> endobj 161 0 obj < /Dest[53 0 R/XYZ 36 690 0]/Parent 138 0 R/Prev 145 0 R/Next 164 0 R>> endobj 162 0 obj < /Dest[53 0 R/XYZ 37.5 509.4 0]/Parent 161 0 R/Next 163 0 R>> endobj 163 0 obj < /Dest[56 0 R/XYZ 37.5 691.9 0]/Parent 161 0 R/Prev 162 0 R>> endobj 164 0 obj < /Dest[59 0 R/XYZ 36 690 0]/Parent 138 0 R/Prev 161 0 R/Next 167 0 R>> endobj 165 0 obj < /Dest[59 0 R/XYZ 37.5 621.1 0]/Parent 164 0 R/Next 166 0 R>> endobj 166 0 obj < /Dest[62 0 R/XYZ 37.5 691.9 0]/Parent 164 0 R/Prev 165 0 R>> endobj 167 0 obj < /Dest[65 0 R/XYZ 36 690 0]/Parent 138 0 R/Prev 164 0 R>> endobj 168 0 obj < /Dest[65 0 R/XYZ 36 607.1 0]/Parent 167 0 R/Next 169 0 R>> endobj 169 0 obj < /Dest[65 0 R/XYZ 36 308.7 0]/Parent 167 0 R/Prev 168 0 R/Next 170 0 R>> endobj 170 0 obj < /Dest[68 0 R/XYZ 36 691.9 0]/Parent 167 0 R/Prev 169 0 R/Next 171 0 R>> endobj 171 0 obj < /Dest[68 0 R/XYZ 36 542.1 0]/Parent 167 0 R/Prev 170 0 R/Next 172 0 R>> endobj 172 0 obj < /Dest[68 0 R/XYZ 36 441.5 0]/Parent 167 0 R/Prev 171 0 R/Next 173 0 R>> endobj 173 0 obj < /Dest[68 0 R/XYZ 36 340.9 0]/Parent 167 0 R/Prev 172 0 R>> endobj 100 0 obj <> endobj 71 0 obj <> endobj 72 0 obj <> endobj 73 0 obj <> endobj 74 0 obj <> endobj 75 0 obj <> endobj 76 0 obj <> endobj 77 0 obj <> endobj 78 0 obj <> endobj 79 0 obj <> endobj 80 0 obj <> endobj 81 0 obj <> endobj 82 0 obj <> endobj 83 0 obj <> endobj 84 0 obj <> endobj 85 0 obj <> endobj 86 0 obj <> endobj 87 0 obj <> endobj 88 0 obj <> >> endobj 89 0 obj <> >> endobj 90 0 obj <> >> endobj 91 0 obj <> >> endobj 92 0 obj <> >> endobj 93 0 obj <> >> endobj 94 0 obj <> >> endobj 95 0 obj <> >> endobj 96 0 obj <> >> endobj 97 0 obj <> >> endobj 98 0 obj <> endobj 99 0 obj <> endobj 174 0 obj <> /Outlines 138 0 R /Lang(en-US) >> endobj 175 0 obj < /Producer /CreationDate(D:20171117123955-06'00')>> endobj xref 0 176 0000000000 65535 f 0000203143 00000 n 0000000019 00000 n 0000001845 00000 n 0000001866 00000 n 0000203419 00000 n 0000023463 00000 n 0000025941 00000 n 0000025962 00000 n 0000054785 00000 n 0000203565 00000 n 0000054807 00000 n 0000056427 00000 n 0000067038 00000 n 0000056449 00000 n 0000067015 00000 n 0000076886 00000 n 0000203713 00000 n 0000076908 00000 n 0000080077 00000 n 0000203879 00000 n 0000080099 00000 n 0000082626 00000 n 0000204052 00000 n 0000082648 00000 n 0000085079 00000 n 0000204200 00000 n 0000085101 00000 n 0000088305 00000 n 0000204366 00000 n 0000088327 00000 n 0000089399 00000 n 0000204514 00000 n 0000089420 00000 n 0000091709 00000 n 0000204687 00000 n 0000091731 00000 n 0000094030 00000 n 0000204835 00000 n 0000094052 00000 n 0000096597 00000 n 0000204983 00000 n 0000096619 00000 n 0000097679 00000 n 0000205131 00000 n 0000097700 00000 n 0000099327 00000 n 0000205279 00000 n 0000099349 00000 n 0000100564 00000 n 0000205445 00000 n 0000100586 00000 n 0000102685 00000 n 0000205593 00000 n 0000102707 00000 n 0000105512 00000 n 0000205741 00000 n 0000105534 00000 n 0000107339 00000 n 0000205889 00000 n 0000107361 00000 n 0000109557 00000 n 0000206062 00000 n 0000109579 00000 n 0000111649 00000 n 0000206235 00000 n 0000111671 00000 n 0000114789 00000 n 0000206401 00000 n 0000114811 00000 n 0000117290 00000 n 0000215400 00000 n 0000215514 00000 n 0000215629 00000 n 0000215748 00000 n 0000215867 00000 n 0000215982 00000 n 0000216101 00000 n 0000216220 00000 n 0000216335 00000 n 0000216454 00000 n 0000216573 00000 n 0000216690 00000 n 0000216805 00000 n 0000216922 00000 n 0000217039 00000 n 0000217154 00000 n 0000217270 00000 n 0000217386 00000 n 0000217539 00000 n 0000217710 00000 n 0000217883 00000 n 0000218054 00000 n 0000218227 00000 n 0000218394 00000 n 0000218567 00000 n 0000218738 00000 n 0000218911 00000 n 0000219091 00000 n 0000219207 00000 n 0000215158 00000 n 0000117312 00000 n 0000125431 00000 n 0000125454 00000 n 0000125653 00000 n 0000126051 00000 n 0000126308 00000 n 0000139774 00000 n 0000139798 00000 n 0000140002 00000 n 0000140627 00000 n 0000141109 00000 n 0000142666 00000 n 0000142689 00000 n 0000142883 00000 n 0000143175 00000 n 0000143339 00000 n 0000159116 00000 n 0000159140 00000 n 0000159337 00000 n 0000159959 00000 n 0000160421 00000 n 0000168034 00000 n 0000168057 00000 n 0000168265 00000 n 0000168614 00000 n 0000168831 00000 n 0000182713 00000 n 0000182737 00000 n 0000182939 00000 n 0000183483 00000 n 0000183878 00000 n 0000201866 00000 n 0000201890 00000 n 0000202097 00000 n 0000202574 00000 n 0000202907 00000 n 0000203008 00000 n 0000206549 00000 n 0000206609 00000 n 0000206794 00000 n 0000206933 00000 n 0000207106 00000 n 0000207305 00000 n 0000207469 00000 n 0000207643 00000 n 0000207843 00000 n 0000208009 00000 n 0000208232 00000 n 0000208396 00000 n 0000208629 00000 n 0000208818 00000 n 0000209039 00000 n 0000209276 00000 n 0000209481 00000 n 0000209709 00000 n 0000209935 00000 n 0000210163 00000 n 0000210448 00000 n 0000210689 00000 n 0000210958 00000 n 0000211126 00000 n 0000211397 00000 n 0000211611 00000 n 0000211841 00000 n 0000212028 00000 n 0000212234 00000 n 0000212428 00000 n 0000212626 00000 n 0000213174 00000 n 0000213783 00000 n 0000214132 00000 n 0000214489 00000 n 0000214886 00000 n 0000219323 00000 n 0000219482 00000 n trailer < <76D441A7D9F4D844838679C2E537FA8C> ] /DocChecksum /67B9E8151803BDFF3897ECFB2B910654 >> startxref 219662 %%EOF nrpe-nrpe-4.0.3/include/000077500000000000000000000000001365211572000150515ustar00rootroot00000000000000nrpe-nrpe-4.0.3/include/acl.h000066400000000000000000000037471365211572000157740ustar00rootroot00000000000000/**************************************************************************** * * acl.h - header file for acl.c * * License: GPLv2 * Copyright (c) 2011 Kaspersky Lab ZAO * * License Notice: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ****************************************************************************/ #ifndef ACL_H_INCLUDED #define ACL_H_INCLUDED 1 #include #include #include #include #include #include #include #include #include #include #include #define CHAR_TO_NUMBER(c) ((c) - '0') struct ip_acl { int family; struct in_addr addr; struct in_addr mask; struct in6_addr addr6; struct in6_addr mask6; struct ip_acl *next; }; struct dns_acl { char domain[255]; struct dns_acl *next; }; /* Pointers to head ACL structs */ static struct ip_acl *ip_acl_head, *ip_acl_prev; static struct dns_acl *dns_acl_head, *dns_acl_prev; /* Functions */ void parse_allowed_hosts(char *allowed_hosts); int add_ipv4_to_acl(char *ipv4); int add_ipv6_to_acl(char *ipv6); int add_domain_to_acl(char *domain); //int is_an_allowed_host(struct in_addr); int is_an_allowed_host(int, void *); unsigned int prefix_from_mask(struct in_addr mask); void show_acl_lists(void); #endif /* ACL_H_INCLUDED */ nrpe-nrpe-4.0.3/include/common.h.in000066400000000000000000000071761365211572000171320ustar00rootroot00000000000000/**************************************************************************** * * common.h - NRPE Common header file * * License: GPLv2 * Copyright (c) 2006-2017 Nagios Enterprises * 1999-2006 Ethan Galstad (nagios@nagios.org) * * License Notice: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ****************************************************************************/ #include "config.h" #define SSL_TYPE_@SSL_TYPE@ #ifdef HAVE_SSL #include <@SSL_INC_PREFIX@@SSL_HDR@> # ifdef SSL_TYPE_openssl # include <@SSL_INC_PREFIX@err.h> # include <@SSL_INC_PREFIX@rand.h> # include <@SSL_INC_PREFIX@engine.h> # endif #endif #define PROGRAM_VERSION "4.0.3" #define MODIFICATION_DATE "2020-04-28" #define OK 0 #define ERROR -1 #define TRUE 1 #define FALSE 0 #define STATE_UNKNOWN 3 /* service state return codes */ #define STATE_CRITICAL 2 #define STATE_WARNING 1 #define STATE_OK 0 #define DEFAULT_SOCKET_TIMEOUT 10 /* timeout after 10 seconds */ #define DEFAULT_CONNECTION_TIMEOUT 300 /* timeout if daemon is waiting for connection more than this time */ #define MAX_INPUT_BUFFER 2048 /* max size of most buffers we use */ #define MAX_FILENAME_LENGTH 256 #define MAX_HOST_ADDRESS_LENGTH 256 /* max size of a host address */ #define MAX_COMMAND_ARGUMENTS 16 #define NRPE_HELLO_COMMAND "_NRPE_CHECK" /**************** PACKET STRUCTURE DEFINITION **********/ #define QUERY_PACKET 1 /* id code for a packet containing a query */ #define RESPONSE_PACKET 2 /* id code for a packet containing a response */ /* v4 takes struct padding into account, so the buffer "takes" 4 bytes * v3 removes the 1 byte that "should" be allocated to buffer. */ #define NRPE_V4_PACKET_SIZE_OFFSET 4 #define NRPE_V3_PACKET_SIZE_OFFSET 1 /* packet version identifiers */ #define NRPE_PACKET_VERSION_4 4 /* Same as version 3, but accounts for struct padding in network code */ #define NRPE_PACKET_VERSION_3 3 /* Allows for variable-length buffer */ #define NRPE_PACKET_VERSION_2 2 #define NRPE_PACKET_VERSION_1 1 /* older packet version identifiers (no longer supported) */ #define MAX_PACKETBUFFER_LENGTH 1024 /* amount of data to send in one query/response vor version 2 */ #define NRPE_DEFAULT_PACKET_VERSION NRPE_PACKET_VERSION_4 typedef struct _v2_packet { int16_t packet_version; int16_t packet_type; u_int32_t crc32_value; int16_t result_code; char buffer[MAX_PACKETBUFFER_LENGTH]; } v2_packet; typedef struct _v3_packet { int16_t packet_version; int16_t packet_type; u_int32_t crc32_value; int16_t result_code; int16_t alignment; int32_t buffer_length; char buffer[1]; } v3_packet; typedef v3_packet v4_packet; /**************** OPERATING SYSTEM SPECIFIC DEFINITIONS **********/ #if defined(__sun) || defined(__hpux) # ifndef LOG_AUTHPRIV # define LOG_AUTHPRIV LOG_AUTH # endif # ifndef LOG_FTP # define LOG_FTP LOG_DAEMON # endif #elif defined(_AIX) # include # ifndef LOG_FTP # define LOG_FTP LOG_DAEMON # endif #endif nrpe-nrpe-4.0.3/include/config.h.in000066400000000000000000000177641365211572000171130ustar00rootroot00000000000000/**************************************************************************** * * config.h - NRPE Configuration header file * * License: GPLv2 * Copyright (c) 2006-2017 Nagios Enterprises * 1999-2006 Ethan Galstad (nagios@nagios.org) * * License Notice: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ****************************************************************************/ #ifndef _CONFIG_H #define _CONFIG_H #include #include /* Default port for NRPE daemon */ #undef DEFAULT_SERVER_PORT /* NRPE syslog facility */ #undef NRPE_LOG_FACILITY /* Enable command-line arguments */ #undef ENABLE_COMMAND_ARGUMENTS /* Enable bash command substitution */ #undef ENABLE_BASH_COMMAND_SUBSTITUTION /* type to use in place of socklen_t if not defined */ #undef socklen_t /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Have the TCP wrappers library */ #undef HAVE_LIBWRAP /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the `strtok_r' function. */ #undef HAVE_STRTOK_R /* Define to 1 if you have the `initgroups' function. */ #undef HAVE_INITGROUPS /* Define to 1 if you have the `closesocket' function. */ #undef HAVE_CLOSESOCKET /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* Define to 1 if you have the `scandir' function. */ #undef HAVE_SCANDIR /* Set to 1 if you have rfc931_timeout */ #undef HAVE_RFC931_TIMEOUT /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Set to 1 to use SSL DH */ #undef USE_SSL_DH /* stupid stuff for u_int32_t */ #undef U_INT32_T_IS_USHORT #undef U_INT32_T_IS_UINT #undef U_INT32_T_IS_ULONG #undef U_INT32_T_IS_UINT32_T #ifdef U_INT32_T_IS_USHORT typedef unsigned short u_int32_t; #endif #ifdef U_INT32_T_IS_ULONG typedef unsigned long u_int32_t; #endif #ifdef U_INT32_T_IS_UINT typedef unsigned int u_int32_t; #endif #ifdef U_INT32_T_IS_UINT32_t typedef uint32_t u_int32_t; #endif /* stupid stuff for int32_t */ #undef INT32_T_IS_SHORT #undef INT32_T_IS_INT #undef INT32_T_IS_LONG #ifdef INT32_T_IS_USHORT typedef short int32_t; #endif #ifdef INT32_T_IS_ULONG typedef long int32_t; #endif #ifdef INT32_T_IS_UINT typedef int int32_t; #endif /***** ASPRINTF() AND FRIENDS *****/ /* Whether vsnprintf() is available */ #undef HAVE_VSNPRINTF /* Whether snprintf() is available */ #undef HAVE_SNPRINTF /* Whether aprintf() is available */ #undef HAVE_ASPRINTF /* Whether vaprintf() is available */ #undef HAVE_VASPRINTF /* Define if system has C99 compatible vsnprintf */ #undef HAVE_C99_VSNPRINTF /* Whether va_copy() is available */ #undef HAVE_VA_COPY /* Whether __va_copy() is available */ #undef HAVE___VA_COPY /* Socket Size Type */ #undef SOCKET_SIZE_TYPE /* Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'. */ #undef GETGROUPS_T /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if the system has the type `struct sockaddr_storage'. */ #undef HAVE_STRUCT_SOCKADDR_STORAGE /* Use seteuid() or setresuid() depending on the platform */ #undef SETEUID /* Set to 1 if we are on Solaris 10 */ #undef SOLARIS_10 /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H #ifdef HAVE_GETOPT_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H #ifdef HAVE_STRINGS_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H #ifdef HAVE_STRING_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H #ifdef HAVE_SIGNAL_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H #ifdef HAVE_SYSLOG_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H #ifdef HAVE_SYS_STAT_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H #ifdef HAVE_FCNTL_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H #ifdef HAVE_SYS_WAIT_H #include #endif #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H #ifdef HAVE_ERRNO_H #include #endif /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H #ifdef HAVE_SYS_SOCKET_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_SOCKET_H #ifdef HAVE_SOCKET_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_TCPD_H #ifdef HAVE_TCPD_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H #ifdef HAVE_NETINET_IN_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H #ifdef HAVE_ARPA_INET_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H #ifdef HAVE_NETDB_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H #ifdef HAVE_CTYPE_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_PWD_H #ifdef HAVE_PWD_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_GRP_H #ifdef HAVE_GRP_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_DIRENT_H #ifdef HAVE_DIRENT_H #include #endif /* Have SSL support */ #undef HAVE_SSL /* Have the krb5.h header file */ #undef HAVE_KRB5_H #ifdef HAVE_KRB5_H #include #endif /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H #ifdef HAVE_INTTYPES_H #include #else #ifdef HAVE_STDINT_H #include #endif #endif /* Define to 1 if you have the header file. */ #undef HAVE_PATHS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H #endif nrpe-nrpe-4.0.3/include/nrpe.h000066400000000000000000000047721365211572000162000ustar00rootroot00000000000000/**************************************************************************** * * nrpe.h - Nagios Remote Plugin Executor header file * * License: GPLv2 * Copyright (c) 2006-2017 Nagios Enterprises * 1999-2006 Ethan Galstad (nagios@nagios.org) * * License Notice: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ****************************************************************************/ #include typedef struct command_struct { char *command_name; char *command_line; struct command_struct *next; } command; int init(void); void init_ssl(void); void log_ssl_startup(void); void usage(int); void run_inetd(void); void run_src(void); void run_daemon(void); void set_stdio_sigs(void); void cleanup(void); int read_config_file(char *); int read_config_dir(char *); int get_log_facility(char *); int add_command(char *,char *); command *find_command(char *); void create_listener(struct addrinfo *ai); void wait_for_connections(void); void setup_wait_conn(void); int wait_conn_fork(int sock); void conn_check_peer(int sock); void handle_connection(int); void init_handle_conn(void); int handle_conn_ssl(int sock, void *ssl_ptr); int read_packet(int sock, void *ssl_ptr, v2_packet *v2_pkt, v3_packet **v3_pkt); void free_memory(void); int my_system(char*, int, int*, char**); /* executes a command via popen(), but also protects against timeouts */ void my_system_sighandler(int); /* handles timeouts when executing commands via my_system() */ void my_connection_sighandler(int); /* handles timeouts of connection */ int drop_privileges(char *,char *, int); int write_pid_file(void); int remove_pid_file(void); int check_privileges(void); void sighandler(int); void child_sighandler(int); int validate_request(v2_packet *, v3_packet *); int contains_nasty_metachars(char *); int process_macros(char *,char *,int); int process_arguments(int,char **); nrpe-nrpe-4.0.3/include/utils.h000066400000000000000000000036121365211572000163640ustar00rootroot00000000000000/**************************************************************************** * * utils.h - NRPE Utility Functions header file * * License: GPLv2 * Copyright (c) 2009-2017 Nagios Enterprises * 1999-2008 Ethan Galstad (nagios@nagios.org) * * License Notice: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ****************************************************************************/ #ifndef NRPE_UTILS_H_INCLUDED #define NRPE_UTILS_H_INCLUDED #include "../include/config.h" void generate_crc32_table(void); unsigned long calculate_crc32(char*, int); void randomize_buffer(char*,int); int my_tcp_connect(char*, int, int*); #ifdef HAVE_STRUCT_SOCKADDR_STORAGE int my_connect(const char*, struct sockaddr_storage*, u_short, int, const char*, int); #else int my_connect(const char*, struct sockaddr*, u_short, int, const char*, int); #endif void add_listen_addr(struct addrinfo**, int, char*, int); int clean_environ(const char *keep_env_vars, const char *nrpe_user); char* strip(char*); int sendall(int, char*, int*); int recvall(int, char*, int*, int); char *my_strsep(char**, const char*); void open_log_file(); void logit(int priority, const char *format, ...); void close_log_file(); void display_license(void); extern int disable_syslog; #endif nrpe-nrpe-4.0.3/macros/000077500000000000000000000000001365211572000147125ustar00rootroot00000000000000nrpe-nrpe-4.0.3/macros/.gitignore000066400000000000000000000000131365211572000166740ustar00rootroot00000000000000nbproject/ nrpe-nrpe-4.0.3/macros/CHANGELOG.md000066400000000000000000000002041365211572000165170ustar00rootroot000000000000001.0.1 ----- * Fix bug determining inetd,xinetd if neither are running (Bryan Heden) 1.0.0 ----- * Initial Release (John Frickson)nrpe-nrpe-4.0.3/macros/LICENSE000066400000000000000000000355051365211572000157270ustar00rootroot00000000000000The GNU General Public License, Version 2, June 1991 (GPLv2) ============================================================ > Copyright (C) 1989, 1991 Free Software Foundation, Inc. > 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -------- The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. Terms And Conditions For Copying, Distribution And Modification --------------------------------------------------------------- **0.** This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. **1.** You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. **2.** You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: * **a)** You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. * **b)** You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. * **c)** If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. **3.** You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: * **a)** Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, * **b)** Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, * **c)** Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. **4.** You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. **5.** You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. **6.** Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. **7.** If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. **8.** If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. **9.** The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. **10.** If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. No Warranty ----------- **11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. **12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.nrpe-nrpe-4.0.3/macros/LICENSE.md000077700000000000000000000000001365211572000173162LICENSEustar00rootroot00000000000000nrpe-nrpe-4.0.3/macros/README.md000066400000000000000000000163131365211572000161750ustar00rootroot00000000000000autoconf-macros =============== The purpose of Nagios autoconf-macros is to have a central place for autoconf macros that can be maintained in one place, but be used by any of the Nagios software. It is intended to be used as a git subtree. See the [Usage](#usage) and [References](#references) sections below. Since this project will be included in several parent projects, any changes must be as project-neutral as possible. Make sure to check out the [CHANGELOG](CHANGELOG.md) for relevant information, as well. Contents -------- The collection consists of the following macros: ### AX_NAGIOS_GET_OS alias AC_NAGIOS_GET_OS > Output Variable : `opsys` This macro detects the operating system, and transforms it into a generic label. The most common OS's that use Nagios software are recognized and used in subsequent macros. ### AX_NAGIOS_GET_DISTRIB_TYPE alias AC_NAGIOS_GET_DISTRIB_TYPE > Output Variables : `dist_type`, `dist_ver` This macro detects the distribution type. For Linux, this would be rh (for Red Hat and derivitives), suse (OpenSUSE, SLES, derivitives), gentoo (Gentoo and derivitives), debian (Debian and derivitives), and so on. For BSD, this would be openbsd, netbsd, freebsd, dragonfly, etc. It can also be aix, solaris, osx, and so on for Unix operating systems. ### AX_NAGIOS_GET_INIT alias AC_NAGIOS_GET_INIT > Output Variable : `init_type` This macro detects what software is used to start daemons on bootup or on request, generally knows as the "init system". The init_type will generally be one of sysv (many), bsd (Slackware), newbsd (*BSD), launchd (OS X), smf10 or smf11 (Solaris), systemd (newer Linux), gentoo (older Gentoo), upstart (several), or unknown. ### AX_NAGIOS_GET_INETD alias AC_NAGIOS_GET_INETD > Output Variable : `inetd_type` This macro detects what software is used to start daemons or services on demand, which historically has been "inetd". The inetd_type will generally be one of inetd, xinetd, launchd (OS X), smf10 or smf11 (Solaris), systemd (newer Linux), upstart (several), or unknown. ### AX_NAGIOS_GET_PATHS alias AC_NAGIOS_GET_PATHS > Output Variables : **many!** This macro determines the installation paths for binaries, config files, PID files, and so on. For a "standard" install of Nagios, NRPE, NDO Utils, etc., most will be in the /usr/local/nagios hierarchy with startup files located in /etc. For distributions or software repositories, the "--enable-install-method=os" option can be used. This will determine the O/S dependant directories, such as /usr/bin, /usr/sbin, /var/lib/nagios, /usr/lib/nagios, etc. or for OS X, /Library/LaunchDaemons. ### AX_NAGIOS_GET_FILES alias AC_NAGIOS_GET_FILES > Output Variables : `src_init`, `src_inetd`, `src_tmpfile` Each Nagios project will have a top-level directory named "/startup/". In that directory will be "*.in" files for the various "init_type" and "inetd_type" systems. This macro will determine which file(s) from that directory will be needed. ### AX_NAGIOS_GET_SSL alias AC_NAGIOS_GET_SSL > Output Variables : `HAVE_KRB5_H`, `HAVE_SSL`, `SSL_INC_DIR`, `SSL_LIB_DIR`, `CFLAGS`, `LDFLAGS`, `LIBS` This macro checks various directories for SSL libraries and header files. The searches are based on known install locations on various operating systems and distributions, for openssl, gnutls-openssl, and nss_compat_ossl. If it finds the headers and libraries, it will then do an `AC_LINK_IFELSE` on a simple program to make sure a compile and link will work correctly. Usage ----- This repo is intended to be used as a git subtree, so changes will automatically propogate, and still be reasonably easy to use. * First, Create, checkout, clone, or branch your project. If you do an `ls -AF` it might look something like this: .git/ .gitignore ChangeLog LICENSE Makefile.in README configure.ac include/ src/ * Then make a reference to _this_ project inside your project. git remote add autoconf-macros git@github.com:NagiosEnterprises/autoconf-macros git subtree add --prefix=macros/ autoconf-macros master * After executing the above two commands, if you do an `ls -AF` now, it should look like this: .git/ .gitignore ChangeLog LICENSE Makefile.in README configure.ac include/ macros/ src/ * The `macros/` directory has been added. * Now do a `git push` to save everything. * If you make any changes to autoconf-macros, commit them separately from any parent-project changes to keep from polluting the commit history with unrelated comments. * To submit your changes to autoconf-macros: git subtree push --prefix=macros autoconf-macros peters-updates This will create a new branch called `peters-updates`. You then need to create a _pull request_ to get your changes merged into autoconf-macros master. * To get the latest version of `autoconf-macros` into your parent project: git subtgree pull --squash --prefix=macros autoconf-macros master References ---------- Now that autoconf-macros is available to your project, you will need to reference it. * Create (or add these lines to) file `YourProject/aclocal.m4` m4_include([macros/ax_nagios_get_os]) m4_include([macros/ax_nagios_get_distrib]) m4_include([macros/ax_nagios_get_init]) m4_include([macros/ax_nagios_get_inetd]) m4_include([macros/ax_nagios_get_paths]) m4_include([macros/ax_nagios_get_files]) m4_include([macros/ax_nagios_get_ssl]) * In your `YourProject/configure.ac` add the following lines. A good place to put them would be right after any `AC_PROG_*` entries: AC_NAGIOS_GET_OS AC_NAGIOS_GET_DISTRIB_TYPE AC_NAGIOS_GET_INIT AC_NAGIOS_GET_INETD AC_NAGIOS_GET_PATHS AC_NAGIOS_GET_FILES * If you need SSL functionality, add the following to `YourProject/configure.ac` where you want to check for SSL: AC_NAGIOS_GET_SSL * You will now be able to reference any of the variables in `config.h.in` and any files listed in the `AC_CONFIG_FILES` macro in `configure.ac`. License Notice -------------- Copyright (c) 2016-2017 Nagios Enterprises, LLC This work is made available to you under the terms of Version 2 of the GNU General Public License. A copy of that license should have been provided with this software, but in any event can be obtained from http://www.fsf.org. This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 or visit their web page on the internet at http://www.fsf.org. Questions? ---------- If you have questions about this addon, or problems getting things working, first try searching the nagios-users mailing list archives. Details on searching the list archives can be found at http://www.nagios.org If you don't find an answer there, post a message in the Nagios Plugin Development forum at https://support.nagios.com/forum/viewforum.php?f=35 nrpe-nrpe-4.0.3/macros/add_group_user000077500000000000000000000061461365211572000176510ustar00rootroot00000000000000#!/bin/sh #---------------------- # Initialize variables #---------------------- dist="$1" uid="$2" gid="$3" rc=0 #------------------------------------- # Check if the specified group exists #------------------------------------- group_exists(){ case $dist in osx) rc=`dscl . -read /Groups/$gid >/dev/null 2>&1; echo $?` ;; hpux) rc=`grget -n $gid >/dev/null 2>&1; echo $?` ;; aix) rc=`lsgroup -a $gid >/dev/null 2>&1; echo $?` ;; *) rc=`getent group $gid > /dev/null 2>&1; echo $?` ;; esac echo $rc } #------------------------ # Add the specified user #------------------------ add_user(){ rc=`id "$uid" > /dev/null 2>&1; echo $?` if test $rc -eq 0; then echo "User $uid already exists" > /dev/stderr echo 0 return fi case $dist in aix) echo useradd -g $gid $uid > /dev/stderr rc=`useradd -g $gid $uid; echo $?` ;; hpux) echo useradd -m -g $gid $uid > /dev/stderr rc=`useradd -m -g $gid $uid; echo $?` ;; solaris) echo useradd -m -d /export/home/$uid -g $gid $uid > /dev/stderr rc=`useradd -m -d /export/home/$uid -g $gid $uid; echo $?` ;; osx) newid=`dscl . -list /Users UniqueID | tr -s ' ' | cut -d' ' -f2 | sort -n | tail -1` newid=`expr 1 + $newid` echo dscl . -create /Users/$uid > /dev/stderr dscl . -create /Users/$uid echo dscl . -create /Users/$uid UniqueID $newid > /dev/stderr dscl . -create /Users/$uid UniqueID $newid echo dscl . -create /Users/$uid UserShell /usr/bin/false > /dev/stderr dscl . -create /Users/$uid UserShell /usr/bin/false echo dscl . -create /Users/$uid PrimaryGroupID 20 > /dev/stderr dscl . -create /Users/$uid PrimaryGroupID 20 echo dscl . -append /Groups/$gid GroupMembership $uid > /dev/stderr rc=`dscl . -append /Groups/$gid GroupMembership $uid; echo $?` ;; freebsd) echo pw add user $uid -g $gid -s /usr/bin/false > /dev/stderr rc=`pw add user $uid -g $gid -s /usr/bin/false; echo $?` ;; netbsd|openbsd) echo useradd -g $gid $uid > /dev/stderr rc=`useradd -g $gid $uid; echo $?` ;; *) echo useradd -r -g $gid $uid > /dev/stderr rc=`useradd -r -g $gid $uid; echo $?` ;; esac echo $rc } #------------------------- # Add the specified group #------------------------- add_group(){ rc=`group_exists` if test $rc -eq 0; then echo "Group $gid already exists" > /dev/stderr echo 0 return fi case $dist in aix) echo mkgroup $gid > /dev/stderr rc=`mkgroup "$gid"; echo $?` ;; hpux|solaris) echo groupadd $gid > /dev/stderr rc=`groupadd "$gid"; echo $?` ;; osx) newid=`dscl . -list /Groups gid | tr -s ' ' | cut -d' ' -f2 | sort -n | tail -1` newid=`expr 1 + $newid` echo dscl . -create /Groups/$gid gid $newid > /dev/stderr rc=`dscl . -create /Groups/$gid gid $newid; echo $?` ;; freebsd) echo pw add group $gid > /dev/stderr rc=`pw add group $gid; echo $?` ;; netbsd|openbsd) echo groupadd $gid > /dev/stderr rc=`groupadd $gid; echo $?` ;; *) echo groupadd -r $gid > /dev/stderr rc=`groupadd -r $gid; echo $?` ;; esac echo $rc } rc=`add_group` if test $rc -ne 0; then exit 1; fi rc=`add_user` exit $rc nrpe-nrpe-4.0.3/macros/ax_nagios_get_distrib000066400000000000000000000114311365211572000211640ustar00rootroot00000000000000# =========================================================================== # SYNOPSIS # # AX_NAGIOS_GET_DISTRIB_TYPE # # DESCRIPTION # # This macro determines the O/S distribution of the computer it is run on. # $dist_type will be set and will be one of: # unknown (could not be determined) # freebsd, netbsd, openbsd, dragonfly, etc (The BSDs) # suse, rh, debian, gentoo (and possibly their descendants) # Other major Linux distributions (and possibly their descendants) # The O/S name for the rest # # LICENSE # # Copyright (c) 2016 Nagios Core Development Team # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. # =========================================================================== AU_ALIAS([AC_NAGIOS_GET_DISTRIB_TYPE], [AX_NAGIOS_GET_DISTRIB_TYPE]) AC_DEFUN([AX_NAGIOS_GET_DISTRIB_TYPE], [ AC_SUBST(dist_type) AC_SUBST(dist_ver) # # Get user hints for possible cross-compile # AC_MSG_CHECKING(what the distribution type is ) AC_ARG_WITH(dist-type, AC_HELP_STRING([--with-dist-type=type], [specify distribution type (suse, rh, debian, etc.)]), [ # # Run this if --with was specified # if test "x$withval" = x -o x$withval = xno; then dist_type_wanted=yes else dist_type_wanted=no dist_type="$withval" dist_ver="unknown" AC_MSG_RESULT($dist_type) fi ], [ # # Run this if --with was not specified # dist_type_wanted=yes ]) if test x$dist_type = xno; then dist_type_wanted=yes elif test x$dist_type = xyes; then AC_MSG_ERROR([you must enter a distribution type if '--with-dist-type' is specified]) fi # # Determine distribution type if it wasn't supplied # dist_ver="unknown" if test $dist_type_wanted=yes; then dist_type="unknown" if test "$opsys" != "linux"; then dist_type="$opsys" AS_CASE([$opsys], [bsd], dist_type=`uname -s | tr ["[A-Z]" "[a-z]"]` dist_ver=`uname -r`, [aix], dist_ver="`uname -v`.`uname -r`", [hp-ux], dist_ver=`uname -r | cut -d'.' -f1-3`, [solaris], dist_ver=`uname -r | cut -d'.' -f2`, [*], dist_ver=$OSTYPE ) else if test -r "/etc/gentoo-release"; then dist_type="gentoo" dist_ver=`cat /etc/gentoo-release` elif test -r "/etc/os-release"; then . /etc/os-release if test x"$ID_LIKE" != x; then dist_type=`echo $ID_LIKE | cut -d' ' -f1 | tr ["[A-Z]" "[a-z]"]` elif test x"$ID" = xol; then dist_type=rh else dist_type=`echo $ID | tr ["[A-Z]" "[a-z]"]` fi if test x"$dist_type" = sles; then dist_type=suse fi if test x"$VERSION_ID" != x; then dist_ver=$VERSION_ID elif test x"$VERSION" != x; then dist_ver=`echo $VERSION | cut -d'.' -f1 | tr -d [:alpha:][:blank:][:punct:]` fi elif test -r "/etc/redhat-release"; then dist_type=rh dist_ver=`cat /etc/redhat-release` elif test -r "/etc/debian_version"; then dist_type="debian" if test -r "/etc/lsb-release"; then . /etc/lsb-release dist_ver=`echo "$DISTRIB_RELEASE"` else dist_ver=`cat /etc/debian_version` fi elif test -r "/etc/SuSE-release"; then dist_type=suse dist_ver=`grep VERSION /etc/SuSE-release` fi fi if test "$dist_ver" != "unknown"; then dist_ver=`echo "$dist_ver" | cut -d'.' -f1 | tr -d [:alpha:][:blank:][:punct:]` fi fi AC_MSG_RESULT($dist_type) ]) nrpe-nrpe-4.0.3/macros/ax_nagios_get_files000066400000000000000000000065031365211572000206320ustar00rootroot00000000000000# =========================================================================== # SYNOPSIS # # AX_NAGIOS_GET_FILES # # DESCRIPTION # # This macro figures out which init and/or inetd files to use based # on the results of the AX_NAGIOS_GET_OS, AX_NAGIOS_GET_DISTRIB_TYPE, # AX_NAGIOS_GET_INIT and AX_NAGIOS_GET_INETD macros. It will select # the appropriate files(s) from the 'startup' directory and copy it. # # LICENSE # # Copyright (c) 2016 Nagios Core Development Team # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. # =========================================================================== AU_ALIAS([AC_NAGIOS_GET_FILES], [AX_NAGIOS_GET_FILES]) AC_DEFUN([AX_NAGIOS_GET_FILES], [ AC_SUBST(src_init) AC_SUBST(src_inetd) AC_SUBST(src_tmpfile) AC_SUBST(bsd_enable) src_inetd="" src_init="" bsd_enable="" AC_MSG_CHECKING(for which init file to use ) AS_CASE([$init_type], [sysv], src_init=default-init, [systemd], src_tmpfile=tmpfile.conf src_init=default-service, [bsd], src_init=bsd-init, [newbsd], if test $dist_type = freebsd ; then bsd_enable="_enable" src_init=newbsd-init elif test $dist_type = openbsd ; then bsd_enable="_flags" src_init=openbsd-init elif test $dist_type = netbsd ; then bsd_enable="" src_init=newbsd-init fi, # [gentoo], [openrc], src_init=openrc-init, [smf*], src_init="solaris-init.xml" src_inetd="solaris-inetd.xml", [upstart], if test $dist_type = rh ; then src_init=rh-upstart-init else src_init=upstart-init fi, [launchd], src_init="mac-init.plist", [*], src_init="unknown" ) AC_MSG_RESULT($src_init) AC_MSG_CHECKING(for which inetd files to use ) if test x$src_inetd = x; then AS_CASE([$inetd_type], [inetd*], src_inetd=default-inetd, [xinetd], src_inetd=default-xinetd, [systemd], src_inetd=default-socket, [launchd], src_inetd="mac-inetd.plist", [*], src_inetd="unknown" ) fi AC_MSG_RESULT($src_inetd) ]) nrpe-nrpe-4.0.3/macros/ax_nagios_get_inetd000066400000000000000000000103671365211572000206360ustar00rootroot00000000000000# =========================================================================== # SYNOPSIS # # AX_NAGIOS_GET_INETD # # DESCRIPTION # # This macro determines whether inetd or xinetd is being used # The argument are: # the init type as determined by AX_NAGIOS_GET_INIT # $inetd_type will be set and will be one of: # unknown (could not be determined) # launchd (Mac OS X) # smf10 (Solaris) # smf11 (Solaris) # upstart (Older Debian) # xinetd (Most Linux, BSD) # inetd (The rest) # # LICENSE # # Copyright (c) 2016 Nagios Core Development Team # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. # =========================================================================== AU_ALIAS([AC_NAGIOS_GET_INETD], [AX_NAGIOS_GET_INETD]) AC_DEFUN([AX_NAGIOS_GET_INETD], [ AC_SUBST(inetd_type) # # Get user hints for possible cross-compile # AC_MSG_CHECKING(what inetd is being used ) AC_ARG_WITH(inetd_type, AC_HELP_STRING([--with-inetd-type=type], [which super-server the system runs (inetd, xinetd, systemd, launchd, smf10, smf11, etc.)]), [ inetd_type_wanted=yes # # Run this if --with was specified # if test "x$withval" = x -o x$withval = xno; then inetd_type_wanted=yes else inetd_type_wanted=no inetd_type="$withval" AC_MSG_RESULT($inetd_type) fi ], [ # # Run this if --with was not specified # inetd_type_wanted=yes ]) if test x$inetd_type = xno; then inetd_type_wanted=yes elif test x$inetd_type = xyes; then AC_MSG_ERROR([you must enter an inetd type if '--with-inetd-type' is specified]) fi # # Determine inetd type if it wasn't supplied # if test $inetd_type_wanted = yes; then inetd_disabled="" AS_CASE([$dist_type], [solaris], if test x"$init_type" = "xsmf10" -o x"$init_type" = "xsmf11"; then inetd_type="$init_type" else inetd_type="inetd" fi, [*bsd*], inetd_type=`ps -A -o comm -c | grep inetd`, [osx], inetd_type=`launchd`, [aix|hp-ux], inetd_type=`UNIX95= ps -A -o comm | grep inetd | head -1`, [*], inetd_type=[`ps -C "inetd,xinetd" -o fname | grep -vi COMMAND | head -1`]) if test x"$inetd_type" = x; then if test -f /etc/xinetd.conf -a -d /etc/xinetd.d; then inetd_disabled="(Not running)" inetd_type=xinetd elif test -f /etc/inetd.conf -o -f /usr/sbin/inetd; then inetd_type=inetd inetd_disabled="(Not running)" fi fi if test x"$inetd_type" = x; then if test x"$init_type" = "xupstart"; then inetd_type="upstart" fi fi if test x"$inetd_type" = x; then if test x"$init_type" = "xsystemd"; then inetd_type="systemd" else inetd_type="unknown" fi fi if test -n "$inetd_disabled"; then AC_MSG_RESULT($inetd_type $inetd_disabled) else AC_MSG_RESULT($inetd_type) fi fi ]) nrpe-nrpe-4.0.3/macros/ax_nagios_get_init000066400000000000000000000133041365211572000204700ustar00rootroot00000000000000# =========================================================================== # SYNOPSIS # # AX_NAGIOS_GET_INIT # # DESCRIPTION # # This macro determines the O/S distribution of the computer it is run on. # $init_type will be set and will be one of: # unknown (could not be determined) # launchd (Mac OS X) # bsd (Slackware Linux) # newbsd (FreeBSD, OpenBSD, NetBSD, Dragonfly, etc) # smf10 (Solaris) # smf11 (Solaris) # systemd (Linux SystemD) # gentoo (Older Gentoo) # openrc (Recent Gentoo and some others) # upstart (Older Debian) # sysv (The rest) # # LICENSE # # Copyright (c) 2016 Nagios Core Development Team # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. # =========================================================================== AU_ALIAS([AC_NAGIOS_GET_INIT], [AX_NAGIOS_GET_INIT]) AC_DEFUN([AX_NAGIOS_GET_INIT], [ AC_SUBST(init_type) # # Get user hints for possible cross-compile # AC_MSG_CHECKING(what init system is being used ) AC_ARG_WITH(init_type,AC_HELP_STRING([--with-init-type=type], [specify init type (bsd, sysv, systemd, launchd, smf10, smf11, upstart, openrc, etc.)]), [ # # Run this if --with was specified # if test "x$withval" = x -o x$withval = xno; then init_type_wanted=yes else init_type_wanted=no init_type="$withval" AC_MSG_RESULT($init_type) fi ], [ # # Run this if --with was not specified # init_type_wanted=yes ]) if test x$init_type = xno; then init_type_wanted=yes elif test x$init_type = xyes; then AC_MSG_ERROR([you must enter an init type if '--with-init-type' is specified]) fi # # Determine init type if it wasn't supplied # if test $init_type_wanted = yes; then init_type="" if test x"$opsys" = x; then init_type="unknown" init_type_wanted=no elif test x"$dist_type" = x; then init_type="unknown" init_type_wanted=no elif test "$opsys" = "osx"; then init_type="launchd" init_type_wanted=no elif test "$opsys" = "bsd"; then init_type="newbsd" init_type_wanted=no elif test "$dist_type" = "solaris"; then if test -d "/lib/svc/manifest"; then init_type="smf11" init_type_wanted=no elif test -d "/lib/svc/monitor"; then init_type="smf10" init_type_wanted=no else init_type="sysv" init_type_wanted=no fi elif test "$dist_type" = "slackware"; then init_type="bsd" init_type_wanted=no elif test "$dist_type" = "aix"; then init_type="bsd" init_type_wanted=no elif test "$dist_type" = "hp-ux"; then init_type="unknown" init_type_wanted=no fi fi PSCMD="ps -p1 -o args" if test $dist_type = solaris; then PSCMD="env UNIX95=1; ps -p1 -o args" fi if test "$init_type_wanted" = yes; then pid1=`$PSCMD | grep -vi COMMAND | cut -d' ' -f1` if test x"$pid1" = "x"; then init_type="unknown" init_type_wanted=no fi if `echo $pid1 | grep "systemd" > /dev/null`; then init_type="systemd" init_type_wanted=no fi if test "$init_type_wanted" = yes; then if test "$pid1" = "init"; then if test -e "/sbin/init"; then pid1="/sbin/init"; elif test -e "/usr/sbin/init"; then pid1="/usr/sbin/init" else init_type="unknown" init_type_wanted=no fi fi if test -L "$pid1"; then pid1=`readlink "$pid1"` fi fi if test "$init_type_wanted" = yes; then if `echo $pid1 | grep "systemd" > /dev/null`; then init_type="systemd" init_type_wanted=no elif test -f "/sbin/rc"; then if test -f /sbin/runscript; then init_type_wanted=no if `/sbin/start-stop-daemon -V | grep "OpenRC" > /dev/null`; then init_type="openrc" else init_type="gentoo" fi fi fi fi if test "$init_type_wanted" = yes; then if test "$pid1" = "/sbin/init" -o "$pid1" = "/usr/sbin/init"; then if `$pid1 --version 2>/dev/null | grep "upstart" >/dev/null`; then init_type="upstart" init_type_wanted=no elif test -f "/etc/rc" -a ! -L "/etc/rc"; then init_type="newbsd" init_type_wanted=no else init_type="sysv" init_type_wanted=no fi fi fi if test "$init_type_wanted" = yes; then init_type="unknown" fi fi AC_MSG_RESULT($init_type) ]) nrpe-nrpe-4.0.3/macros/ax_nagios_get_os000066400000000000000000000061451365211572000201530ustar00rootroot00000000000000# =========================================================================== # SYNOPSIS # # AX_NAGIOS_GET_OS # # DESCRIPTION # # This macro determines the operating system of the computer it is run on. # # LICENSE # # Copyright (c) 2016 Nagios Core Development Team # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. # =========================================================================== AU_ALIAS([AC_NAGIOS_GET_OS], [AX_NAGIOS_GET_OS]) AC_DEFUN([AX_NAGIOS_GET_OS], [ AC_SUBST(opsys) AC_SUBST(arch) # # Get user hints # AC_MSG_CHECKING(what the operating system is ) AC_ARG_WITH(opsys, AC_HELP_STRING([--with-opsys=OS], [specify operating system (linux, osx, bsd, solaris, irix, cygwin, aix, hp-ux, etc.)]), [ # # Run this if --with was specified # if test "x$withval" = x -o x$withval = xno; then opsys_wanted=yes else opsys_wanted=no opsys="$withval" AC_MSG_RESULT($opsys) fi ], [ # # Run this if --with was not specified # opsys_wanted=yes ]) if test x$opsys = xno; then opsys="" opsys_wanted=yes elif test x$opsys = xyes; then AC_MSG_ERROR([you must enter an O/S type if '--with-opsys' is specified]) fi # # Determine operating system if it wasn't supplied # if test $opsys_wanted=yes; then opsys=`uname -s | tr ["[A-Z]" "[a-z]"]` if test x"$opsys" = "x"; then opsys="unknown"; fi AS_CASE([$opsys], [darwin*], opsys="osx", [*bsd*], opsys="bsd", [dragonfly], opsys="bsd", [sunos], opsys="solaris", [gnu/hurd], opsys="linux", [irix*], opsys="irix", [cygwin*], opsys="cygwin", [mingw*], opsys="mingw", [msys*], opsys="msys") fi arch=`uname -m | tr ["[A-Z]" "[a-z]"]` AC_MSG_RESULT($opsys) ]) nrpe-nrpe-4.0.3/macros/ax_nagios_get_paths000066400000000000000000000475431365211572000206600ustar00rootroot00000000000000# =========================================================================== # SYNOPSIS # # AX_NAGIOS_GET_PATHS # # DESCRIPTION # # This macro figures out the installation & run paths for various systems # The argument are: # the O/S determined by the AX_NAGIOS_GET_OS macro. # the distribution type as determined by AX_NAGIOS_GET_DISTRIB_TYPE # the init type as determined by AX_NAGIOS_GET_INIT # the inetd type as determined by AX_NAGIOS_GET_INETD # # LICENSE # # Copyright (c) 2016 Nagios Core Development Team # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. # =========================================================================== AU_ALIAS([AC_NAGIOS_GET_PATHS], [AX_NAGIOS_GET_PATHS]) AC_DEFUN([AX_NAGIOS_GET_PATHS], [ AC_SUBST(pkgsysconfdir) AC_SUBST(objsysconfdir) AC_SUBST(sbindir) AC_SUBST(initname) AC_SUBST(inetdname) AC_SUBST(pluginsdir) AC_SUBST(brokersdir) AC_SUBST(cgibindir) AC_SUBST(webdir) AC_SUBST(privatesysconfdir) AC_SUBST(pkglocalstatedir) AC_SUBST(logdir) AC_SUBST(piddir) AC_SUBST(pipedir) AC_SUBST(spooldir) AC_SUBST(initdir) AC_SUBST(inetddir) AC_SUBST(tmpfilesd) AC_SUBST(subsyslockdir) AC_SUBST(subsyslockfile) if test x$DBG_PATHS != x; then echo echo Incoming paths: echo " prefix $prefix" echo " exec_prefix $exec_prefix" echo " bindir $bindir" echo " sbindir $sbindir" echo " libexecdir $libexecdir" echo " sysconfdir $sysconfdir" echo " localstatedir $localstatedir" echo " datarootdir $datarootdir" echo " datadir $datadir" echo " localedir $localedir" echo fi AC_MSG_CHECKING(for which paths to use ) AC_ARG_ENABLE(install_method, AC_HELP_STRING([--enable-install-method=], [sets the install method to use: 'default' (the default) will install to /usr/local/nagios, 'os' will try to determine which method to use based on OS type and distribution. Fine tuning using the '--bindir', etc. overrides above will still work]), install_method=$enableval, install_method=default ) AC_ARG_ENABLE(showdirs_only, AC_HELP_STRING([--enable-showdirs-only=yes], [This option will cause 'configure' to stop after determining the install locations based on '--enable-install-method', so you can see the destinations before a full './configure', 'make', 'make install' process.]), showdirs_only=$enableval, showdirs_only=no ) AS_CASE([$install_method], [yes], install_method="os", [no], install_method="default", [default|os], :, [*], echo >&6; AC_MSG_ERROR(['--enable-install-method=$install_method' is invalid]) ) if test $showdirs_only != "no"; then showdirs_only="yes"; fi AS_CASE([$dist_type], [*solaris*|*hp-ux*|*aix*|*osx*], opsys=unix) # Does this package need to know: need_cgi=no # where the cgi-bin directory is need_web=no # where the website directory is need_brk=no # where the event broker modules directory is need_plg=no # where the plugins directory is need_pipe=no # where the pipe directory is need_spl=no # where the spool directory is need_loc=no # where the locale directory is need_log_subdir=no # where the loc sub-directory is need_etc_subdir=no # where the etc sub-directory is need_pls_dir=no # where the package locate state directory is if test x"$INIT_PROG" = x; then INIT_PROG="$PKG_NAME" fi AS_CASE([$PKG_NAME], [nagios], need_log_subdir=yes need_etc_subdir=yes need_pls_dir=yes need_brk=yes need_pipe=yes need_spl=yes need_loc=yes need_cgi=yes need_web=yes, [ndoutils], need_brk=yes need_spl=yes, [nrpe], need_plg=yes, [nsca], need_cgi=no, [plugins], need_loc=yes need_plg=yes ) AC_ARG_WITH(pkgsysconfdir, AC_HELP_STRING([--with-pkgsysconfdir=DIR], [where configuration files should be placed]), if test x$withval != x -a x$withval != xno -a x$withval != xyes; then pkgsysconfdir="$withval" fi) AC_ARG_WITH(objsysconfdir, AC_HELP_STRING([--with-objsysconfdir=DIR], [where object configuration files should be placed]), if test x$withval != x -a x$withval != xno -a x$withval != xyes; then objsysconfdir="$withval" fi) AC_ARG_WITH(privatesysconfdir, AC_HELP_STRING([--with-privatesysconfdir=DIR], [where private configuration files should be placed]), if test x$withval != x -a x$withval != xno -a x$withval != xyes; then privatesysconfdir="$withval" fi) AC_ARG_WITH(webdir, AC_HELP_STRING([--with-webdir=DIR], [where the website files should be placed]), if test x$withval != x -a x$withval != xno -a x$withval != xyes; then webdir="$withval" fi) AC_ARG_WITH(pluginsdir, AC_HELP_STRING([--with-pluginsdir=DIR], [where the plugins should be placed]), if test x$withval != x -a x$withval != xno -a x$withval != xyes; then pluginsdir="$withval" fi) AC_ARG_WITH(brokersdir, AC_HELP_STRING([--with-brokersdir=DIR], [where the broker modules should be placed]), if test x$withval != x -a x$withval != xno -a x$withval != xyes; then brokersdir="$withval" fi) AC_ARG_WITH(cgibindir, AC_HELP_STRING([--with-cgibindir=DIR], [where the CGI programs should be placed]), if test x$withval != x -a x$withval != xno -a x$withval != xyes; then cgibindir="$withval" fi) AC_ARG_WITH(logdir, AC_HELP_STRING([--with-logdir=DIR], [where log files should be placed]), if test x$withval != x -a x$withval != xno -a x$withval != xyes; then logdir="$withval" fi) AC_ARG_WITH(piddir, AC_HELP_STRING([--with-piddir=DIR], [where the PID file should be placed]), if test x$withval != x -a x$withval != xno -a x$withval != xyes; then piddir="$withval" fi) AC_ARG_WITH(pipedir, AC_HELP_STRING([--with-pipedir=DIR], [where socket and pipe files should be placed]), if test x$withval != x -a x$withval != xno -a x$withval != xyes; then pipedir="$withval" fi) # # Setup the base directory # if test $install_method = "default"; then if test $opsys = "unix"; then if test x"$prefix" = "xNONE"; then prefix="/usr/local/nagios"; fi else if test x"$prefix" = "xNONE"; then prefix=${ac_default_prefix}; fi fi datarootdir=${datarootdir="$prefix"} else if test x"$datadir" = x'${datarootdir}'; then AS_UNSET(datadir); fi if test x"$sysconfdir" = x'${prefix}/etc'; then AS_UNSET(sysconfdir); fi if test x"$prefix" = "xNONE"; then if test $dist_type = freebsd -o $dist_type = openbsd -o $dist_type = osx; then prefix="/usr/local" elif test $dist_type = netbsd; then prefix="/usr/pkg" else prefix="/usr" fi fi if test x"$exec_prefix" = "xNONE"; then exec_prefix=$prefix; fi if test x"$localstatedir" = x'${prefix}/var'; then if test $dist_type = "osx"; then localstatedir="/private/var" else localstatedir="/var" fi fi if test $opsys = "unix"; then if test x"$datarootdir" = x'${prefix}/share'; then if test $dist_type = "hp-ux"; then datarootdir="/usr/local/share" if test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir="/usr/nagios" fi elif test $dist_type = "osx"; then datarootdir="/usr/local/share" if test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir="/usr/local/nagios" fi elif test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir="/usr/lib/nagios" fi fi if test $dist_type = "osx"; then if test x"$sbindir" = x'${exec_prefix}/sbin'; then sbindir="$libexecdir" fi if test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir="/usr/local/libexec/nagios" fi fi elif test $opsys = "bsd"; then if test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir=${exec_prefix}/libexec/nagios; fi elif test x"$libexecdir" = x'${exec_prefix}/lib'; then libexecdir=${libexecdir}/nagios; elif test x"$libexecdir" = x'${exec_prefix}/libexec'; then libexecdir=${exec_prefix}/lib/nagios; fi fi if test x"$exec_prefix" = "xNONE"; then exec_prefix=${prefix}; fi tmpfilesd=${tmpfilesd="/usr/lib/tmpfiles.d"} if test ! -d "$tmpfilesd"; then tmpfilesd="N/A" else tmpfilesd="$tmpfilesd/$INIT_PROG.conf" fi subsyslockdir=${subsyslockdir="/var/lock/subsys"} if test ! -d "$subsyslockdir"; then subsyslockdir="N/A" subsyslockfile="N/A" else subsyslockfile="$subsyslockdir/$INIT_PROG" fi if test "$need_loc" = no; then localedir="N/A" fi if test $install_method = "default" ; then # # Do the default setup # sbindir=${bindir} datadir=${datadir="$datarootdir"} if test $need_web = yes; then webdir=${webdir="$datadir"} else webdir="N/A" fi if test $opsys = "unix"; then sysconfdir=${sysconfdir="/etc/opt"} fi pkgsysconfdir=${pkgsysconfdir="$sysconfdir"} if test $need_etc_subdir = yes; then objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"} else objsysconfdir="N/A" fi privatesysconfdir=${privatesysconfdir="$pkgsysconfdir"} logdir=${logdir="$localstatedir"} piddir=${piddir="$localstatedir"} if test "$need_pipe" = yes; then pipedir=${pipedir="$localstatedir/rw"} else pipedir="N/A" fi if test "$need_pls_dir" = yes; then pkglocalstatedir=${pkglocalstatedir="$localstatedir"} else pkglocalstatedir="N/A" fi if test "$need_spl" = yes; then spooldir=${spooldir="$localstatedir/var"} else spooldir="N/A" fi if test $need_brk = yes; then brokersdir=${brokersdir="$bindir"} else brokersdir="N/A" fi if test $need_plg = yes; then pluginsdir=${pluginsdir="$libexecdir"} else pluginsdir="N/A" fi if test $need_cgi = yes; then cgibindir=${cgibindir="$prefix/sbin"} else cgibindir="N/A" fi elif test $opsys = "linux"; then # # Linux "Standard" install # install_method="$install_method : FHS" datadir=${datadir="$datarootdir/nagios"} if test $need_web = yes; then webdir=${webdir="$datadir/html"} else webdir="N/A" fi sysconfdir=${sysconfdir="/etc"} pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"} if test $need_etc_subdir = yes; then objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"} else objsysconfdir="N/A" fi privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"} if test $need_log_subdir = yes; then logdir=${logdir="$localstatedir/log/$INIT_PROG"} else logdir=${logdir="$localstatedir/log"} fi piddir=${piddir="$localstatedir/run/${INIT_PROG}"} if test "$need_pipe" = yes; then pipedir=${pipedir="$localstatedir/run/${INIT_PROG}"} else pipedir="N/A" fi if test "$need_pls_dir" = yes; then pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$INIT_PROG"} else pkglocalstatedir="N/A" fi if test "$need_spl" = yes; then spooldir=${spooldir="$localstatedir/spool/$INIT_PROG"} else spooldir="N/A" fi if test $need_brk = yes; then brokersdir=${brokersdir="$libexecdir/brokers"} else brokersdir="N/A" fi if test $need_plg = yes; then pluginsdir=${pluginsdir="$libexecdir/plugins"} else pluginsdir="N/A" fi if test $need_cgi = yes; then cgibindir=${cgibindir="$libexecdir/cgi-bin"} else cgibindir="N/A" fi elif test $opsys = "unix"; then # # "Standard" Unix install # install_method="$install_method : Unix Standard" if test $dist_type = osx; then install_method="$install_method : OS X Standard" sbindir=${sbindir="/usr/local/libexec"} fi datadir=${datadir="$datarootdir/nagios"} if test $need_web = yes; then webdir=${webdir="$datadir/html"} else webdir="N/A" fi if test $dist_type = osx; then sysconfdir=${sysconfdir="/private/etc"} else sysconfdir=${sysconfdir="/etc"} fi pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"} if test $need_etc_subdir = yes; then objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"} else objsysconfdir="N/A" fi privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"} if test "$need_pls_dir" = yes; then pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$INIT_PROG"} else pkglocalstatedir="N/A" fi if test "$need_loc" = yes; then localedir=${localedir="/usr/local/share/locale//LC_MESSAGES/nagios-plugins.mo"} fi if test "$need_spl" = yes; then spooldir=${spooldir="$localstatedir/spool/$INIT_PROG"} else spooldir="N/A" fi if test $need_brk = yes; then brokersdir=${brokersdir="$libexecdir/brokers"} else brokersdir="N/A" fi if test $need_plg = yes; then pluginsdir=${pluginsdir="$libexecdir/plugins"} else pluginsdir="N/A" fi if test $need_cgi = yes; then cgibindir=${cgibindir="$libexecdir/cgi-bin"} else cgibindir="N/A" fi AS_CASE([$dist_type], [*hp-ux*], piddir=${piddir="$pkgsysconfdir"} pipedir=${pipedir="$pkglocalstatedir"} logdir=${logdir="$pkglocalstatedir/log"}, [*], piddir=${piddir="$localstatedir/run/${INIT_PROG}"} if test "$need_pipe" = yes; then pipedir=${pipedir="$localstatedir/run/${INIT_PROG}"} else pipedir="N/A" fi if test $need_log_subdir = yes; then logdir=${logdir="$localstatedir/log/$INIT_PROG"} else logdir=${logdir="$localstatedir/log"} fi ) elif test $opsys = "bsd"; then # # "Standard" BSD install # install_method="$install_method : BSD" if test $dist_type = freebsd -o $dist_type = openbsd; then prefix=${prefix="/usr/local"} exec_prefix=${exec_prefix="/usr/local"} if test $dist_type = freebsd; then install_method="$install_method : FreeBSD" else install_method="$install_method : OpenBSD" fi elif test $dist_type = netbsd; then prefix=${prefix="/usr/pkg"} exec_prefix=${exec_prefix="/usr/pkg"} install_method="$install_method : NetBSD" fi datadir=${datadir="$datarootdir/nagios"} if test $need_web = yes -o $need_cgi = yes; then if test $dist_type = freebsd; then webdir=${webdir="$prefix/www/nagios"} elif test $dist_type = netbsd; then webdir=${webdir="$prefix/share/nagios"} elif test $dist_type = openbsd; then webdir=${webdir="/var/www/nagios"} fi else webdir="N/A" fi if test $dist_type = freebsd; then sysconfdir=${sysconfdir="/usr/local/etc"} else sysconfdir=${sysconfdir="/etc"} fi pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"} if test $need_etc_subdir = yes; then objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"} else objsysconfdir="N/A" fi privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"} if test "$need_pls_dir" = yes; then pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$INIT_PROG"} else pkglocalstatedir="N/A" fi if test "$need_loc" = yes; then localedir=${localedir="/usr/local/share/locale//LC_MESSAGES/nagios-plugins.mo"} fi if test "$need_spl" = yes; then spooldir=${spooldir="$localstatedir/spool/$INIT_PROG"} else spooldir="N/A" fi if test $need_brk = yes; then brokersdir=${brokersdir="$libexecdir/brokers"} else brokersdir="N/A" fi if test $need_plg = yes; then pluginsdir=${pluginsdir="$libexecdir/plugins"} else pluginsdir="N/A" fi if test $need_cgi = yes; then if test $dist_type = freebsd; then cgibindir=${cgibindir="$webdir/cgi-bin"} elif test $dist_type = netbsd; then cgibindir=${pluginsdir="$libexecdir/cgi-bin"} elif test $dist_type = openbsd; then cgibindir=${pluginsdir="/var/www/cgi-bin/nagios"} fi else cgibindir="N/A" fi piddir=${piddir="$localstatedir/run/${INIT_PROG}"} if test "$need_pipe" = yes; then pipedir=${pipedir="$localstatedir/run/${INIT_PROG}"} else pipedir="N/A" fi if test $need_log_subdir = yes; then logdir=${logdir="$localstatedir/log/$INIT_PROG"} else logdir=${logdir="$localstatedir/log"} fi else # # Unknown install # install_method="unknown" webdir=unknown pkgsysconfdir=unknown objsysconfdir=unknown privatesysconfdir=unknown logdir=unknown piddir=unknown pipedir=unknown pkglocalstatedir=unknown spooldir=unknown brokersdir=unknown pluginsdir=unknown cgibindir=unknown fi eval prefix=$prefix eval exec_prefix=$exec_prefix eval bindir=$bindir eval sbindir=$sbindir eval datarootdir=$datarootdir eval datadir=$datadir eval libexecdir=$libexecdir eval brokersdir=$brokersdir eval pluginsdir=$pluginsdir eval cgibindir=$cgibindir eval localstatedir=$localstatedir eval pkglocalstatedir=$pkglocalstatedir eval webdir=$webdir eval localedir=$localedir eval sysconfdir=$sysconfdir eval pkgsysconfdir=$pkgsysconfdir eval logdir=$logdir eval piddir=$piddir # # Init scripts/files # AS_CASE([$init_type], [sysv], if test $dist_type = "hp-ux"; then initdir=${initdir="/sbin/init.d"} else initdir=${initdir="/etc/init.d"} fi initname=${initname="$INIT_PROG"} initconfdir=${initconfdir="/etc/conf.d"} initconf=${initconf="$initconfdir/$INIT_PROG"}, [systemd], if test $dist_type = "debian"; then initdir=${initdir="/lib/systemd/system"} else initdir=${initdir="/usr/lib/systemd/system"} fi initname=${initname="$INIT_PROG.service"}, [bsd], if test $dist_type = "aix"; then initdir=${initdir="/sbin/rc.d/init.d"} initname=${initname="$INIT_PROG"} else initdir=${initdir="/etc/rc.d"} initname=${initname="rc.$INIT_PROG"} fi, [newbsd], initdir=${initdir="/etc/rc.d"} initname=${initname="$INIT_PROG"}, [gentoo], initdir=${initdir="/etc/init.d"} initname=${initname="$INIT_PROG"} initconfdir=${initconfdir="/etc/init.d"} initconf=${initconf="$initconfdir/$INIT_PROG"}, [openrc], initdir=${initdir="/etc/init.d"} initname=${initname="$INIT_PROG"} initconfdir=${initconfdir="/etc/conf.d"} initconf=${initconf="$initconfdir/$INIT_PROG"}, [smf*], if test $init_type = smf10; then initdir=${initdir="/var/svc/manifest/network/nagios"} else initdir=${initdir="/lib/svc/manifest/network/nagios"} fi initname=${initname="$INIT_PROG.xml"} initconfdir=unknown initconf=unknown, [upstart], initdir=${initdir="/etc/init"} initname=${initname="$INIT_PROG.conf"} initconfdir=${initconfdir="/etc/default"} initconf=${initconf="$initconfdir/$INIT_PROG"}, [launchd], initdir=${initdir="/Library/LaunchDaemons"} initname=${initname="org.nagios.$INIT_PROG.plist"}, # initconfdir=${initconfdir="/private/etc"} # initconf=${initconf="$initconfdir/$INIT_PROG"}, [*], initdir=unknown initname=unknown) # # Inetd (per connection) scripts/files # AS_CASE([$inetd_type], [inetd*], inetddir=${inetddir="/etc"} inetdname=${inetdname="inetd.conf"}, [xinetd], inetddir=${inetddir="/etc/xinetd.d"} inetdname=${inetdname="$INIT_PROG"}, [systemd], if test $dist_type = "debian"; then inetddir=${inetddir="/lib/systemd/system"} else inetddir=${inetddir="/usr/lib/systemd/system"} fi netdname=${inetdname="$INIT_PROG.socket"}, [smf*], if test $init_type = smf10; then inetddir=${inetddir="/var/svc/manifest/network/nagios"} else inetddir=${inetddir="/lib/svc/manifest/network/nagios"} fi inetdname=${inetdname="$INIT_PROG.xml"}, # [upstart], # inetddir=${inetddir="/etc/init.d"} # inetdname=${inetdname="$INIT_PROG"}, [launchd], inetddir=${inetddir="/Library/LaunchDaemons"} inetdname=${inetdname="org.nagios.$INIT_PROG.plist"}, [*], inetddir=${inetddir="unknown"} inetdname=${inetdname="unknown"}) AC_MSG_RESULT($install_method) ]) nrpe-nrpe-4.0.3/macros/ax_nagios_get_ssl000066400000000000000000000220331365211572000203250ustar00rootroot00000000000000# =========================================================================== # SYNOPSIS # # AX_NAGIOS_GET_SSL # # DESCRIPTION # # This macro finds the openssl binary, the header files directory and # the library files directory. It will also search for the gnutls # compatibility library/headers and the nss compatibility library/headers. # # LICENSE # # Copyright (c) 2016 Nagios Core Development Team # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. # =========================================================================== AU_ALIAS([AC_NAGIOS_GET_SSL], [AX_NAGIOS_GET_SSL]) AC_DEFUN([AX_NAGIOS_GET_SSL], [ # ------------------------------- # SSL library and include paths # ------------------------------- SSL_TYPE=openssl try_pkg_config=1 ssl_dir= ssl_inc_dir= ssl_lib_dir= SSL_INC_DIR= SSL_INC_PREFIX= SSL_HDR= SSL_LIB_DIR= AC_SUBST(HAVE_SSL) AC_SUBST(SSL_TYPE) AC_SUBST(SSL_INC_DIR) AC_SUBST(SSL_HDR) AC_SUBST(SSL_INC_PREFIX) AC_SUBST(SSL_LIB_DIR) # gnutls/openssl.h # nss_compat_ossl/nss_compat_ossl.h dnl # Which type - openssl, gnutls-openssl, nss dnl AC_ARG_WITH([ssl-type], dnl dnl AS_HELP_STRING([--with-ssl-type=TYPE],[replace TYPE with gnutls or nss to use one of these instead of openssl]), dnl AS_HELP_STRING([--with-ssl-type=TYPE],[replace TYPE with gnutls to use that instead of openssl]), dnl [SSL_TYPE=$withval]) AC_ARG_WITH([ssl], AS_HELP_STRING([--with-ssl=DIR],[sets location of the SSL installation]), [ssl_dir=$withval]) AC_ARG_WITH([ssl-inc], AS_HELP_STRING([--with-ssl-inc=DIR], [sets location of the SSL include files]), [ssl_inc_dir=$withval]) AC_ARG_WITH([ssl-lib], AS_HELP_STRING([--with-ssl-lib=DIR],[sets location of the SSL libraries]), [ssl_lib_dir=$withval]) if test x$ssl_inc_dir != x -o x$ssl_lib_dir != x; then try_pkg_config=0 fi AC_ARG_WITH([kerberos-inc], AS_HELP_STRING([--with-kerberos-inc=DIR], [sets location of the Kerberos include files]), [kerberos_inc_dir=$withval]) if test x$SSL_TYPE = xyes; then SSL_TYPE=openssl fi dflt_hdrs="$ssl_inc_dir $ssl_dir $ssl_inc_dir/include $ssl_dir/include \ /usr/local/opt/{BBB} /usr/include/{BBB} /usr/local/include/{BBB} \ /usr/local/{AAA} /usr/local/{BBB} /usr/lib/{AAA} /usr/lib/{BBB} \ /usr/{AAA} /usr/pkg /usr/local /usr /usr/freeware/lib/{BBB} \ /usr/sfw /usr/sfw/include /opt/{BBB}" dflt_libs="$ssl_lib_dir {ssldir} {ssldir}/lib {ssldir}/lib64 /usr/lib64 \ /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu \ /usr/local/lib /usr/lib/{AAA} /usr/{AAA}/lib /usr/{BBB}/lib \ /usr/pkg/lib /usr/freeware/lib/{BBB} /usr/sfw/lib /opt/freeware/lib \ /opt/{BBB}/lib/hpux64 /opt/{BBB}/lib/pa20_64 /opt/{BBB}/lib/hpux32 \ /opt/{BBB}/lib /opt/{BBB}"; AS_CASE([$SSL_TYPE], [no], [SSL_TYPE=NONE], [yes|openssl], [ssl_hdr_dirs=`echo "$dflt_hdrs" | sed -e 's/{AAA}/ssl/g' | sed -e 's/{BBB}/openssl/g'` ssl_lib_dirs=`echo "$dflt_libs" | sed -e 's/{AAA}/ssl/g' | sed -e 's/{BBB}/openssl/g'` SSL_INC_PREFIX=openssl SSL_HDR=ssl.h ssl_lib=libssl], [gnutls], [ssl_hdr_dirs=`echo "$dflt_hdrs" | sed -e 's/{AAA}/gnutls/g' | sed -e 's/{BBB}/gnutls/g'` ssl_lib_dirs=`echo "$dflt_libs" | sed -e 's/{AAA}/gnutls/g' | sed -e 's/{BBB}/gnutls/g'` SSL_INC_PREFIX=gnutls SSL_TYPE=gnutls_compat SSL_HDR=compat.h ssl_lib=libgnutls], [nss], [ssl_hdr_dirs=`echo "$dflt_hdrs" | sed -e 's/{AAA}/nss_compat_ossl/g' | sed -e 's/{BBB}/nss_compat_ossl/g'` ssl_lib_dirs=`echo "$dflt_libs" | sed -e 's/{AAA}/nss_compat_ossl/g' | sed -e 's/{BBB}/nss_compat_ossl/g'` SSL_HDR=nss_compat_ossl.h ssl_lib=libnss_compat], [*], echo >&6; AC_MSG_ERROR(['--with-ssl-type=$SSL_TYPE' is invalid]) ) # Check for SSL support if test x$SSL_TYPE != xNONE; then found_ssl=no # RedHat 8.0 and 9.0 include openssl compiled with kerberos, # so we must include header file # Must come before openssl checks for Redhat EL 3 AC_MSG_CHECKING(for Kerberos include files) found_kerberos=no for dir in $kerberos_inc_dir /usr/kerberos/include /usr/include/krb5 \ /usr/include; do kerbdir="$dir" if test -f "$dir/krb5.h"; then found_kerberos=yes CFLAGS="$CFLAGS -I$kerbdir" AC_DEFINE_UNQUOTED(HAVE_KRB5_H,[1],[Have the krb5.h header file]) break fi done if test x_$found_kerberos != x_yes; then AC_MSG_WARN(could not find include files) else AC_MSG_RESULT(found Kerberos include files in $kerbdir) fi # First, try using pkg_config AC_CHECK_TOOL([PKG_CONFIG], [pkg-config]) if test x"$PKG_CONFIG" != x -a $try_pkg_config -ne 0 ; then cflags=`$PKG_CONFIG $SSL_TYPE --cflags-only-I 2>/dev/null` if test $? -eq 0; then CFLAGS="$CFLAGS $cflags" LDFLAGS="$LDFLAGS `$PKG_CONFIG $SSL_TYPE --libs-only-L 2>/dev/null`" LIBS="$LIBS `$PKG_CONFIG $SSL_TYPE --libs-only-l 2>/dev/null`" found_ssl=yes AC_DEFINE_UNQUOTED(HAVE_SSL,[1],[Have SSL support]) fi fi if test x_$found_ssl != x_yes; then # Find the SSL Headers AC_MSG_CHECKING(for SSL headers) for dir in $ssl_hdr_dirs; do if test "$dir" = "/include"; then continue fi ssldir="$dir" if test -f "$dir/include/$SSL_INC_PREFIX/$SSL_HDR"; then found_ssl=yes CFLAGS="$CFLAGS -I$dir/include/$SSL_INC_PREFIX -I$ssldir/include" SSL_INC_DIR="$dir/include/$SSL_INC_PREFIX" break fi if test -f "$dir/include/$SSL_HDR"; then found_ssl=yes if test "$SSL_HDR" != compat.h ; then SSL_INC_PREFIX="" fi CFLAGS="$CFLAGS -I$dir/include" SSL_INC_DIR="$dir/include" break fi if test -f "$dir/$SSL_HDR"; then found_ssl=yes SSL_INC_PREFIX="" CFLAGS="$CFLAGS -I$dir" SSL_INC_DIR="$dir" break fi if test -f "$dir/$SSL_INC_PREFIX/$SSL_HDR"; then found_ssl=yes CFLAGS="$CFLAGS -I$dir/$SSL_INC_PREFIX" SSL_INC_DIR="$dir/$SSL_INC_PREFIX" ssldir="$dir/.." break fi done if test x_$found_ssl != x_yes; then AC_MSG_ERROR(Cannot find ssl headers) else AC_MSG_RESULT(found in $ssldir) # Now try and find SSL libraries AC_MSG_CHECKING(for SSL libraries) found_ssl=no ssl_lib_dirs=`echo "$ssl_lib_dirs" | sed -e "s|{ssldir}|$ssldir|g"` if test "`uname -s`" = "Darwin" ; then soext="dylib" elif test "`uname -s`" = "HP-UX" ; then if test x$arch = "xia64"; then soext="so" else soext="sl" fi elif test "`uname -s`" = "AIX" ; then soext="a" else soext="so" fi for dir in $ssl_lib_dirs; do if test -f "$dir/$ssl_lib.$soext"; then found_ssl=yes SSL_LIB_DIR="$dir" break fi done if test x_$found_ssl != x_yes; then AC_MSG_ERROR(Cannot find ssl libraries) else AC_MSG_RESULT(found in $SSL_LIB_DIR) LDFLAGS="$LDFLAGS -L$SSL_LIB_DIR"; LIBS="$LIBS -l`echo $ssl_lib | sed -e 's/^lib//'` -lcrypto"; AC_DEFINE_UNQUOTED(HAVE_SSL,[1],[Have SSL support]) fi fi fi if test x$found_ssl = xyes ; then if test -n "$SSL_INC_PREFIX" ; then SSL_INC_PREFIX="${SSL_INC_PREFIX}/" fi # try to compile and link to see if SSL is set up properly AC_MSG_CHECKING([whether compiling and linking against SSL works]) AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include <${SSL_INC_PREFIX}${SSL_HDR}>], [SSL_new(NULL)])], [ AC_MSG_RESULT([yes]) $1 ], [ AC_MSG_ERROR([no]) $2 ]) fi if test x$found_ssl = xyes -a x$need_dh = xyes; then # Find the openssl program if test x$need_dh = xyes; then AC_PATH_PROG(sslbin,openssl,value-if-not-found,$ssl_dir/sbin$PATH_SEPARATOR$ssl_dir/bin$PATH_SEPARATOR$PATH) AC_DEFINE(USE_SSL_DH) # Generate DH parameters if test -f "$sslbin"; then echo "" echo "*** Generating DH Parameters for SSL/TLS ***" # awk to strip off meta data at bottom of dhparam output $sslbin dhparam -C 2048 | awk '/^-----/ {exit} {print}' > include/dh.h fi fi fi fi ]) nrpe-nrpe-4.0.3/nrpe.spec.in000066400000000000000000000133751365211572000156640ustar00rootroot00000000000000%define isaix %(test "`uname -s`" = "AIX" && echo "1" || echo "0") %define islinux %(test "`uname -s`" = "Linux" && echo "1" || echo "0") %if %{isaix} %define _prefix /opt/nagios %define _docdir %{_prefix}/doc/@PACKAGE_NAME@-@PACKAGE_VERSION@ %define nshome /opt/nagios %define _make gmake %endif %if %{islinux} %define _init_dir @initdir@ %define _init_type @init_type@ %define _exec_prefix %{_prefix}/sbin %define _bindir %{_prefix}/sbin %define _sbindir %{_prefix}/lib/nagios/cgi %define _libexecdir %{_prefix}/lib/nagios/plugins %define _datadir %{_prefix}/share/nagios %define _localstatedir /var/log/nagios %define nshome /var/log/nagios %define _make make %endif %define _sysconfdir /etc/nagios %define name @PACKAGE_NAME@ %define version 4.0.3 %define release @RPM_RELEASE@ %define nsusr @nrpe_user@ %define nsgrp @nrpe_group@ %define nsport @nrpe_port@ %define ns_src_tmpfile "@src_tmpfile@" # Reserve option to override port setting with: # rpm -ba|--rebuild --define 'nsport 5666' %{?port:%define nsport %{port}} # Macro that print messages to syslog at package (un)install time %define nnmmsg logger -t %{name}/rpm Summary: Host/service/network monitoring agent for Nagios URL: http://www.nagios.org Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Application/System Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-buildroot Prefix: %{_prefix} Prefix: @initdir@ Prefix: /etc/nagios %if %{isaix} Requires: nagios-plugins %endif %if %{islinux} Requires: bash, grep, nagios-plugins, util-linux, chkconfig, shadow-utils, sed, initscripts, mktemp %endif %description NPRE (Nagios Remote Plugin Executor) is a system daemon that will execute various Nagios plugins locally on behalf of a remote (monitoring) host that uses the check_nrpe plugin. Various plugins that can be executed by the daemon are available at: http://sourceforge.net/projects/nagiosplug This package provides the client-side NRPE agent (daemon). %package plugin Group: Application/System Summary: Provides nrpe plugin for Nagios. Requires: nagios-plugins %description plugin NPRE (Nagios Remote Plugin Executor) is a system daemon that will execute various Nagios plugins locally on behalf of a remote (monitoring) host that uses the check_nrpe plugin. Various plugins that can be executed by the daemon are available at: http://sourceforge.net/projects/nagiosplug This package provides the server-side NRPE plugin for Nagios-related applications. %prep %setup -q %if %{isaix} # Check to see if the nrpe service is running and, if so, stop it. /usr/bin/lssrc -s nrpe > /dev/null 2> /dev/null if [ $? -eq 0 ] ; then status=`/usr/bin/lssrc -s nrpe | /usr/bin/gawk '$1=="nrpe" {print $NF}'` if [ "$status" = "active" ] ; then /usr/bin/stopsrc -s nrpe fi fi %endif %if %{isaix} %post /usr/bin/lssrc -s nrpe > /dev/null 2> /dev/null if [ $? -eq 1 ] ; then /usr/bin/mkssys -p %{_bindir}/nrpe -s nrpe -u 0 -a "-c %{_sysconfdir}/nrpe.cfg -d -s" -Q -R -S -n 15 -f 9 fi /usr/bin/startsrc -s nrpe %endif %preun %if %{isaix} status=`/usr/bin/lssrc -s nrpe | /usr/bin/gawk '$1=="nrpe" {print $NF}'` if [ "$status" = "active" ] ; then /usr/bin/stopsrc -s nrpe fi /usr/bin/rmssys -s nrpe %endif %if %{islinux} if [ "$1" = 0 ]; then /sbin/service nrpe stop > /dev/null 2>&1 /sbin/chkconfig --del nrpe fi %endif %if %{islinux} %postun if [ "$1" -ge "1" ]; then /sbin/service nrpe condrestart >/dev/null 2>&1 || : fi %endif %build export PATH=$PATH:/usr/sbin CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \ MAKE=%{_make} ./configure \ --with-init-type=%{_init_type} \ --with-nrpe-port=%{nsport} \ --with-nrpe-user=%{nsusr} \ --with-nrpe-group=%{nsgrp} \ --prefix=%{_prefix} \ --exec-prefix=%{_exec_prefix} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --libexecdir=%{_libexecdir} \ --datadir=%{_datadir} \ --sysconfdir=%{_sysconfdir} \ --localstatedir=%{_localstatedir} \ --enable-command-args %{_make} all %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %if %{islinux} install -d -m 0755 ${RPM_BUILD_ROOT}%{_init_dir} %endif DESTDIR=${RPM_BUILD_ROOT} %{_make} install-groups-users install install-config install-init %clean rm -rf $RPM_BUILD_ROOT %files %if %{islinux} %defattr(755,root,root) @initdir@/@initname@ %endif %{_bindir}/nrpe %dir %{_sysconfdir} %defattr(600,%{nsusr},%{nsgrp}) %config(noreplace) %{_sysconfdir}/*.cfg %defattr(755,%{nsusr},%{nsgrp}) %if %{ns_src_tmpfile} != "" @tmpfilesd@ %endif %{_bindir}/nrpe-uninstall %doc CHANGELOG.md LEGAL README.md README.SSL.md SECURITY.md %files plugin %defattr(755,%{nsusr},%{nsgrp}) %{_libexecdir} %defattr(644,%{nsusr},%{nsgrp}) %doc CHANGELOG.md LEGAL README.md %changelog * Thu Aug 18 2016 John Frickson jfrickson<@>nagios.com - Changed 'make install-daemon-config' to 'make install-config' - Added make targets 'install-groups-users' and 'install-init' - Misc. changes * Mon Mar 12 2012 Eric Stanley estanley<@>nagios.com - Created autoconf input file - Updated to support building on AIX - Updated install to use make install* * Mon Jan 23 2006 Andreas Kasenides ank<@>cs.ucy.ac.cy - fixed nrpe.cfg relocation to sample-config - replaced Copyright label with License - added --enable-command-args to enable remote arg passing (if desired can be disabled by commenting out) * Wed Nov 12 2003 Ingimar Robertsson - Added adding of nagios group if it does not exist. * Tue Jan 07 2003 James 'Showkilr' Peterson - Removed the lines which removed the nagios user and group from the system - changed the patch release version from 3 to 1 * Mon Jan 06 2003 James 'Showkilr' Peterson - Removed patch files required for nrpe 1.5 - Update spec file for version 1.6 (1.6-1) * Sat Dec 28 2002 James 'Showkilr' Peterson - First RPM build (1.5-1) nrpe-nrpe-4.0.3/paths.in000077500000000000000000000062601365211572000151040ustar00rootroot00000000000000#!/bin/sh wrout () { if test "$2" != "N/A"; then printf " %-25s %s\n" "$1" "$2"; fi } echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "Detected Environment:" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" wrout "Operating System" "@opsys@" wrout "Architecture" "@arch@" wrout "Distribution type" "@dist_type@ Version @dist_ver@" wrout "Init type" "@init_type@" wrout "Inetd type" "@inetd_type@" echo echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "Paths are:" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" wrout "prefix" "@prefix@" wrout "exec_prefix" "@prefix@" if test "@PKG_NAME@" = "nagios"; then wrout "bindir" "@bindir@" fi wrout "sbindir" "@sbindir@" wrout "sysconfdir" "@sysconfdir@" wrout "pkgsysconfdir" "@pkgsysconfdir@" if test "@PKG_NAME@" = "nagios"; then wrout "privatesysconfdir" "@privatesysconfdir@" fi wrout "localstatedir" "@localstatedir@" wrout "pkglocalstatedir" "@pkglocalstatedir@" wrout "datarootdir" "@datarootdir@" wrout "datadir" "@datadir@" wrout "webdir" "@webdir@" wrout "localedir" "@localedir@" wrout "logdir" "@logdir@" wrout "piddir" "@piddir@" wrout "pipedir" "@pipedir@" wrout "spooldir" "@spooldir@" wrout "libexecdir" "@libexecdir@" wrout "brokersdir" "@brokersdir@" wrout "pluginsdir" "@pluginsdir@" wrout "cgibindir" "@cgibindir@" wrout "initdir" "@initdir@" wrout "inetddir" "@inetddir@" wrout "subsyslockdir" "@subsyslockdir@" echo echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo '@PKG_NAME@ files will be installed or created as follows:' echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" wrout "Config file" "@pkgsysconfdir@/@PKG_NAME@.cfg" wrout "Object config dir" "@objsysconfdir@" wrout "daemon" "@sbindir@/@PKG_NAME@" if test "@PKG_NAME@" = "nrpe"; then wrout "check_@PKG_NAME@" "@pluginsdir@/check_@PKG_NAME@" fi if test "@PKG_NAME@" = "nagios"; then wrout "nagiostats (prog)" "@bindir@/nagiostats" wrout "Website password file" "@pkgsysconfdir@/passwd" wrout "resource.cfg" "@privatesysconfdir@/resource.cfg" wrout "event handlers dir" "@brokersdir@" wrout "cgi program dir" "@cgibindir@" wrout "website file dir" "@webdir@" wrout "status.dat" "@pkglocalstatedir@/status.dat" wrout "retention.dat" "@pkglocalstatedir@/retention.dat" wrout "object cache dir" "@pkglocalstatedir@" wrout "log file" "@logdir@/@PKG_NAME@.log" wrout "log archive dir" "@logdir@/archives" wrout "@PKG_NAME@.configtest" "@logdir@/@PKG_NAME@.configtest" wrout "@PKG_NAME@.cmd" "@pipedir@/@PKG_NAME@.cmd" wrout "@PKG_NAME@.qh" "@pipedir@/@PKG_NAME@.qh" wrout "perfdata file dir" "@spooldir@" wrout "checkresult files" "@spooldir@/checkresults" else wrout "inetd config" "@inetddir@/@inetdname@" fi wrout "init script" "@initdir@/@initname@" wrout "@PKG_NAME@.conf (tmpfiles.d)" "@tmpfilesd@" wrout "@PKG_NAME@ lock file" "@piddir@/@PKG_NAME@.pid" wrout "language files" "@localedir@" wrout "init lock file" "@subsyslockfile@" wrout "init source file" "@src_init@" wrout "inetd source file" "@src_inetd@" echo echo "To show this list again, type './paths' at the prompt" nrpe-nrpe-4.0.3/sample-config/000077500000000000000000000000001365211572000161525ustar00rootroot00000000000000nrpe-nrpe-4.0.3/sample-config/nrpe.cfg.in000066400000000000000000000303071365211572000202070ustar00rootroot00000000000000############################################################################# # # Sample NRPE Config File # # Notes: # # This is a sample configuration file for the NRPE daemon. It needs to be # located on the remote host that is running the NRPE daemon, not the host # from which the check_nrpe client is being executed. # ############################################################################# # LOG FACILITY # The syslog facility that should be used for logging purposes. log_facility=@log_facility@ # LOG FILE # If a log file is specified in this option, nrpe will write to # that file instead of using syslog. #log_file=@logdir@/nrpe.log # DEBUGGING OPTION # This option determines whether or not debugging messages are logged to the # syslog facility. # Values: 0=debugging off, 1=debugging on debug=0 # PID FILE # The name of the file in which the NRPE daemon should write it's process ID # number. The file is only written if the NRPE daemon is started by the root # user and is running in standalone mode. pid_file=@piddir@/nrpe.pid # PORT NUMBER # Port number we should wait for connections on. # NOTE: This must be a non-privileged port (i.e. > 1024). # NOTE: This option is ignored if NRPE is running under either inetd or xinetd server_port=@nrpe_port@ # SERVER ADDRESS # Address that nrpe should bind to in case there are more than one interface # and you do not want nrpe to bind on all interfaces. # NOTE: This option is ignored if NRPE is running under either inetd or xinetd #server_address=127.0.0.1 # LISTEN QUEUE SIZE # Listen queue size (backlog) for serving incoming connections. # You may want to increase this value under high load. #listen_queue_size=5 # NRPE USER # This determines the effective user that the NRPE daemon should run as. # You can either supply a username or a UID. # # NOTE: This option is ignored if NRPE is running under either inetd or xinetd nrpe_user=@nrpe_user@ # NRPE GROUP # This determines the effective group that the NRPE daemon should run as. # You can either supply a group name or a GID. # # NOTE: This option is ignored if NRPE is running under either inetd or xinetd nrpe_group=@nrpe_group@ # ALLOWED HOST ADDRESSES # This is an optional comma-delimited list of IP address or hostnames # that are allowed to talk to the NRPE daemon. Network addresses with a bit mask # (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently # supported. # # Note: The daemon only does rudimentary checking of the client's IP # address. I would highly recommend adding entries in your /etc/hosts.allow # file to allow only the specified host to connect to the port # you are running this daemon on. # # NOTE: This option is ignored if NRPE is running under either inetd or xinetd allowed_hosts=127.0.0.1,::1 # COMMAND ARGUMENT PROCESSING # This option determines whether or not the NRPE daemon will allow clients # to specify arguments to commands that are executed. This option only works # if the daemon was configured with the --enable-command-args configure script # option. # # *** ENABLING THIS OPTION IS A SECURITY RISK! *** # Read the SECURITY file for information on some of the security implications # of enabling this variable. # # Values: 0=do not allow arguments, 1=allow command arguments dont_blame_nrpe=0 # BASH COMMAND SUBSTITUTION # This option determines whether or not the NRPE daemon will allow clients # to specify arguments that contain bash command substitutions of the form # $(...). This option only works if the daemon was configured with both # the --enable-command-args and --enable-bash-command-substitution configure # script options. # # *** ENABLING THIS OPTION IS A HIGH SECURITY RISK! *** # Read the SECURITY file for information on some of the security implications # of enabling this variable. # # Values: 0=do not allow bash command substitutions, # 1=allow bash command substitutions allow_bash_command_substitution=0 # COMMAND PREFIX # This option allows you to prefix all commands with a user-defined string. # A space is automatically added between the specified prefix string and the # command line from the command definition. # # *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! *** # Usage scenario: # Execute restricted commmands using sudo. For this to work, you need to add # the nagios user to your /etc/sudoers. An example entry for allowing # execution of the plugins from might be: # # nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/ # # This lets the nagios user run all commands in that directory (and only them) # without asking for a password. If you do this, make sure you don't give # random users write access to that directory or its contents! # command_prefix=/usr/bin/sudo # MAX COMMANDS # This specifies how many children processes may be spawned at any one # time, essentially limiting the fork()s that occur. # Default (0) is set to unlimited # max_commands=0 # COMMAND TIMEOUT # This specifies the maximum number of seconds that the NRPE daemon will # allow plugins to finish executing before killing them off. command_timeout=60 # CONNECTION TIMEOUT # This specifies the maximum number of seconds that the NRPE daemon will # wait for a connection to be established before exiting. This is sometimes # seen where a network problem stops the SSL being established even though # all network sessions are connected. This causes the nrpe daemons to # accumulate, eating system resources. Do not set this too low. connection_timeout=300 # WEAK RANDOM SEED OPTION # This directive allows you to use SSL even if your system does not have # a /dev/random or /dev/urandom (on purpose or because the necessary patches # were not applied). The random number generator will be seeded from a file # which is either a file pointed to by the environment valiable $RANDFILE # or $HOME/.rnd. If neither exists, the pseudo random number generator will # be initialized and a warning will be issued. # Values: 0=only seed from /dev/[u]random, 1=also seed from weak randomness #allow_weak_random_seed=1 # SSL/TLS OPTIONS # These directives allow you to specify how to use SSL/TLS. # SSL VERSION # This can be any of: SSLv2 (only use SSLv2), SSLv2+ (use any version), # SSLv3 (only use SSLv3), SSLv3+ (use SSLv3 or above), TLSv1 (only use # TLSv1), TLSv1+ (use TLSv1 or above), TLSv1.1 (only use TLSv1.1), # TLSv1.1+ (use TLSv1.1 or above), TLSv1.2 (only use TLSv1.2), # TLSv1.2+ (use TLSv1.2 or above) # If an "or above" version is used, the best will be negotiated. So if both # ends are able to do TLSv1.2 and use specify SSLv2, you will get TLSv1.2. # If you are using openssl 1.1.0 or above, the SSLv2 options are not available. #ssl_version=SSLv2+ # SSL USE ADH # This is for backward compatibility and is DEPRECATED. Set to 1 to enable # ADH or 2 to require ADH. 1 is currently the default but will be changed # in a later version. #ssl_use_adh=1 # SSL CIPHER LIST # This lists which ciphers can be used. For backward compatibility, this # defaults to 'ssl_cipher_list=ALL:!MD5:@STRENGTH' for < OpenSSL 1.1.0, # and 'ssl_cipher_list=ALL:!MD5:@STRENGTH:@SECLEVEL=0' for OpenSSL 1.1.0 and # greater. #ssl_cipher_list=ALL:!MD5:@STRENGTH #ssl_cipher_list=ALL:!MD5:@STRENGTH:@SECLEVEL=0 #ssl_cipher_list=ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!RC4:!MD5:@STRENGTH # SSL Certificate and Private Key Files #ssl_cacert_file=/etc/ssl/servercerts/ca-cert.pem #ssl_cert_file=/etc/ssl/servercerts/nagios-cert.pem #ssl_privatekey_file=/etc/ssl/servercerts/nagios-key.pem # SSL USE CLIENT CERTS # This options determines client certificate usage. # Values: 0 = Don't ask for or require client certificates (default) # 1 = Ask for client certificates # 2 = Require client certificates #ssl_client_certs=0 # SSL LOGGING # This option determines which SSL messages are send to syslog. OR values # together to specify multiple options. # Values: 0x00 (0) = No additional logging (default) # 0x01 (1) = Log startup SSL/TLS parameters # 0x02 (2) = Log remote IP address # 0x04 (4) = Log SSL/TLS version of connections # 0x08 (8) = Log which cipher is being used for the connection # 0x10 (16) = Log if client has a certificate # 0x20 (32) = Log details of client's certificate if it has one # -1 or 0xff or 0x2f = All of the above #ssl_logging=0x00 # NASTY METACHARACTERS # This option allows you to override the list of characters that cannot # be passed to the NRPE daemon. # nasty_metachars="|`&><'\\[]{};\r\n" # This option allows you to enable or disable logging error messages to the syslog facilities. # If this option is not set, the error messages will be logged. disable_syslog=0 # COMMAND DEFINITIONS # Command definitions that this daemon will run. Definitions # are in the following format: # # command[]= # # When the daemon receives a request to return the results of # it will execute the command specified by the argument. # # Unlike Nagios, the command line cannot contain macros - it must be # typed exactly as it should be executed. # # Note: Any plugins that are used in the command lines must reside # on the machine that this daemon is running on! The examples below # assume that you have plugins installed in a /usr/local/nagios/libexec # directory. Also note that you will have to modify the definitions below # to match the argument format the plugins expect. Remember, these are # examples only! # The following examples use hardcoded command arguments... # This is by far the most secure method of using NRPE command[check_users]=@pluginsdir@/check_users -w 5 -c 10 command[check_load]=@pluginsdir@/check_load -r -w .15,.10,.05 -c .30,.25,.20 command[check_hda1]=@pluginsdir@/check_disk -w 20% -c 10% -p /dev/hda1 command[check_zombie_procs]=@pluginsdir@/check_procs -w 5 -c 10 -s Z command[check_total_procs]=@pluginsdir@/check_procs -w 150 -c 200 # The following examples allow user-supplied arguments and can # only be used if the NRPE daemon was compiled with support for # command arguments *AND* the dont_blame_nrpe directive in this # config file is set to '1'. This poses a potential security risk, so # make sure you read the SECURITY file before doing this. ### MISC SYSTEM METRICS ### #command[check_users]=@pluginsdir@/check_users $ARG1$ #command[check_load]=@pluginsdir@/check_load $ARG1$ #command[check_disk]=@pluginsdir@/check_disk $ARG1$ #command[check_swap]=@pluginsdir@/check_swap $ARG1$ #command[check_cpu_stats]=@pluginsdir@/check_cpu_stats.sh $ARG1$ #command[check_mem]=@pluginsdir@/custom_check_mem -n $ARG1$ ### GENERIC SERVICES ### #command[check_init_service]=sudo @pluginsdir@/check_init_service $ARG1$ #command[check_services]=@pluginsdir@/check_services -p $ARG1$ ### SYSTEM UPDATES ### #command[check_yum]=@pluginsdir@/check_yum #command[check_apt]=@pluginsdir@/check_apt ### PROCESSES ### #command[check_all_procs]=@pluginsdir@/custom_check_procs #command[check_procs]=@pluginsdir@/check_procs $ARG1$ ### OPEN FILES ### #command[check_open_files]=@pluginsdir@/check_open_files.pl $ARG1$ ### NETWORK CONNECTIONS ### #command[check_netstat]=@pluginsdir@/check_netstat.pl -p $ARG1$ $ARG2$ ### ASTERISK ### #command[check_asterisk]=@pluginsdir@/check_asterisk.pl $ARG1$ #command[check_sip]=@pluginsdir@/check_sip $ARG1$ #command[check_asterisk_sip_peers]=sudo @pluginsdir@/check_asterisk_sip_peers.sh $ARG1$ #command[check_asterisk_version]=@pluginsdir@/nagisk.pl -c version #command[check_asterisk_peers]=@pluginsdir@/nagisk.pl -c peers #command[check_asterisk_channels]=@pluginsdir@/nagisk.pl -c channels #command[check_asterisk_zaptel]=@pluginsdir@/nagisk.pl -c zaptel #command[check_asterisk_span]=@pluginsdir@/nagisk.pl -c span -s 1 # INCLUDE CONFIG FILE # This directive allows you to include definitions from an external config file. #include= # INCLUDE CONFIG DIRECTORY # This directive allows you to include definitions from config files (with a # .cfg extension) in one or more directories (with recursion). #include_dir= #include_dir= # KEEP ENVIRONMENT VARIABLES # This directive allows you to retain specific variables from the environment # when starting the NRPE daemon. #keep_env_vars=NRPE_MULTILINESUPPORT,NRPE_PROGRAMVERSION nrpe-nrpe-4.0.3/src/000077500000000000000000000000001365211572000142155ustar00rootroot00000000000000nrpe-nrpe-4.0.3/src/Makefile.in000066400000000000000000000047661365211572000162770ustar00rootroot00000000000000############################### # # NRPE Makefile # ############################### srcdir=@srcdir@ # Source code directories SRC_INCLUDE=@srcdir@/../include CFG_INCLUDE=../include # Mainly used for rpmbuild # DESTDIR= CC=@CC@ CFLAGS=@CFLAGS@ @DEFS@ -I $(CFG_INCLUDE) -I $(SRC_INCLUDE) LDFLAGS=@LDFLAGS@ @LIBS@ SOCKETLIBS=@SOCKETLIBS@ LIBWRAPLIBS=@LIBWRAPLIBS@ OTHERLIBS=@OTHERLIBS@ CP=@CP@ prefix=$(DESTDIR)@prefix@ exec_prefix=$(DESTDIR)@exec_prefix@ CFGDIR=$(DESTDIR)@pkgsysconfdir@ BINDIR=$(DESTDIR)@bindir@ SBINDIR=$(DESTDIR)@sbindir@ LIBEXECDIR=$(DESTDIR)@libexecdir@ INSTALL=@INSTALL@ NAGIOS_INSTALL_OPTS=@NAGIOS_INSTALL_OPTS@ NRPE_INSTALL_OPTS=@NRPE_INSTALL_OPTS@ PLUGINSDIR=$(DESTDIR)@pluginsdir@ PIDDIR=$(DESTDIR)@piddir@ TMPFILESDIR=$(DESTDIR)@tmpfilesd@ SRC_TMPFILE=@src_tmpfile@ # Generated automatically from configure script SNPRINTF_O=@SNPRINTF_O@ all: nrpe check_nrpe nrpe: $(srcdir)/nrpe.c $(srcdir)/utils.c $(srcdir)/acl.c $(SRC_INCLUDE)/nrpe.h $(SRC_INCLUDE)/utils.h $(SRC_INCLUDE)/common.h $(CFG_INCLUDE)/config.h $(SRC_INCLUDE)/acl.h $(SNPRINTF_O) $(CC) $(CFLAGS) -o $@ $(srcdir)/nrpe.c $(srcdir)/utils.c $(srcdir)/acl.c $(LDFLAGS) $(SOCKETLIBS) $(LIBWRAPLIBS) $(SNPRINTF_O) $(OTHERLIBS) check_nrpe: $(srcdir)/check_nrpe.c $(srcdir)/utils.c $(SRC_INCLUDE)/utils.h $(SRC_INCLUDE)/common.h $(CFG_INCLUDE)/config.h $(CC) $(CFLAGS) -o $@ $(srcdir)/check_nrpe.c $(srcdir)/utils.c $(LDFLAGS) $(SOCKETLIBS) $(SNPRINTF_O) $(OTHERLIBS) install: $(MAKE) install-plugin $(MAKE) install-daemon install-plugin: install-uninstall $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(LIBEXECDIR) $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) -d $(PLUGINSDIR) $(INSTALL) -m 775 $(NAGIOS_INSTALL_OPTS) check_nrpe $(PLUGINSDIR) install-daemon: install-uninstall $(INSTALL) -m 755 nrpe $(SBINDIR) @if test ! -d "$(PIDDIR)" ; then \ echo $(INSTALL) -m 755 $(NRPE_INSTALL_OPTS) -d $(PIDDIR); \ $(INSTALL) -m 755 $(NRPE_INSTALL_OPTS) -d $(PIDDIR); \ fi @if test "$(TMPFILESDIR)" != "N/A" -a x$(SRC_TMPFILE) != x ; then \ echo $(INSTALL) -m 755 -d `dirname $(TMPFILESDIR)`; \ $(INSTALL) -m 755 -d `dirname $(TMPFILESDIR)`; \ echo $(INSTALL) -m 644 ../startup/$(SRC_TMPFILE) $(TMPFILESDIR); \ $(INSTALL) -m 644 ../startup/$(SRC_TMPFILE) $(TMPFILESDIR); \ fi install-uninstall: $(INSTALL) -m 755 -d $(SBINDIR) $(INSTALL) -m 755 ../uninstall $(SBINDIR)/nrpe-uninstall clean: rm -f core nrpe check_nrpe $(SNPRINTF_O) rm -f *~ */*~ rm -rf nrpe.dSYM check_nrpe.dSYM distclean: clean rm -f Makefile devclean: distclean nrpe-nrpe-4.0.3/src/acl.c000066400000000000000000000513561365211572000151320ustar00rootroot00000000000000/**************************************************************************** * * acl.c - a small library for nrpe.c. It adds IPv4 subnets support to ACL in nrpe. * * License: GPLv2 * Copyright (c) 2011 Kaspersky Lab ZAO * * Description: * * acl.c creates two linked lists. One is for IPv4 hosts and networks, another * is for domain names. All connecting hosts (if allowed_hosts is defined) * are checked in these two lists. * * Note: * Only ANCII names are supported in ACL. * * License Notice: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ****************************************************************************/ #include "../include/config.h" #include "../include/common.h" #include "../include/utils.h" #include #include #include #include #include #include #include #include #include #include #include "../include/acl.h" extern int debug; /* This function checks if a char argument from valid char range. * Valid range is: ASCII only, a number or a letter, a space, a dot, a slash, a dash, a comma. * * Returns: * 0 - char isn't from valid group * 1 - char is a number * 2 - char is a letter * 3 - char is a space(' ') * 4 - char is a dot('.') * 5 - char is a slash('/') * 6 - char is a dash('-') * 7 - char is a comma(',') */ int isvalidchar(int c) { if (!isascii(c)) return 0; if (isdigit(c)) return 1; if (isalpha(c)) return 2; if (isspace(c)) return 3; switch (c) { case '.': return 4; case '/': return 5; case '-': return 6; case ',': return 7; default: return 0; } } /* * Get substring from allowed_hosts from s position to e position. */ char * acl_substring(char *string, int s, int e) { char *substring; int len = e - s; if (len < 0) return NULL; if ( (substring = malloc(len + 1)) == NULL) return NULL; memmove(substring, string + s, len + 1); return substring; } /* * Add IPv4 host or network to IP ACL. IPv4 format is X.X.X.X[/X]. * Host will be added to ACL only if it has passed IPv4 format check. * * Returns: * 1 - on success * 0 - on failure * * States for IPv4 format check: * 0 - numbers(-> 1), dot(-> -1), slash(-> -1), other(-> -1) * 1 - numbers(-> 1), dot(-> 2), slash(-> -1), other(-> -1) * 2 - numbers(-> 3), dot(-> -1), slash(-> -1), other(-> -1) * 3 - numbers(-> 3), dot(-> 4), slash(-> -1), other(-> -1) * 4 - numbers(-> 5), dot(-> -1), slash(-> -1), other(-> -1) * 5 - numbers(-> 5), dot(-> 6), slash(-> -1), other(-> -1) * 6 - numbers(-> 7), dot(-> -1), slash(-> -1), other(-> -1) * 7 - numbers(-> 7), dor(-> -1), slash(-> 8), other(-> -1) * 8 - numbers(-> 9), dor(-> -1), slash(-> -1), other(-> -1) * 9 - numbers(-> 9), dot(-> -1), slash(-> -1), other(-> -1) * * Good states are 7(IPv4 host) and 9(IPv4 network) */ int add_ipv4_to_acl(char *ipv4) { int state = 0; int octet = 0; int index = 0; /* position in data array */ int data[5]; /* array to store ip octets and mask */ int len = strlen(ipv4); int i, c; unsigned long ip, mask; struct ip_acl *ip_acl_curr; if(debug == TRUE) logit(LOG_INFO, "add_ipv4_to_acl: checking ip-address >%s<", ipv4); /* Check for min and max IPv4 valid length */ if (len < 7 || len > 18) { logit(LOG_INFO, "add_ipv4_to_acl: Error, ip-address >%s< incorrect length", ipv4); return 0; } /* default mask for ipv4 */ data[4] = 32; /* Basic IPv4 format check */ for (i = 0; i < len; i++) { /* Return 0 on error state */ if (state == -1) { if(debug == TRUE) logit(LOG_INFO, "add_ipv4_to_acl: Error, ip-address >%s< incorrect " "format, continue with next check ...", ipv4); return 0; } c = ipv4[i]; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': octet = octet * 10 + CHAR_TO_NUMBER(c); switch (state) { case 0: case 2: case 4: case 6: case 8: state++; break; } break; case '.': switch (state) { case 1: case 3: case 5: data[index++] = octet; octet = 0; state++; break; default: state = -1; } break; case '/': switch (state) { case 7: data[index++] = octet; octet = 0; state++; break; default: state = -1; } break; default: state = -1; } } /* Exit state handling */ switch (state) { case 7: case 9: data[index] = octet; break; default: /* Bad states */ logit(LOG_INFO, "add_ipv4_to_acl: Error, ip-address >%s< bad state", ipv4); return 0; } /* * Final IPv4 format check. */ for (i=0; i < 4; i++) { if (data[i] < 0 || data[i] > 255) { logit(LOG_ERR,"Invalid IPv4 address/network format(%s) in allowed_hosts option\n",ipv4); return 0; } } if (data[4] < 0 || data[4] > 32) { logit(LOG_ERR,"Invalid IPv4 network mask format(%s) in allowed_hosts option\n",ipv4); return 0; } /* Convert ip and mask to unsigned long */ ip = htonl((data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3]); mask = htonl(-1 << (32 - data[4])); /* Wrong network address */ if ( (ip & mask) != ip) { logit(LOG_ERR,"IP address and mask do not match in %s\n",ipv4); return 0; } /* Add addr to ip_acl list */ if ( (ip_acl_curr = malloc(sizeof(*ip_acl_curr))) == NULL) { logit(LOG_ERR,"Can't allocate memory for ACL, malloc error\n"); return 0; } /* Save result in ACL ip list */ ip_acl_curr->family = AF_INET; ip_acl_curr->addr.s_addr = ip; ip_acl_curr->mask.s_addr = mask; ip_acl_curr->next = NULL; if (ip_acl_head == NULL) { ip_acl_head = ip_acl_curr; } else { ip_acl_prev->next = ip_acl_curr; } ip_acl_prev = ip_acl_curr; if(debug == TRUE) logit(LOG_INFO, "add_ipv4_to_acl: ip-address >%s< correct, adding.", ipv4); return 1; } /* * Add IPv6 host or network to IP ACL. Host will be added to ACL only if * it has passed IPv6 format check. * */ int add_ipv6_to_acl(char *ipv6) { char *ipv6tmp; char *addr_part, *mask_part; struct in6_addr addr; struct in6_addr mask; int maskval; int byte, bit; int nbytes = sizeof(mask.s6_addr) / sizeof(mask.s6_addr[0]); int x; struct ip_acl *ip_acl_curr; /* Save temporary copy of ipv6 so we can use the original in error messages if needed */ ipv6tmp = strdup(ipv6); if(NULL == ipv6tmp) { logit(LOG_ERR, "Memory allocation failed for copy of address: %s\n", ipv6); return 0; } addr_part = ipv6tmp; mask_part = strchr(ipv6tmp, '/'); if (mask_part) { *mask_part = '\0'; ++mask_part; } /* Parse the address itself */ if(inet_pton(AF_INET6, addr_part, &addr) <= 0) { free(ipv6tmp); return 0; } /* Check whether there is a netmask */ if (mask_part && *mask_part) { /* If so, build a netmask */ /* Get the number of bits in the mask */ maskval = atoi(mask_part); if(maskval < 0 || maskval > 128) { free(ipv6tmp); return 0; } /* Initialize to zero */ for(x = 0; x < nbytes; x++) { mask.s6_addr[x] = 0; } /* Set mask based on mask bits */ byte = 0; bit = 7; while(maskval > 0) { mask.s6_addr[byte] |= 1 << bit; bit -= 1; if(bit < 0) { bit = 7; byte++; } maskval--; } } else { /* Otherwise, this is a single address */ for(x = 0; x < nbytes; x++) { mask.s6_addr[x] = 0xFF; } } /* Add address to ip_acl list */ ip_acl_curr = malloc(sizeof(*ip_acl_curr)); if(NULL == ip_acl_curr) { logit(LOG_ERR, "Memory allocation failed for ACL: %s\n", ipv6); return 0; } /* Save result in ACL ip list */ ip_acl_curr->family = AF_INET6; for(x = 0; x < nbytes; x++) { ip_acl_curr->addr6.s6_addr[x] = addr.s6_addr[x] & mask.s6_addr[x]; ip_acl_curr->mask6.s6_addr[x] = mask.s6_addr[x]; } ip_acl_curr->next = NULL; if(NULL == ip_acl_head) { ip_acl_head = ip_acl_curr; } else { ip_acl_prev->next = ip_acl_curr; } ip_acl_prev = ip_acl_curr; free(ipv6tmp); return 1; } /* * Add domain to DNS ACL list * Domain will be added only if it has passed domain name check. * * In this case domain valid format is: * 1) Domain names must use only alphanumeric characters and dashes (-). * 2) Domain names mustn't begin or end with dashes (-). * 3) Domain names mustn't have more than 63 characters. * * Return: * 1 - for success * 0 - for failure * * 0 - alpha(-> 1), number(-> 1), dot(-> -1), dash(-> -1), all other(-> -1) * 1 - alpha(-> 1), number(-> 1), dot(-> 2), dash(-> 6), all other(-> -1) * 2 - alpha(-> 3), number(-> 1), dot(-> -1), dash(-> -1), all other(-> -1) * 3 - alpha(-> 4), number(-> 1), dot(-> 2), dash(-> 6), all other(-> -1) * 4 - alpha(-> 5), number(-> 1), dot(-> 2), dash(-> 6), all other(-> -1) * 5 - alpha(-> 1), number(-> 1), dot(-> 2), dash(-> 6), all other(-> -1) * 6 - alpha(-> 1), number(-> 1), dot(-> 2), dash(-> 6), all other(-> -1) * For real FQDN only 4 and 5 states are good for exit. * I don't check if top domain exists (com, ru and etc.) * But in real life NRPE could work in LAN, * with local domain zones like .local or with names like 'mars' added to /etc/hosts. * So 1 is good state too. And maybe this check is not necessary at all... */ int add_domain_to_acl(char *domain) { int state = 0; int len = strlen(domain); int i, c; struct dns_acl *dns_acl_curr; if (len > 63) { logit(LOG_INFO, "ADD_DOMAIN_TO_ACL: Error, did not add >%s< to acl list, too long!", domain); return 0; } for (i = 0; i < len; i++) { c = domain[i]; switch (isvalidchar(c)) { case 1: state = 1; break; case 2: switch (state) { case 0: case 1: case 5: case 6: state = 1; break; case 2: case 3: case 4: state++; break; } break; case 4: switch (state) { case 0: case 2: state = -1; break; default: state = 2; } break; case 6: switch (state) { case 0: case 2: state = -1; break; default: state = 6; } break; default: logit(LOG_INFO, "ADD_DOMAIN_TO_ACL: Error, did not add >%s< to acl list, " "invalid chars!", domain); /* Not valid chars */ return 0; } } /* Check exit code */ switch (state) { case 1: case 4: case 5: /* Add name to domain ACL list */ if ( (dns_acl_curr = malloc(sizeof(*dns_acl_curr))) == NULL) { logit(LOG_ERR,"Can't allocate memory for ACL, malloc error\n"); return 0; } strcpy(dns_acl_curr->domain, domain); dns_acl_curr->next = NULL; if (dns_acl_head == NULL) dns_acl_head = dns_acl_curr; else dns_acl_prev->next = dns_acl_curr; dns_acl_prev = dns_acl_curr; if(debug == TRUE) logit(LOG_INFO, "ADD_DOMAIN_TO_ACL: added >%s< to acl list!", domain); return 1; default: logit(LOG_INFO, "ADD_DOMAIN_TO_ACL: ERROR, did not add >%s< to acl list, " "check allowed_host in config file!", domain); return 0; } } /* Checks connection host in ACL * * Returns: * 1 - on success * 0 - on failure */ int is_an_allowed_host(int family, void *host) { struct ip_acl *ip_acl_curr = ip_acl_head; int nbytes; int x; struct dns_acl *dns_acl_curr = dns_acl_head; struct sockaddr_in *addr; struct sockaddr_in6 addr6; struct addrinfo *res, *ai; struct in_addr tmp; while (ip_acl_curr != NULL) { if(ip_acl_curr->family == family) { switch(ip_acl_curr->family) { case AF_INET: if (debug == TRUE) { tmp.s_addr = ((struct in_addr*)host)->s_addr; logit(LOG_INFO, "is_an_allowed_host (AF_INET): is host >%s< " "an allowed host >%s<\n", inet_ntoa(tmp), inet_ntoa(ip_acl_curr->addr)); } if((((struct in_addr *)host)->s_addr & ip_acl_curr->mask.s_addr) == ip_acl_curr->addr.s_addr) { if (debug == TRUE) logit(LOG_INFO, "is_an_allowed_host (AF_INET): host is in allowed host list!"); return 1; } break; case AF_INET6: nbytes = sizeof(ip_acl_curr->mask6.s6_addr) / sizeof(ip_acl_curr->mask6.s6_addr[0]); for(x = 0; x < nbytes; x++) { if((((struct in6_addr *)host)->s6_addr[x] & ip_acl_curr->mask6.s6_addr[x]) != ip_acl_curr->addr6.s6_addr[x]) { break; } } if(x == nbytes) { /* All bytes in host's address pass the netmask mask */ return 1; } break; } } ip_acl_curr = ip_acl_curr->next; } while(dns_acl_curr != NULL) { if (!getaddrinfo(dns_acl_curr->domain, NULL, NULL, &res)) { for (ai = res; ai; ai = ai->ai_next) { if (ai->ai_family == family) { switch (ai->ai_family) { case AF_INET: if (debug == TRUE) { tmp.s_addr = ((struct in_addr *) host)->s_addr; logit(LOG_INFO, "is_an_allowed_host (AF_INET): test match host >%s< " "for allowed host >%s<\n", inet_ntoa(tmp), dns_acl_curr->domain); } addr = (struct sockaddr_in *) (ai->ai_addr); if (addr->sin_addr.s_addr == ((struct in_addr *) host)->s_addr) { if (debug == TRUE) logit(LOG_INFO, "is_an_allowed_host (AF_INET): " "host is in allowed host list!"); return 1; } break; case AF_INET6: if (debug == TRUE) { char formattedStr[INET6_ADDRSTRLEN]; inet_ntop(ai->ai_family, (void *) &(((struct sockaddr_in6 *) (ai->ai_addr))->sin6_addr), formattedStr, INET6_ADDRSTRLEN); logit(LOG_INFO, "is_an_allowed_host (AF_INET6): test match host against >%s< " "for allowed host >%s<\n", formattedStr, dns_acl_curr->domain); } struct in6_addr *resolved = &(((struct sockaddr_in6 *) (ai->ai_addr))->sin6_addr); memcpy((char *) &addr6, ai->ai_addr, sizeof(addr6)); if (!memcmp(&addr6.sin6_addr, host, sizeof(addr6.sin6_addr))) { if (debug == TRUE) logit(LOG_INFO, "is_an_allowed_host (AF_INET6): " "host is in allowed host list!"); return 1; } break; } } } } dns_acl_curr = dns_acl_curr->next; } return 0; } /* The trim() function takes a source string and copies it to the destination string, * stripped of leading and training whitespace. The destination string must be * allocated at least as large as the source string. */ void trim( char *src, char *dest) { char *sptr, *dptr; for( sptr = src; isspace( *sptr) && *sptr; sptr++); /* Jump past leading spaces */ for( dptr = dest; !isspace( *sptr) && *sptr; ) { *dptr = *sptr; sptr++; dptr++; } *dptr = '\0'; return; } /* This function splits allowed_hosts to substrings with comma(,) as a delimiter. * It doesn't check validness of ACL record (add_ipv4_to_acl() and add_domain_to_acl() do), * just trims spaces from ACL records. * After this it sends ACL records to add_ipv4_to_acl() or add_domain_to_acl(). */ void parse_allowed_hosts(char *allowed_hosts) { char *hosts = strdup( allowed_hosts); /* Copy since strtok* modifies original */ char *saveptr; char *tok; const char *delim = ","; char *trimmed_tok; int add_to_acl = 0; if (debug == TRUE) logit(LOG_INFO, "parse_allowed_hosts: parsing the allowed host string >%s< to add to ACL list\n", allowed_hosts); #ifdef HAVE_STRTOK_R tok = strtok_r(hosts, delim, &saveptr); #else if (debug == TRUE) logit(LOG_INFO,"parse_allowed_hosts: using strtok, this might lead to " "problems in the allowed_hosts string determination!\n"); tok = strtok(hosts, delim); #endif while( tok) { trimmed_tok = malloc(sizeof(char) * (strlen(tok) + 1)); trim(tok, trimmed_tok); if (debug == TRUE) logit(LOG_DEBUG, "parse_allowed_hosts: ADDING this record (%s) to ACL list!\n", trimmed_tok); if (strlen(trimmed_tok) > 0) { /* lets check the type of the address before we try and add it to the acl */ if (strchr(trimmed_tok, ':') != NULL) { /* its an ipv6 address */ add_to_acl = add_ipv6_to_acl(trimmed_tok); } else { /* its either a fqdn or an ipv4 address unfortunately, i don't want to re-invent the wheel here the logic exists inside of add_ipv4_to_acl() to detect whether or not it is a ip or not */ add_to_acl = add_ipv4_to_acl(trimmed_tok); } /* but we only try to add it to a domain if the other tests have failed */ if (!add_to_acl && !add_domain_to_acl(trimmed_tok)) { logit(LOG_ERR,"Can't add to ACL this record (%s). Check allowed_hosts option!\n",trimmed_tok); } else if (debug == TRUE) logit(LOG_DEBUG,"parse_allowed_hosts: Record added to ACL list!\n"); } free( trimmed_tok); #ifdef HAVE_STRTOK_R tok = strtok_r(NULL, delim, &saveptr); #else tok = strtok(NULL, delim); #endif } free( hosts); } /* * Converts mask in unsigned long format to two digit prefix */ unsigned int prefix_from_mask(struct in_addr mask) { int prefix = 0; unsigned long bit = 1; int i; for (i = 0; i < 32; i++) { if (mask.s_addr & bit) prefix++; bit = bit << 1; } return (prefix); } /* * It shows all hosts in ACL lists */ void show_acl_lists(void) { struct ip_acl *ip_acl_curr = ip_acl_head; struct dns_acl *dns_acl_curr = dns_acl_head; logit(LOG_INFO, "Showing ACL lists for both IP and DOMAIN acl's:\n" ); while (ip_acl_curr != NULL) { logit(LOG_INFO, " IP ACL: %s/%u %u\n", inet_ntoa(ip_acl_curr->addr), prefix_from_mask(ip_acl_curr->mask), ip_acl_curr->addr.s_addr); ip_acl_curr = ip_acl_curr->next; } while (dns_acl_curr != NULL) { logit(LOG_INFO, " DNS ACL: %s\n", dns_acl_curr->domain); dns_acl_curr = dns_acl_curr->next; } } nrpe-nrpe-4.0.3/src/check_nrpe.c000066400000000000000000001440761365211572000164760ustar00rootroot00000000000000/**************************************************************************** * * check_nrpe.c - NRPE Plugin For Nagios * * License: GPLv2 * Copyright (c) 2009-2017 Nagios Enterprises * 1999-2008 Ethan Galstad (nagios@nagios.org) * * Command line: * * check_nrpe -H [-p port] [-c command] [-to to_sec] * * Description: * * This plugin will attempt to connect to the NRPE daemon on the specified * server and port. The daemon will attempt to run the command * defined as [command]. Program output and return code are sent back * from the daemon and displayed as this plugin's own * output and return code. * * License Notice: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ****************************************************************************/ #include "config.h" #include "common.h" #include "utils.h" #define DEFAULT_NRPE_COMMAND "_NRPE_CHECK" /* check version of NRPE daemon */ u_short server_port = 0; char *server_name = NULL; char *bind_address = NULL; char *config_file = NULL; #ifdef HAVE_STRUCT_SOCKADDR_STORAGE struct sockaddr_storage hostaddr; #else struct sockaddr hostaddr; #endif int address_family = AF_UNSPEC; char *command_name = NULL; int socket_timeout = DEFAULT_SOCKET_TIMEOUT; char timeout_txt[10]; int timeout_return_code = -1; int stderr_to_stdout = 0; int sd; char rem_host[MAX_HOST_ADDRESS_LENGTH]; char query[MAX_INPUT_BUFFER] = ""; int show_help = FALSE; int show_license = FALSE; int show_version = FALSE; int packet_ver = NRPE_DEFAULT_PACKET_VERSION; int force_v2_packet = 0; int force_v3_packet = 0; int payload_size = 0; extern char *log_file; #ifdef HAVE_SSL # if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux) SSL_METHOD *meth; # else const SSL_METHOD *meth; # endif SSL_CTX *ctx; SSL *ssl; int use_ssl = TRUE; unsigned long ssl_opts = SSL_OP_ALL; #else int use_ssl = FALSE; #endif /* SSL/TLS parameters */ typedef enum _SSL_VER { SSL_Ver_Invalid = 0, SSLv2 = 1, SSLv2_plus, SSLv3, SSLv3_plus, TLSv1, TLSv1_plus, TLSv1_1, TLSv1_1_plus, TLSv1_2, TLSv1_2_plus, TLSv1_3, TLSv1_3_plus } SslVer; typedef enum _CLNT_CERTS { Ask_For_Cert = 1, Require_Cert = 2 } ClntCerts; typedef enum _SSL_LOGGING { SSL_NoLogging = 0, SSL_LogStartup = 1, SSL_LogIpAddr = 2, SSL_LogVersion = 4, SSL_LogCipher = 8, SSL_LogIfClientCert = 16, SSL_LogCertDetails = 32, } SslLogging; struct _SSL_PARMS { char *cert_file; char *cacert_file; char *privatekey_file; char cipher_list[MAX_FILENAME_LENGTH]; SslVer ssl_proto_ver; int allowDH; ClntCerts client_certs; SslLogging log_opts; } sslprm = { NULL, NULL, NULL, "", SSL_Ver_Invalid, -1, 0, SSL_NoLogging}; int have_log_opts = FALSE; int process_arguments(int, char **, int); int read_config_file(char *); const char *state_text (int result); int translate_state (char *state_text); void set_timeout_state (char *state); int parse_timeout_string (char *timeout_str); void usage(int result); void setup_ssl(); void set_sig_handlers(); int connect_to_remote(); int send_request(); int read_response(); int read_packet(int sock, void *ssl_ptr, v2_packet ** v2_pkt, v3_packet ** v3_pkt); #ifdef HAVE_SSL static int verify_callback(int ok, X509_STORE_CTX * ctx); #endif void alarm_handler(int); int graceful_close(int, int); int disable_syslog = FALSE; int main(int argc, char **argv) { int16_t result; result = process_arguments(argc, argv, 0); if (result != OK || show_help == TRUE || show_license == TRUE || show_version == TRUE) usage(result); /* usage() will call exit() */ snprintf(timeout_txt, sizeof(timeout_txt), "%d", socket_timeout); if (server_port == 0) server_port = DEFAULT_SERVER_PORT; if (socket_timeout == -1) socket_timeout = DEFAULT_SOCKET_TIMEOUT; if (timeout_return_code == -1) timeout_return_code = STATE_CRITICAL; if (sslprm.cipher_list[0] == '\0') #if OPENSSL_VERSION_NUMBER >= 0x10100000 strncpy(sslprm.cipher_list, "ALL:!MD5:@STRENGTH:@SECLEVEL=0", MAX_FILENAME_LENGTH - 1); #else strncpy(sslprm.cipher_list, "ALL:!MD5:@STRENGTH", MAX_FILENAME_LENGTH - 1); #endif if (sslprm.ssl_proto_ver == SSL_Ver_Invalid) sslprm.ssl_proto_ver = TLSv1_plus; if (sslprm.allowDH == -1) sslprm.allowDH = TRUE; generate_crc32_table(); /* generate the CRC 32 table */ setup_ssl(); /* Do all the SSL/TLS set up */ set_sig_handlers(); /* initialize alarm signal handling */ result = connect_to_remote(); /* Make the connection */ if (result != STATE_OK) { alarm(0); return result; } result = send_request(); /* Send the request */ if (result != STATE_OK) return result; result = read_response(); /* Get the response */ if (result == -1) { /* Failure reading from remote, so try version 2 packet */ logit(LOG_INFO, "Remote %s does not support version 3/4 packets", rem_host); packet_ver = NRPE_PACKET_VERSION_2; /* Rerun the setup */ setup_ssl(); set_sig_handlers(); result = connect_to_remote(); /* Connect */ if (result != STATE_OK) { alarm(0); close_log_file(); /* close the log file */ return result; } result = send_request(); /* Send the request */ if (result != STATE_OK) { close_log_file(); /* close the log file */ return result; } result = read_response(); /* Get the response */ } if (result != -1 && force_v2_packet == 0 && packet_ver == NRPE_PACKET_VERSION_2) logit(LOG_DEBUG, "Remote %s accepted a version %d packet", rem_host, packet_ver); close_log_file(); /* close the log file */ return result; } /* process command line arguments */ int process_arguments(int argc, char **argv, int from_config_file) { char optchars[MAX_INPUT_BUFFER]; int argindex = 0; int c = 1; int i = 1; int has_cert = 0, has_priv_key = 0, rc; #ifdef HAVE_GETOPT_LONG int option_index = 0; static struct option long_options[] = { {"host", required_argument, 0, 'H'}, {"config-file", required_argument, 0, 'f'}, {"bind", required_argument, 0, 'b'}, {"command", required_argument, 0, 'c'}, {"args", required_argument, 0, 'a'}, {"no-ssl", no_argument, 0, 'n'}, {"unknown-timeout", no_argument, 0, 'u'}, {"v2-packets-only", no_argument, 0, '2'}, {"v3-packets-only", no_argument, 0, '3'}, {"ipv4", no_argument, 0, '4'}, {"ipv6", no_argument, 0, '6'}, {"use-adh", required_argument, 0, 'd'}, {"ssl-version", required_argument, 0, 'S'}, {"cipher-list", required_argument, 0, 'L'}, {"client-cert", required_argument, 0, 'C'}, {"key-file", required_argument, 0, 'K'}, {"ca-cert-file", required_argument, 0, 'A'}, {"ssl-logging", required_argument, 0, 's'}, {"timeout", required_argument, 0, 't'}, {"port", required_argument, 0, 'p'}, {"payload-size", required_argument, 0, 'P'}, {"log-file", required_argument, 0, 'g'}, {"help", no_argument, 0, 'h'}, {"license", no_argument, 0, 'l'}, {"version", no_argument, 0, 'V'}, {"stderr-to-stdout", no_argument, 0, 'E'}, {"disable-syslog", no_argument, 0, 'D'}, {0, 0, 0, 0} }; #endif /* no options were supplied */ if (argc < 2) return ERROR; optind = 0; snprintf(optchars, MAX_INPUT_BUFFER, "H:f:b:c:a:t:p:S:L:C:K:A:d:s:P:g:2346hlnuVED"); while (1) { if (argindex > 0) break; #ifdef HAVE_GETOPT_LONG c = getopt_long(argc, argv, optchars, long_options, &option_index); #else c = getopt(argc, argv, optchars); #endif if (c == -1 || c == EOF) break; /* process all arguments */ switch (c) { case '?': case 'h': show_help = TRUE; break; case 'b': bind_address = strdup(optarg); break; case 'f': if (from_config_file) { printf("Error: The config file should not have a config-file (-f) option.\n"); break; } config_file = strdup(optarg); break; case 'V': show_version = TRUE; break; case 'l': show_license = TRUE; break; case 't': if (from_config_file && socket_timeout != -1) { logit(LOG_WARNING, "WARNING: Command-line socket timeout overrides the config file option."); break; } socket_timeout=parse_timeout_string(optarg); if (socket_timeout <= 0) return ERROR; break; case 'p': if (from_config_file && server_port != 0) { logit(LOG_WARNING, "WARNING: Command-line server port overrides the config file option."); break; } server_port = atoi(optarg); if (server_port <= 0) return ERROR; break; case 'P': if (from_config_file && payload_size > 0) { logit(LOG_WARNING, "WARNING: Command-line payload-size (-P) overrides the config file option."); break; } payload_size = atoi(optarg); if (payload_size < 0) return ERROR; break; case 'H': if (from_config_file && server_name != NULL) { logit(LOG_WARNING, "WARNING: Command-line server name overrides the config file option."); break; } server_name = strdup(optarg); break; case 'E': if (from_config_file && stderr_to_stdout != 0) { logit(LOG_WARNING, "WARNING: Command-line stderr redirection overrides the config file option."); break; } stderr_to_stdout = 1; break; case 'c': if (from_config_file) { printf("Error: The config file should not have a command (-c) option.\n"); return ERROR; } command_name = strdup(optarg); break; case 'a': if (from_config_file) { printf("Error: The config file should not have args (-a) arguments.\n"); return ERROR; } argindex = optind; break; case 'n': use_ssl = FALSE; break; case 'u': if (from_config_file && timeout_return_code != -1) { logit(LOG_WARNING, "WARNING: Command-line unknown-timeout (-u) overrides the config file option."); break; } timeout_return_code = STATE_UNKNOWN; break; case '2': if (from_config_file && packet_ver != NRPE_DEFAULT_PACKET_VERSION) { logit(LOG_WARNING, "WARNING: Command-line v2-packets-only (-2) overrides the config file option."); break; } packet_ver = NRPE_PACKET_VERSION_2; force_v2_packet = 1; break; case '3': if (from_config_file && packet_ver != NRPE_DEFAULT_PACKET_VERSION) { logit(LOG_WARNING, "Warning: Command-line v3-packets-only (-3) overrides the config file option."); break; } packet_ver = NRPE_PACKET_VERSION_3; force_v3_packet = 1; break; case '4': if (from_config_file && address_family != AF_UNSPEC) { logit(LOG_WARNING, "WARNING: Command-line ipv4 (-4) or ipv6 (-6) overrides the config file option."); break; } address_family = AF_INET; break; case '6': if (from_config_file && address_family != AF_UNSPEC) { logit(LOG_WARNING, "WARNING: Command-line ipv4 (-4) or ipv6 (-6) overrides the config file option."); break; } address_family = AF_INET6; break; case 'd': if (from_config_file && sslprm.allowDH != -1) { logit(LOG_WARNING, "WARNING: Command-line use-adh (-d) overrides the config file option."); break; } if (!optarg || optarg[0] < '0' || optarg[0] > '2') return ERROR; sslprm.allowDH = atoi(optarg); break; case 'A': if (from_config_file && sslprm.cacert_file != NULL) { logit(LOG_WARNING, "WARNING: Command-line ca-cert-file (-A) overrides the config file option."); break; } sslprm.cacert_file = strdup(optarg); break; case 'C': if (from_config_file && sslprm.cert_file != NULL) { logit(LOG_WARNING, "WARNING: Command-line client-cert (-C) overrides the config file option."); break; } sslprm.cert_file = strdup(optarg); has_cert = 1; break; case 'K': if (from_config_file && sslprm.privatekey_file != NULL) { logit(LOG_WARNING, "WARNING: Command-line key-file (-K) overrides the config file option."); break; } sslprm.privatekey_file = strdup(optarg); has_priv_key = 1; break; case 'S': if (from_config_file && sslprm.ssl_proto_ver != SSL_Ver_Invalid) { logit(LOG_WARNING, "WARNING: Command-line ssl-version (-S) overrides the config file option."); break; } if (!strcmp(optarg, "TLSv1.3")) sslprm.ssl_proto_ver = TLSv1_3; else if (!strcmp(optarg, "TLSv1.3+")) sslprm.ssl_proto_ver = TLSv1_3_plus; else if (!strcmp(optarg, "TLSv1.2")) sslprm.ssl_proto_ver = TLSv1_2; else if (!strcmp(optarg, "TLSv1.2+")) sslprm.ssl_proto_ver = TLSv1_2_plus; else if (!strcmp(optarg, "TLSv1.1")) sslprm.ssl_proto_ver = TLSv1_1; else if (!strcmp(optarg, "TLSv1.1+")) sslprm.ssl_proto_ver = TLSv1_1_plus; else if (!strcmp(optarg, "TLSv1")) sslprm.ssl_proto_ver = TLSv1; else if (!strcmp(optarg, "TLSv1+")) sslprm.ssl_proto_ver = TLSv1_plus; else if (!strcmp(optarg, "SSLv3")) sslprm.ssl_proto_ver = SSLv3; else if (!strcmp(optarg, "SSLv3+")) sslprm.ssl_proto_ver = SSLv3_plus; #if OPENSSL_VERSION_NUMBER < 0x10100000 else if (!strcmp(optarg, "SSLv2")) sslprm.ssl_proto_ver = SSLv2; else if (!strcmp(optarg, "SSLv2+")) sslprm.ssl_proto_ver = SSLv2_plus; #endif /* OPENSSL_VERSION_NUMBER < 0x10100000 */ else return ERROR; break; case 'L': if (from_config_file && sslprm.cipher_list[0] != '\0') { logit(LOG_WARNING, "WARNING: Command-line cipher-list (-L) overrides the config file option."); break; } strncpy(sslprm.cipher_list, optarg, sizeof(sslprm.cipher_list) - 1); sslprm.cipher_list[sizeof(sslprm.cipher_list) - 1] = '\0'; break; case 's': if (from_config_file && have_log_opts == TRUE) { logit(LOG_WARNING, "WARNING: Command-line ssl-logging (-s) overrides the config file option."); break; } sslprm.log_opts = strtoul(optarg, NULL, 0); have_log_opts = TRUE; break; case 'g': if (from_config_file && log_file != NULL) { logit(LOG_WARNING, "WARNING: Command-line log-file (-g) overrides the config file option."); break; } log_file = strdup(optarg); open_log_file(); break; case 'D': disable_syslog = TRUE; break; default: return ERROR; } } /* determine (base) command query */ if (!from_config_file) { snprintf(query, sizeof(query), "%s", (command_name == NULL) ? DEFAULT_NRPE_COMMAND : command_name); query[sizeof(query) - 1] = '\x0'; } /* get the command args */ if (!from_config_file && argindex > 0) { for (c = argindex - 1; c < argc; c++) { i = sizeof(query) - strlen(query) - 2; if (i <= 0) break; strcat(query, "!"); strncat(query, argv[c], i); query[sizeof(query) - 1] = '\x0'; } } if (!from_config_file && config_file != NULL) { if ((rc = read_config_file(config_file)) != OK) return rc; } if ((has_cert && !has_priv_key) || (!has_cert && has_priv_key)) { printf("Error: the client certificate and the private key must both be given or neither\n"); return ERROR; } if (payload_size > 0 && packet_ver != NRPE_PACKET_VERSION_2) { printf("Error: if a fixed payload size is specified, '-2' must also be specified\n"); return ERROR; } if (force_v2_packet && force_v3_packet) { printf("Error: Only one of force_v2_packet (-2) and force_v3_packet (-3) can be specified.\n"); return ERROR; } /* make sure required args were supplied */ if (server_name == NULL && show_help == FALSE && show_version == FALSE && show_license == FALSE) return ERROR; return OK; } int read_config_file(char *fname) { int rc, argc = 0; FILE *f; char *buf, *bufp, **argv; char *delims = " \t\r\n"; struct stat st; size_t sz; if (stat(fname, &st)) { logit(LOG_ERR, "Error: Could not stat config file %s", fname); return ERROR; } if ((f = fopen(fname, "r")) == NULL) { logit(LOG_ERR, "Error: Could not open config file %s", fname); return ERROR; } if ((buf = (char*)calloc(1, st.st_size + 2)) == NULL) { fclose(f); logit(LOG_ERR, "Error: read_config_file fail to allocate memory"); return ERROR; } if ((sz = fread(buf, 1, st.st_size, f)) != st.st_size) { fclose(f); free(buf); logit(LOG_ERR, "Error: Failed to completely read config file %s", fname); return ERROR; } if ((argv = calloc(50, sizeof(char*))) == NULL) { fclose(f); free(buf); logit(LOG_ERR, "Error: read_config_file fail to allocate memory"); return ERROR; } argv[argc++] = "check_nrpe"; bufp = buf; while (argc < 50) { while (*bufp && strchr(delims, *bufp)) ++bufp; if (*bufp == '\0') break; argv[argc] = my_strsep(&bufp, delims); if (!argv[argc++]) break; if (!bufp) break; } fclose(f); if (argc == 50) { free(buf); free(argv); logit(LOG_ERR, "Error: too many parameters in config file %s", fname); return ERROR; } rc = process_arguments(argc, argv, 1); free(buf); free(argv); return rc; } const char *state_text (int result) { switch (result) { case STATE_OK: return "OK"; case STATE_WARNING: return "WARNING"; case STATE_CRITICAL: return "CRITICAL"; default: return "UNKNOWN"; } } int translate_state (char *state_text) { if (!strcasecmp(state_text,"OK") || !strcmp(state_text,"0")) return STATE_OK; if (!strcasecmp(state_text,"WARNING") || !strcmp(state_text,"1")) return STATE_WARNING; if (!strcasecmp(state_text,"CRITICAL") || !strcmp(state_text,"2")) return STATE_CRITICAL; if (!strcasecmp(state_text,"UNKNOWN") || !strcmp(state_text,"3")) return STATE_UNKNOWN; return ERROR; } void set_timeout_state (char *state) { if ((timeout_return_code = translate_state(state)) == ERROR) printf("Timeout state must be a valid state name (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3).\n"); } int parse_timeout_string (char *timeout_str) { char *separated_str; char *timeout_val = NULL; char *timeout_sta = NULL; if (strstr(timeout_str, ":") == NULL) timeout_val = timeout_str; else if (strncmp(timeout_str, ":", 1) == 0) { separated_str = strtok(timeout_str, ":"); if (separated_str != NULL) timeout_sta = separated_str; } else { separated_str = strtok(timeout_str, ":"); timeout_val = separated_str; separated_str = strtok(NULL, ":"); if (separated_str != NULL) { timeout_sta = separated_str; } } if ( timeout_sta != NULL ) set_timeout_state(timeout_sta); if ((timeout_val == NULL) || (timeout_val[0] == '\0')) return socket_timeout; else if (atoi(timeout_val) > 0) return atoi(timeout_val); else { printf("Timeout value must be a positive integer\n"); exit (STATE_UNKNOWN); } } void usage(int result) { if (result != OK) { printf("\n"); printf("Incorrect command line arguments supplied\n"); printf("\n"); } printf("NRPE Plugin for Nagios\n"); printf("Version: %s\n", PROGRAM_VERSION); printf("\n"); if (result != OK || show_help == TRUE) { printf("Copyright (c) 2009-2017 Nagios Enterprises\n"); printf(" 1999-2008 Ethan Galstad (nagios@nagios.org)\n"); printf("\n"); printf("Last Modified: %s\n", MODIFICATION_DATE); printf("\n"); printf("License: GPL v2 with exemptions (-l for more info)\n"); printf("\n"); #ifdef HAVE_SSL printf("SSL/TLS Available: OpenSSL 0.9.6 or higher required\n"); printf("\n"); #endif printf("Usage: check_nrpe -H [-2] [-3] [-4] [-6] [-n] [-u] [-V] [-l] [-d ]\n"); printf(" [-P ] [-S ] [-L ] [-C ]\n"); printf(" [-K ] [-A ] [-s ] [-b ]\n"); printf(" [-f ] [-p ] [-t :] [-g ]\n"); printf(" [-c ] [-E] [-D] [-a ]\n"); printf("\n"); printf("Options:\n"); printf(" -H, --host=HOST The address of the host running the NRPE daemon\n"); printf(" -2, --v2-packets-only Only use version 2 packets, not version 3/4\n"); printf(" -3, --v3-packets-only Only use version 3 packets, not version 4\n"); printf(" -4, --ipv4 Bind to ipv4 only\n"); printf(" -6, --ipv6 Bind to ipv6 only\n"); printf(" -n, --no-ssl Do no use SSL\n"); printf(" -u, --unknown-timeout Make connection problems return UNKNOWN instead of CRITICAL\n"); printf(" -V, --version Print version info and quit\n"); printf(" -l, --license Show license\n"); printf(" -E, --stderr-to-stdout Redirect stderr to stdout\n"); printf(" -d, --use-dh=DHOPT Anonymous Diffie Hellman use:\n"); printf(" 0 Don't use Anonymous Diffie Hellman\n"); printf(" (This will be the default in a future release.)\n"); printf(" 1 Allow Anonymous Diffie Hellman (default)\n"); printf(" 2 Force Anonymous Diffie Hellman\n"); printf(" -D, --disable-syslog Disable logging to syslog facilities\n"); printf(" -P, --payload-size=SIZE Specify non-default payload size for NSClient++\n"); printf(" -S, --ssl-version=VERSION The SSL/TLS version to use. Can be any one of:\n"); #if OPENSSL_VERSION_NUMBER < 0x10100000 printf(" SSLv2 SSL v2 only\n"); printf(" SSLv2+ SSL v2 or above\n"); #endif printf(" SSLv3 SSL v3 only\n"); printf(" SSLv3+ SSL v3 or above \n"); printf(" TLSv1 TLS v1 only\n"); printf(" TLSv1+ TLS v1 or above (DEFAULT)\n"); printf(" TLSv1.1 TLS v1.1 only\n"); printf(" TLSv1.1+ TLS v1.1 or above\n"); printf(" TLSv1.2 TLS v1.2 only\n"); printf(" TLSv1.2+ TLS v1.2 or above\n"); printf(" -L, --cipher-list=LIST The list of SSL ciphers to use (currently defaults\n"); #if OPENSSL_VERSION_NUMBER >= 0x10100000 printf(" to \"ALL:!MD5:@STRENGTH:@SECLEVEL=0\". THIS WILL change in a future release.)\n"); #else printf(" to \"ALL:!MD5:@STRENGTH\". THIS WILL change in a future release.)\n"); #endif printf(" -C, --client-cert=FILE The client certificate to use for PKI\n"); printf(" -K, --key-file=FILE The private key to use with the client certificate\n"); printf(" -A, --ca-cert-file=FILE The CA certificate to use for PKI\n"); printf(" -s, --ssl-logging=OPTIONS SSL Logging Options\n"); printf(" -b, --bind=IPADDR Local address to bind to\n"); printf(" -f, --config-file=FILE Configuration file to use\n"); printf(" -g, --log-file=FILE Log file to write to\n"); printf(" -p, --port=PORT The port on which the daemon is running (default=%d)\n", DEFAULT_SERVER_PORT); printf(" -c, --command=COMMAND The name of the command that the remote daemon should run\n"); printf(" -a, --args=LIST Optional arguments that should be passed to the command,\n"); printf(" separated by a space. If provided, this must be the last\n"); printf(" option supplied on the command line.\n"); printf(" -e Enable syslog debug messages.\n"); printf("\n"); printf(" NEW TIMEOUT SYNTAX\n"); printf(" -t, --timeout=INTERVAL:STATE\n"); printf(" INTERVAL Number of seconds before connection times out (default=%d)\n", DEFAULT_SOCKET_TIMEOUT); printf(" STATE Check state to exit with in the event of a timeout (default=CRITICAL)\n"); printf(" Timeout STATE must be a valid state name (case-insensitive) or integer:\n"); printf(" (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3)\n"); printf("\n"); printf("Note:\n"); printf("This plugin requires that you have the NRPE daemon running on the remote host.\n"); printf("You must also have configured the daemon to associate a specific plugin command\n"); printf("with the [command] option you are specifying here. Upon receipt of the\n"); printf("[command] argument, the NRPE daemon will run the appropriate plugin command and\n"); printf("send the plugin output and return code back to *this* plugin. This allows you\n"); printf("to execute plugins on remote hosts and 'fake' the results to make Nagios think\n"); printf("the plugin is being run locally.\n"); printf("\n"); } if (show_license == TRUE) display_license(); exit(STATE_UNKNOWN); } void setup_ssl() { #ifdef HAVE_SSL int vrfy, x; if (sslprm.log_opts & SSL_LogStartup) { char *val; logit(LOG_INFO, "SSL Certificate File: %s", sslprm.cert_file ? sslprm.cert_file : "None"); logit(LOG_INFO, "SSL Private Key File: %s", sslprm.privatekey_file ? sslprm.privatekey_file : "None"); logit(LOG_INFO, "SSL CA Certificate File: %s", sslprm.cacert_file ? sslprm.cacert_file : "None"); logit(LOG_INFO, "SSL Cipher List: %s", sslprm.cipher_list); logit(LOG_INFO, "SSL Allow ADH: %d", sslprm.allowDH); logit(LOG_INFO, "SSL Log Options: 0x%02x", sslprm.log_opts); switch (sslprm.ssl_proto_ver) { case SSLv2: val = "SSLv2"; break; case SSLv2_plus: val = "SSLv2 And Above"; break; case SSLv3: val = "SSLv3"; break; case SSLv3_plus: val = "SSLv3_plus And Above"; break; case TLSv1: val = "TLSv1"; break; case TLSv1_plus: val = "TLSv1_plus And Above"; break; case TLSv1_1: val = "TLSv1_1"; break; case TLSv1_1_plus: val = "TLSv1_1_plus And Above"; break; case TLSv1_2: val = "TLSv1_2"; break; case TLSv1_2_plus: val = "TLSv1_2_plus And Above"; break; case TLSv1_3: val = "TLSv1_3"; break; case TLSv1_3_plus: val = "TLSv1_3_plus And Above"; break; default: val = "INVALID VALUE!"; break; } logit(LOG_INFO, "SSL Version: %s", val); } /* initialize SSL */ if (use_ssl == TRUE) { SSL_load_error_strings(); SSL_library_init(); ENGINE_load_builtin_engines(); RAND_set_rand_engine(NULL); ENGINE_register_all_complete(); #if OPENSSL_VERSION_NUMBER >= 0x10100000 meth = TLS_method(); #else /* OPENSSL_VERSION_NUMBER >= 0x10100000 */ meth = SSLv23_client_method(); # ifndef OPENSSL_NO_SSL2 if (sslprm.ssl_proto_ver == SSLv2) meth = SSLv2_client_method(); # endif # ifndef OPENSSL_NO_SSL3 if (sslprm.ssl_proto_ver == SSLv3) meth = SSLv3_client_method(); # endif if (sslprm.ssl_proto_ver == TLSv1) meth = TLSv1_client_method(); # ifdef SSL_TXT_TLSV1_1 if (sslprm.ssl_proto_ver == TLSv1_1) meth = TLSv1_1_client_method(); # ifdef SSL_TXT_TLSV1_2 if (sslprm.ssl_proto_ver == TLSv1_2) meth = TLSv1_2_client_method(); # ifdef SSL_TXT_TLSV1_3 if (sslprm.ssl_proto_ver == TLSv1_3) meth = TLSv1_3_client_method(); # endif /* ifdef SSL_TXT_TLSV1_3 */ # endif /* ifdef SSL_TXT_TLSV1_2 */ # endif /* ifdef SSL_TXT_TLSV1_1 */ #endif /* OPENSSL_VERSION_NUMBER >= 0x10100000 */ if ((ctx = SSL_CTX_new(meth)) == NULL) { printf("CHECK_NRPE: Error - could not create SSL context.\n"); exit(STATE_CRITICAL); } #if OPENSSL_VERSION_NUMBER >= 0x10100000 SSL_CTX_set_max_proto_version(ctx, 0); switch(sslprm.ssl_proto_ver) { case TLSv1_3: #if OPENSSL_VERSION_NUMBER >= 0x10101000 SSL_CTX_set_max_proto_version(ctx, TLS1_3_VERSION); #endif case TLSv1_3_plus: #if OPENSSL_VERSION_NUMBER >= 0x10101000 SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION); break; #endif case TLSv1_2: SSL_CTX_set_max_proto_version(ctx, TLS1_2_VERSION); case TLSv1_2_plus: SSL_CTX_set_min_proto_version(ctx, TLS1_2_VERSION); break; case TLSv1_1: SSL_CTX_set_max_proto_version(ctx, TLS1_1_VERSION); case TLSv1_1_plus: SSL_CTX_set_min_proto_version(ctx, TLS1_1_VERSION); break; case TLSv1: SSL_CTX_set_max_proto_version(ctx, TLS1_VERSION); case TLSv1_plus: SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION); break; case SSLv3: SSL_CTX_set_max_proto_version(ctx, SSL3_VERSION); case SSLv3_plus: SSL_CTX_set_min_proto_version(ctx, SSL3_VERSION); break; } #else /* OPENSSL_VERSION_NUMBER >= 0x10100000 */ switch(sslprm.ssl_proto_ver) { case SSLv2: case SSLv2_plus: break; case TLSv1_3: case TLSv1_3_plus: #ifdef SSL_OP_NO_TLSv1_2 ssl_opts |= SSL_OP_NO_TLSv1_2; #endif case TLSv1_2: case TLSv1_2_plus: ssl_opts |= SSL_OP_NO_TLSv1_1; case TLSv1_1: case TLSv1_1_plus: ssl_opts |= SSL_OP_NO_TLSv1; case TLSv1: case TLSv1_plus: ssl_opts |= SSL_OP_NO_SSLv3; case SSLv3: case SSLv3_plus: ssl_opts |= SSL_OP_NO_SSLv2; break; } #endif /* OPENSSL_VERSION_NUMBER >= 0x10100000 */ SSL_CTX_set_options(ctx, ssl_opts); if (sslprm.cert_file != NULL && sslprm.privatekey_file != NULL) { if (!SSL_CTX_use_certificate_file(ctx, sslprm.cert_file, SSL_FILETYPE_PEM)) { printf("Error: could not use certificate file '%s'.\n", sslprm.cert_file); while ((x = ERR_get_error_line_data(NULL, NULL, NULL, NULL)) != 0) { printf("Error: could not use certificate file '%s': %s\n", sslprm.cert_file, ERR_reason_error_string(x)); } SSL_CTX_free(ctx); exit(STATE_CRITICAL); } if (!SSL_CTX_use_PrivateKey_file(ctx, sslprm.privatekey_file, SSL_FILETYPE_PEM)) { SSL_CTX_free(ctx); printf("Error: could not use private key file '%s'.\n", sslprm.privatekey_file); while ((x = ERR_get_error_line_data(NULL, NULL, NULL, NULL)) != 0) { printf("Error: could not use private key file '%s': %s\n", sslprm.privatekey_file, ERR_reason_error_string(x)); } SSL_CTX_free(ctx); exit(STATE_CRITICAL); } } if (sslprm.cacert_file != NULL) { vrfy = SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT; SSL_CTX_set_verify(ctx, vrfy, verify_callback); if (!SSL_CTX_load_verify_locations(ctx, sslprm.cacert_file, NULL)) { printf("Error: could not use CA certificate '%s'.\n", sslprm.cacert_file); while ((x = ERR_get_error_line_data(NULL, NULL, NULL, NULL)) != 0) { printf("Error: could not use CA certificate '%s': %s\n", sslprm.privatekey_file, ERR_reason_error_string(x)); } SSL_CTX_free(ctx); exit(STATE_CRITICAL); } } if (!sslprm.allowDH) { if (strlen(sslprm.cipher_list) < sizeof(sslprm.cipher_list) - 6) { strcat(sslprm.cipher_list, ":!ADH"); if (sslprm.log_opts & SSL_LogStartup) logit(LOG_INFO, "New SSL Cipher List: %s", sslprm.cipher_list); } } else { /* use anonymous DH ciphers */ if (sslprm.allowDH == 2) { #if OPENSSL_VERSION_NUMBER >= 0x10100000 strncpy(sslprm.cipher_list, "ADH@SECLEVEL=0", MAX_FILENAME_LENGTH - 1); #else strncpy(sslprm.cipher_list, "ADH", MAX_FILENAME_LENGTH - 1); #endif } } if (SSL_CTX_set_cipher_list(ctx, sslprm.cipher_list) == 0) { printf("Error: Could not set SSL/TLS cipher list: %s\n", sslprm.cipher_list); while ((x = ERR_get_error_line_data(NULL, NULL, NULL, NULL)) != 0) { printf("Could not set SSL/TLS cipher list '%s': %s\n", sslprm.cipher_list, ERR_reason_error_string(x)); } SSL_CTX_free(ctx); exit(STATE_CRITICAL); } } #endif } void set_sig_handlers() { #ifdef HAVE_SIGACTION struct sigaction sig_action; #endif #ifdef HAVE_SIGACTION sig_action.sa_sigaction = NULL; sig_action.sa_handler = alarm_handler; sigfillset(&sig_action.sa_mask); sig_action.sa_flags = SA_NODEFER | SA_RESTART; sigaction(SIGALRM, &sig_action, NULL); #else signal(SIGALRM, alarm_handler); #endif /* HAVE_SIGACTION */ /* set socket timeout */ alarm(socket_timeout); } int connect_to_remote() { struct sockaddr addr; struct in_addr *inaddr; socklen_t addrlen; int result, rc, ssl_err, ern, x, nerrs = 0; /* try to connect to the host at the given port number */ if ((sd = my_connect(server_name, &hostaddr, server_port, address_family, bind_address, stderr_to_stdout)) < 0) exit(timeout_return_code); result = STATE_OK; addrlen = sizeof(addr); rc = getpeername(sd, (struct sockaddr *)&addr, &addrlen); if (addr.sa_family == AF_INET) { struct sockaddr_in *addrin = (struct sockaddr_in *)&addr; inaddr = &addrin->sin_addr; } else { struct sockaddr_in6 *addrin = (struct sockaddr_in6 *)&addr; inaddr = (struct in_addr *)&addrin->sin6_addr; } if (inet_ntop(addr.sa_family, inaddr, rem_host, sizeof(rem_host)) == NULL) strncpy(rem_host, "Unknown", sizeof(rem_host)); rem_host[MAX_HOST_ADDRESS_LENGTH - 1] = '\0'; if ((sslprm.log_opts & SSL_LogIpAddr) != 0) logit(LOG_DEBUG, "Connected to %s", rem_host); #ifdef HAVE_SSL if (use_ssl == FALSE) return result; /* do SSL handshake */ if ((ssl = SSL_new(ctx)) == NULL) { printf("CHECK_NRPE: Error - Could not create SSL connection structure.\n"); return STATE_CRITICAL; } SSL_set_fd(ssl, sd); if ((rc = SSL_connect(ssl)) != 1) { ern = errno; ssl_err = SSL_get_error(ssl, rc); if (sslprm.log_opts & (SSL_LogCertDetails | SSL_LogIfClientCert)) { rc = 0; while ((x = ERR_get_error_line_data(NULL, NULL, NULL, NULL)) != 0) { logit(LOG_ERR, "Error: (ERR_get_error_line_data = %d), Could not complete SSL handshake with %s: %s", x, rem_host, ERR_reason_error_string(x)); ++nerrs; } if (nerrs == 0) { logit(LOG_ERR, "Error: (nerrs = 0) Could not complete SSL handshake with %s: rc=%d SSL-error=%d", rem_host, rc, ssl_err); } } else { while ((x = ERR_get_error_line_data(NULL, NULL, NULL, NULL)) != 0) { logit(LOG_ERR, "Error: (!log_opts) Could not complete SSL handshake with %s: %s", rem_host, ERR_reason_error_string(x)); ++nerrs; } if (nerrs == 0) { logit(LOG_ERR, "Error: (nerrs = 0)(!log_opts) Could not complete SSL handshake with %s: rc=%d SSL-error=%d", rem_host, rc, ssl_err); } } if (ssl_err == 5) { /* Often, errno will be zero, so print a generic message here */ if (ern == 0) printf("CHECK_NRPE: Error - Could not connect to %s. Check system logs on %s\n", rem_host, rem_host); else printf("CHECK_NRPE: Error - Could not connect to %s: %s\n", rem_host, strerror(ern)); } else { printf("CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with %s: %d\n", rem_host, ssl_err); } # ifdef DEBUG printf("SSL_connect=%d\n", rc); /* rc = SSL_get_error(ssl, rc); printf("SSL_get_error=%d\n", rc); printf("ERR_get_error=%lu\n", ERR_get_error()); printf("%s\n",ERR_error_string(rc, NULL)); */ ERR_print_errors_fp(stdout); # endif result = STATE_CRITICAL; } else { if (sslprm.log_opts & SSL_LogVersion) logit(LOG_NOTICE, "Remote %s - SSL Version: %s", rem_host, SSL_get_version(ssl)); if (sslprm.log_opts & SSL_LogCipher) { # if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux) SSL_CIPHER *c = SSL_get_current_cipher(ssl); # else const SSL_CIPHER *c = SSL_get_current_cipher(ssl); # endif logit(LOG_NOTICE, "Remote %s - %s, Cipher is %s", rem_host, SSL_CIPHER_get_version(c), SSL_CIPHER_get_name(c)); } if ((sslprm.log_opts & SSL_LogIfClientCert) || (sslprm.log_opts & SSL_LogCertDetails)) { char peer_cn[256], buffer[2048]; X509 *peer = SSL_get_peer_certificate(ssl); if (peer) { if (sslprm.log_opts & SSL_LogIfClientCert) logit(LOG_NOTICE, "SSL %s has %s certificate", rem_host, SSL_get_verify_result(ssl) == X509_V_OK ? "a valid" : "an invalid"); if (sslprm.log_opts & SSL_LogCertDetails) { X509_NAME_oneline(X509_get_subject_name(peer), buffer, sizeof(buffer)); logit(LOG_NOTICE, "SSL %s Cert Name: %s", rem_host, buffer); X509_NAME_oneline(X509_get_issuer_name(peer), buffer, sizeof(buffer)); logit(LOG_NOTICE, "SSL %s Cert Issuer: %s", rem_host, buffer); } } else logit(LOG_NOTICE, "SSL Did not get certificate from %s", rem_host); } } /* bail if we had errors */ if (result != STATE_OK) { SSL_CTX_free(ctx); close(sd); exit(result); } #endif return result; } int send_request() { v2_packet *v2_send_packet = NULL; v3_packet *v3_send_packet = NULL; u_int32_t calculated_crc32; int rc, bytes_to_send, pkt_size; char *send_pkt; if (packet_ver == NRPE_PACKET_VERSION_2) { pkt_size = sizeof(v2_packet); if (payload_size > 0) pkt_size = sizeof(v2_packet) - MAX_PACKETBUFFER_LENGTH + payload_size; v2_send_packet = (v2_packet*)calloc(1, pkt_size); send_pkt = (char *)v2_send_packet; /* fill the packet with semi-random data */ randomize_buffer((char *)v2_send_packet, pkt_size); /* initialize response packet data */ v2_send_packet->packet_version = htons(packet_ver); v2_send_packet->packet_type = htons(QUERY_PACKET); if (payload_size > 0) { strncpy(&v2_send_packet->buffer[0], query, payload_size); v2_send_packet->buffer[payload_size - 1] = '\x0'; } else { strncpy(&v2_send_packet->buffer[0], query, MAX_PACKETBUFFER_LENGTH); v2_send_packet->buffer[MAX_PACKETBUFFER_LENGTH - 1] = '\x0'; } /* calculate the crc 32 value of the packet */ v2_send_packet->crc32_value = 0; calculated_crc32 = calculate_crc32(send_pkt, pkt_size); v2_send_packet->crc32_value = htonl(calculated_crc32); } else { pkt_size = (sizeof(v3_packet) - NRPE_V4_PACKET_SIZE_OFFSET) + strlen(query) + 1; if (packet_ver == NRPE_PACKET_VERSION_3) { pkt_size = (sizeof(v3_packet) - NRPE_V3_PACKET_SIZE_OFFSET) + strlen(query) + 1; } if (pkt_size < sizeof(v2_packet)) { pkt_size = sizeof(v2_packet); } v3_send_packet = calloc(1, pkt_size); send_pkt = (char *)v3_send_packet; /* initialize response packet data */ v3_send_packet->packet_version = htons(packet_ver); v3_send_packet->packet_type = htons(QUERY_PACKET); v3_send_packet->alignment = 0; v3_send_packet->buffer_length = pkt_size - sizeof(v3_packet); v3_send_packet->buffer_length += (packet_ver == NRPE_PACKET_VERSION_4 ? NRPE_V4_PACKET_SIZE_OFFSET : NRPE_V3_PACKET_SIZE_OFFSET); v3_send_packet->buffer_length = htonl(v3_send_packet->buffer_length); strcpy(&v3_send_packet->buffer[0], query); /* calculate the crc 32 value of the packet */ v3_send_packet->crc32_value = 0; calculated_crc32 = calculate_crc32((char *)v3_send_packet, pkt_size); v3_send_packet->crc32_value = htonl(calculated_crc32); } /* send the request to the remote */ bytes_to_send = pkt_size; if (use_ssl == FALSE) rc = sendall(sd, (char *)send_pkt, &bytes_to_send); #ifdef HAVE_SSL else { rc = SSL_write(ssl, send_pkt, bytes_to_send); if (rc < 0) rc = -1; } #endif if (v3_send_packet) { free(v3_send_packet); } if (v2_send_packet) { free(v2_send_packet); } if (rc == -1) { printf("CHECK_NRPE: Error sending query to host.\n"); close(sd); return STATE_UNKNOWN; } return STATE_OK; } int read_response() { v2_packet *v2_receive_packet = NULL; /* Note: v4 packets will use the v3_packet structure */ v3_packet *v3_receive_packet = NULL; u_int32_t packet_crc32; u_int32_t calculated_crc32; int32_t pkt_size, buffer_size; int rc, result; alarm(0); set_sig_handlers(); #ifdef HAVE_SSL rc = read_packet(sd, ssl, &v2_receive_packet, &v3_receive_packet); #else rc = read_packet(sd, NULL, &v2_receive_packet, &v3_receive_packet); #endif alarm(0); /* close the connection */ #ifdef HAVE_SSL if (use_ssl == TRUE) { SSL_shutdown(ssl); SSL_free(ssl); SSL_CTX_free(ctx); } #endif graceful_close(sd, 1000); /* recv() error */ if (rc < 0) { if (v2_receive_packet) { free(v2_receive_packet); } if (v3_receive_packet) { free(v3_receive_packet); } if (packet_ver >= NRPE_PACKET_VERSION_3) { return -1; } return STATE_UNKNOWN; } else if (rc == 0) { /* server disconnected */ printf("CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.\n"); if (v3_receive_packet) { free(v3_receive_packet); } if (v2_receive_packet) { free(v2_receive_packet); } return STATE_UNKNOWN; } /* check the crc 32 value */ if (packet_ver >= NRPE_PACKET_VERSION_3) { buffer_size = ntohl(v3_receive_packet->buffer_length); if (buffer_size < 0 || buffer_size > 65536) { printf("CHECK_NRPE: Response packet had invalid buffer size.\n"); close(sd); if (v3_receive_packet) { free(v3_receive_packet); } if (v2_receive_packet) { free(v2_receive_packet); } return STATE_UNKNOWN; } pkt_size = sizeof(v3_packet); pkt_size -= (packet_ver == NRPE_PACKET_VERSION_3 ? NRPE_V3_PACKET_SIZE_OFFSET : NRPE_V4_PACKET_SIZE_OFFSET); pkt_size += buffer_size; packet_crc32 = ntohl(v3_receive_packet->crc32_value); v3_receive_packet->crc32_value = 0L; v3_receive_packet->alignment = 0; calculated_crc32 = calculate_crc32((char *)v3_receive_packet, pkt_size); } else { pkt_size = sizeof(v2_packet); if (payload_size > 0) { pkt_size = sizeof(v2_packet) - MAX_PACKETBUFFER_LENGTH + payload_size; } packet_crc32 = ntohl(v2_receive_packet->crc32_value); v2_receive_packet->crc32_value = 0L; calculated_crc32 = calculate_crc32((char *)v2_receive_packet, pkt_size); } if (packet_crc32 != calculated_crc32) { printf("CHECK_NRPE: Response packet had invalid CRC32.\n"); close(sd); if (v3_receive_packet) { free(v3_receive_packet); } if (v2_receive_packet) { free(v2_receive_packet); } return STATE_UNKNOWN; } /* get the return code from the remote plugin */ /* and print the output returned by the daemon */ if (packet_ver >= NRPE_PACKET_VERSION_3) { result = ntohs(v3_receive_packet->result_code); if (v3_receive_packet->buffer_length == 0) { printf("CHECK_NRPE: No output returned from daemon.\n"); } else { printf("%s\n", v3_receive_packet->buffer); } } else { result = ntohs(v2_receive_packet->result_code); if (payload_size > 0) { v2_receive_packet->buffer[payload_size - 1] = '\x0'; } else { v2_receive_packet->buffer[MAX_PACKETBUFFER_LENGTH - 1] = '\x0'; } if (!strcmp(v2_receive_packet->buffer, "")) { printf("CHECK_NRPE: No output returned from daemon.\n"); } else if (strstr(v2_receive_packet->buffer, "Invalid packet version.3") != NULL) { /* NSClient++ doesn't recognize it */ return -1; } else { printf("%s\n", v2_receive_packet->buffer); } } if (v3_receive_packet) { free(v3_receive_packet); } if (v2_receive_packet) { free(v2_receive_packet); } return result; } int read_packet(int sock, void *ssl_ptr, v2_packet ** v2_pkt, v3_packet ** v3_pkt) { v2_packet packet; int32_t pkt_size, common_size, tot_bytes, bytes_to_recv, buffer_size, bytes_read = 0; int rc; char *buff_ptr; /* Read only the part that's common between versions 2 & 3 */ common_size = tot_bytes = bytes_to_recv = (char *)packet.buffer - (char *)&packet; if (use_ssl == FALSE) { rc = recvall(sock, (char *)&packet, &tot_bytes, socket_timeout); if (rc <= 0 || rc != bytes_to_recv) { if (rc < bytes_to_recv) { if (packet_ver <= NRPE_PACKET_VERSION_3) printf("CHECK_NRPE: Receive header underflow - only %d bytes received (%ld expected).\n", rc, sizeof(bytes_to_recv)); } return -1; } if (packet_ver != ntohs(packet.packet_version)) { printf("CHECK_NRPE: Invalid packet version received from server.\n"); return -1; } if (ntohs(packet.packet_type) != RESPONSE_PACKET) { printf("CHECK_NRPE: Invalid packet type received from server.\n"); return -1; } if (packet_ver == NRPE_PACKET_VERSION_2) { pkt_size = sizeof(v2_packet); if (payload_size > 0) { pkt_size = common_size + payload_size; buffer_size = payload_size; } else { buffer_size = pkt_size - common_size; } if ((*v2_pkt = calloc(1, pkt_size)) == NULL) { logit(LOG_ERR, "Error: Could not allocate memory for packet"); return -1; } memcpy(*v2_pkt, &packet, common_size); buff_ptr = (*v2_pkt)->buffer; memset(buff_ptr, 0, buffer_size); } else { pkt_size = sizeof(v3_packet) - 1; /* Read the alignment filler */ bytes_to_recv = sizeof(int16_t); rc = recvall(sock, (char *)&buffer_size, &bytes_to_recv, socket_timeout); if (rc <= 0 || bytes_to_recv != sizeof(int16_t)) return -1; tot_bytes += rc; /* Read the buffer size */ bytes_to_recv = sizeof(buffer_size); rc = recvall(sock, (char *)&buffer_size, &bytes_to_recv, socket_timeout); if (rc <= 0 || bytes_to_recv != sizeof(buffer_size)) return -1; tot_bytes += rc; buffer_size = ntohl(buffer_size); if (buffer_size < 0 || buffer_size > 65536) { logit(LOG_ERR, "Error: Received packet with invalid buffer size"); return -1; } pkt_size += buffer_size; if ((*v3_pkt = calloc(1, pkt_size)) == NULL) { logit(LOG_ERR, "Error: Could not allocate memory for packet"); return -1; } memcpy(*v3_pkt, &packet, common_size); (*v3_pkt)->buffer_length = htonl(buffer_size); buff_ptr = (*v3_pkt)->buffer; } bytes_to_recv = buffer_size; rc = recvall(sock, buff_ptr, &bytes_to_recv, socket_timeout); if (rc <= 0 || rc != buffer_size) { if (packet_ver >= NRPE_PACKET_VERSION_3) { free(*v3_pkt); *v3_pkt = NULL; } else { free(*v2_pkt); *v2_pkt = NULL; } if (rc < buffer_size) printf("CHECK_NRPE: Receive underflow - only %d bytes received (%ld expected).\n", rc, sizeof(buffer_size)); return -1; } else tot_bytes += rc; } #ifdef HAVE_SSL else { SSL *ssl = (SSL *) ssl_ptr; while (((rc = SSL_read(ssl, &packet, bytes_to_recv)) <= 0) && (SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ)) { } if (rc <= 0 || rc != bytes_to_recv) { if (rc < bytes_to_recv) { if (packet_ver < NRPE_PACKET_VERSION_3 || packet_ver > NRPE_PACKET_VERSION_4) printf("CHECK_NRPE: Receive header underflow - only %d bytes received (%ld expected).\n", rc, sizeof(bytes_to_recv)); } return -1; } if (packet_ver != ntohs(packet.packet_version)) { printf("CHECK_NRPE: Invalid packet version received from server.\n"); return -1; } if (ntohs(packet.packet_type) != RESPONSE_PACKET) { printf("CHECK_NRPE: Invalid packet type received from server.\n"); return -1; } if (packet_ver == NRPE_PACKET_VERSION_2) { pkt_size = sizeof(v2_packet); if (payload_size > 0) { pkt_size = common_size + payload_size; buffer_size = payload_size; } else buffer_size = pkt_size - common_size; if ((*v2_pkt = calloc(1, pkt_size)) == NULL) { logit(LOG_ERR, "Error: Could not allocate memory for packet"); return -1; } memcpy(*v2_pkt, &packet, common_size); buff_ptr = (*v2_pkt)->buffer; memset(buff_ptr, 0, buffer_size); } else { pkt_size = sizeof(v3_packet) - 1; /* Read the alignment filler */ bytes_to_recv = sizeof(int16_t); while (((rc = SSL_read(ssl, &buffer_size, bytes_to_recv)) <= 0) && (SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ)) { } if (rc <= 0 || bytes_to_recv != sizeof(int16_t)) return -1; tot_bytes += rc; /* Read the buffer size */ bytes_to_recv = sizeof(buffer_size); while (((rc = SSL_read(ssl, &buffer_size, bytes_to_recv)) <= 0) && (SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ)) { } if (rc <= 0 || bytes_to_recv != sizeof(buffer_size)) return -1; tot_bytes += rc; buffer_size = ntohl(buffer_size); if (buffer_size < 0 || buffer_size > 65536) { logit(LOG_ERR, "Error: Received packet with invalid buffer size"); return -1; } pkt_size += buffer_size; if ((*v3_pkt = calloc(1, pkt_size)) == NULL) { logit(LOG_ERR, "Error: Could not allocate memory for packet"); return -1; } memcpy(*v3_pkt, &packet, common_size); (*v3_pkt)->buffer_length = htonl(buffer_size); buff_ptr = (*v3_pkt)->buffer; } bytes_to_recv = buffer_size; for (;;) { while (((rc = SSL_read(ssl, &buff_ptr[bytes_read], bytes_to_recv)) <= 0) && (SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ)) { } if (rc <= 0) break; bytes_read += rc; bytes_to_recv -= rc; tot_bytes += rc; } if (rc < 0 || bytes_read != buffer_size) { if (packet_ver >= NRPE_PACKET_VERSION_3) { free(*v3_pkt); *v3_pkt = NULL; } else { free(*v2_pkt); *v2_pkt = NULL; } if (bytes_read != buffer_size) { if (packet_ver >= NRPE_PACKET_VERSION_3) { printf("CHECK_NRPE: Receive buffer size - %ld bytes received (%ld expected).\n", (long)bytes_read, sizeof(buffer_size)); } else { printf("CHECK_NRPE: Receive underflow - only %ld bytes received (%ld expected).\n", (long)bytes_read, sizeof(buffer_size)); } } return -1; } } #endif return tot_bytes; } #ifdef HAVE_SSL int verify_callback(int preverify_ok, X509_STORE_CTX * ctx) { char name[256], issuer[256]; X509 *err_cert; int err; SSL *ssl; if (preverify_ok || ((sslprm.log_opts & SSL_LogCertDetails) == 0)) return preverify_ok; err_cert = X509_STORE_CTX_get_current_cert(ctx); err = X509_STORE_CTX_get_error(ctx); /* Get the pointer to the SSL of the current connection */ ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); X509_NAME_oneline(X509_get_subject_name(err_cert), name, 256); X509_NAME_oneline(X509_get_issuer_name(err_cert), issuer, 256); if (!preverify_ok && sslprm.client_certs >= Ask_For_Cert && (sslprm.log_opts & SSL_LogCertDetails)) { logit(LOG_ERR, "SSL Client has an invalid certificate: %s (issuer=%s) err=%d:%s", name, issuer, err, X509_verify_cert_error_string(err)); } return preverify_ok; } #endif void alarm_handler(int sig) { const char msg1[] = "CHECK_NRPE STATE "; const char msg2[] = ": Socket timeout after "; const char msg3[] = " seconds.\n"; const char *text = state_text(timeout_return_code); size_t lth1 = 0, lth2 = 0; for (lth1 = 0; lth1 < 10; ++lth1) if (text[lth1] == 0) break; for (lth2 = 0; lth2 < 10; ++lth2) if (timeout_txt[lth2] == 0) break; if ((write(STDOUT_FILENO, msg1, sizeof(msg1) - 1) == -1) || (write(STDOUT_FILENO, text, lth1) == -1) || (write(STDOUT_FILENO, msg2, sizeof(msg2) - 1) == -1) || (write(STDOUT_FILENO, timeout_txt, lth2) == -1) || (write(STDOUT_FILENO, msg3, sizeof(msg3) - 1) == -1)) { logit(LOG_ERR, "ERROR: alarm_handler() write(): %s", strerror(errno)); } exit(timeout_return_code); } /* submitted by Mark Plaksin 08/31/2006 */ int graceful_close(int sd, int timeout) { fd_set in; struct timeval tv; char buf[1000]; /* send FIN packet */ shutdown(sd, SHUT_WR); for (;;) { FD_ZERO(&in); FD_SET(sd, &in); tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout % 1000) * 1000; /* timeout or error */ if (1 != select(sd + 1, &in, NULL, NULL, &tv)) break; /* no more data (FIN or RST) */ if (0 >= recv(sd, buf, sizeof(buf), 0)) break; } #ifdef HAVE_CLOSESOCKET closesocket(sd); #else close(sd); #endif return OK; } nrpe-nrpe-4.0.3/src/nrpe.c000066400000000000000000002416021365211572000153320ustar00rootroot00000000000000/**************************************************************************** * * nrpe.c - Nagios Remote Plugin Executor * * License: GPLv2 * Copyright (c) 2009-2017 Nagios Enterprises * 1999-2008 Ethan Galstad (nagios@nagios.org) * * Command line: nrpe -c [--inetd | --daemon] * * Description: * * This program is designed to run as a background process and * handle incoming requests (from the host running Nagios) for * plugin execution. It is useful for running "local" plugins * such as check_users, check_load, check_disk, etc. without * having to use rsh or ssh. * * License Notice: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ****************************************************************************/ #include "config.h" #include "common.h" #include "nrpe.h" #include "utils.h" #include "acl.h" #ifdef HAVE_SSL # ifdef USE_SSL_DH # include "../include/dh.h" # endif #endif #ifndef HAVE_ASPRINTF extern int asprintf(char **ptr, const char *format, ...); #endif #ifdef HAVE_LIBWRAP int allow_severity = LOG_INFO; int deny_severity = LOG_WARNING; # ifndef HAVE_RFC931_TIMEOUT int rfc931_timeout=15; # endif #endif #ifdef HAVE_SSL # if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux) SSL_METHOD *meth; # else const SSL_METHOD *meth; # endif SSL_CTX *ctx; int use_ssl = TRUE; #else int use_ssl = FALSE; #endif #define DEFAULT_COMMAND_TIMEOUT 60 /* default timeout for execution of plugins */ #define MAXFD 64 #define NASTY_METACHARS "|`&><'\\[]{};\r\n" #define MAX_LISTEN_SOCKS 16 #define DEFAULT_LISTEN_QUEUE_SIZE 5 #define DEFAULT_SSL_SHUTDOWN_TIMEOUT 15 #define how_many(x,y) (((x)+((y)-1))/(y)) extern int errno; struct addrinfo *listen_addrs = NULL; int listen_socks[MAX_LISTEN_SOCKS]; char remote_host[MAX_HOST_ADDRESS_LENGTH]; char *macro_argv[MAX_COMMAND_ARGUMENTS]; char config_file[MAX_INPUT_BUFFER] = "nrpe.cfg"; char server_address[NI_MAXHOST] = ""; char *command_name = NULL; int log_facility = LOG_DAEMON; int server_port = DEFAULT_SERVER_PORT; int num_listen_socks = 0; int address_family = AF_UNSPEC; int socket_timeout = DEFAULT_SOCKET_TIMEOUT; int command_timeout = DEFAULT_COMMAND_TIMEOUT; int connection_timeout = DEFAULT_CONNECTION_TIMEOUT; int ssl_shutdown_timeout = DEFAULT_SSL_SHUTDOWN_TIMEOUT; char *command_prefix = NULL; int packet_ver = 0; command *command_list = NULL; char *nrpe_user = NULL; char *nrpe_group = NULL; char *allowed_hosts = NULL; char *keep_env_vars = NULL; char *pid_file = NULL; int wrote_pid_file = FALSE; int allow_arguments = FALSE; int allow_bash_cmd_subst = FALSE; int allow_weak_random_seed = FALSE; int sigrestart = FALSE; int sigshutdown = FALSE; int show_help = FALSE; int show_license = FALSE; int show_version = FALSE; int use_inetd = TRUE; int commands_running = 0; int max_commands = 0; int debug = FALSE; int use_src = FALSE; /* Define parameter for SRC option */ int no_forking = FALSE; int listen_queue_size = DEFAULT_LISTEN_QUEUE_SIZE; char *nasty_metachars = NULL; extern char *log_file; /* SSL/TLS parameters */ typedef enum _SSL_VER { SSLv2 = 1, SSLv2_plus, SSLv3, SSLv3_plus, TLSv1, TLSv1_plus, TLSv1_1, TLSv1_1_plus, TLSv1_2, TLSv1_2_plus, TLSv1_3, TLSv1_3_plus } SslVer; typedef enum _CLNT_CERTS { ClntCerts_Unknown = 0, Ask_For_Cert = 1, Require_Cert = 2 } ClntCerts; typedef enum _SSL_LOGGING { SSL_NoLogging = 0, SSL_LogStartup = 1, SSL_LogIpAddr = 2, SSL_LogVersion = 4, SSL_LogCipher = 8, SSL_LogIfClientCert = 16, SSL_LogCertDetails = 32 } SslLogging; struct _SSL_PARMS { char *cert_file; char *cacert_file; char *privatekey_file; char cipher_list[MAX_FILENAME_LENGTH]; SslVer ssl_proto_ver; int allowDH; ClntCerts client_certs; SslLogging log_opts; } sslprm = { #if OPENSSL_VERSION_NUMBER >= 0x10100000 NULL, NULL, NULL, "ALL:!MD5:@STRENGTH:@SECLEVEL=0", TLSv1_plus, TRUE, 0, SSL_NoLogging #else NULL, NULL, NULL, "ALL:!MD5:@STRENGTH", TLSv1_plus, TRUE, 0, SSL_NoLogging #endif }; #ifdef HAVE_SSL static int verify_callback(int ok, X509_STORE_CTX * ctx); static void my_disconnect_sighandler(int sig); static void complete_SSL_shutdown(SSL *); #endif int disable_syslog = FALSE; int main(int argc, char **argv) { int result = OK; int x; uint32_t y; char buffer[MAX_INPUT_BUFFER]; init(); /* process command-line args */ result = process_arguments(argc, argv); if (result != OK || show_help == TRUE || show_license == TRUE || show_version == TRUE) usage(result); /* make sure the config file uses an absolute path */ if (config_file[0] != '/') { /* save the name of the config file */ strncpy(buffer, config_file, sizeof(buffer)); buffer[sizeof(buffer) - 1] = '\x0'; /* get absolute path of current working directory */ strcpy(config_file, ""); if (getcwd(config_file, sizeof(config_file)) == NULL) { printf("ERROR: getcwd(): %s, bailing out...\n", strerror(errno)); exit(STATE_CRITICAL); } /* append a forward slash */ strncat(config_file, "/", sizeof(config_file) - 2); config_file[sizeof(config_file) - 1] = '\x0'; /* append the config file to the path */ strncat(config_file, buffer, sizeof(config_file) - strlen(config_file) - 1); config_file[sizeof(config_file) - 1] = '\x0'; } /* read the config file */ result = read_config_file(config_file); /* exit if there are errors... */ if (result == ERROR) { logit(LOG_ERR, "Config file '%s' contained errors, aborting...", config_file); return STATE_CRITICAL; } if (!nasty_metachars) nasty_metachars = strdup(NASTY_METACHARS); /* initialize macros */ for (x = 0; x < MAX_COMMAND_ARGUMENTS; x++) macro_argv[x] = NULL; init_ssl(); /* if we're running under inetd... */ if (use_inetd == TRUE) run_inetd(); else if (use_src == TRUE || no_forking == TRUE) run_src(); else run_daemon(); #ifdef HAVE_SSL if (use_ssl == TRUE) SSL_CTX_free(ctx); #endif /* We are now running in daemon mode, or the connection handed over by inetd has been completed, so the parent process exits */ return STATE_OK; } int init(void) { char *env_string = NULL; int result = OK; /* set some environment variables */ asprintf(&env_string, "NRPE_MULTILINESUPPORT=1"); putenv(env_string); asprintf(&env_string, "NRPE_PROGRAMVERSION=%s", PROGRAM_VERSION); putenv(env_string); /* open a connection to the syslog facility */ /* facility name may be overridden later */ get_log_facility(NRPE_LOG_FACILITY); openlog("nrpe", LOG_PID, log_facility); /* generate the CRC 32 table */ generate_crc32_table(); return result; } void init_ssl(void) { #ifdef HAVE_SSL DH *dh; char seedfile[FILENAME_MAX]; char errstr[120] = { "" }; int i, c, x, vrfy; unsigned long ssl_opts = SSL_OP_ALL | SSL_OP_SINGLE_DH_USE; if (use_ssl == FALSE) { if (debug == TRUE) logit(LOG_INFO, "INFO: SSL/TLS NOT initialized. Network encryption DISABLED."); return; } #ifndef USE_SSL_DH ssl_opts = SSL_OP_ALL; sslprm.allowDH = 0; #endif if (sslprm.log_opts & SSL_LogStartup) log_ssl_startup(); /* initialize SSL */ SSL_load_error_strings(); SSL_library_init(); ENGINE_load_builtin_engines(); RAND_set_rand_engine(NULL); ENGINE_register_all_complete(); meth = SSLv23_server_method(); /* use week random seed if necessary */ if (allow_weak_random_seed && (RAND_status() == 0)) { if (RAND_file_name(seedfile, sizeof(seedfile) - 1)) if (RAND_load_file(seedfile, -1)) RAND_write_file(seedfile); if (RAND_status() == 0) { logit(LOG_ERR, "Warning: SSL/TLS uses a weak random seed which is highly discouraged"); srand(time(NULL)); for (i = 0; i < 500 && RAND_status() == 0; i++) { for (c = 0; c < sizeof(seedfile); c += sizeof(int)) { *((int *)(seedfile + c)) = rand(); } RAND_seed(seedfile, sizeof(seedfile)); } } } #if OPENSSL_VERSION_NUMBER >= 0x10100000 meth = TLS_method(); #else /* OPENSSL_VERSION_NUMBER >= 0x10100000 */ # ifndef OPENSSL_NO_SSL2 if (sslprm.ssl_proto_ver == SSLv2) meth = SSLv2_server_method(); # endif # ifndef OPENSSL_NO_SSL3 if (sslprm.ssl_proto_ver == SSLv3) meth = SSLv3_server_method(); # endif if (sslprm.ssl_proto_ver == TLSv1) meth = TLSv1_server_method(); # ifdef SSL_TXT_TLSV1_1 if (sslprm.ssl_proto_ver == TLSv1_1) meth = TLSv1_1_server_method(); # ifdef SSL_TXT_TLSV1_2 if (sslprm.ssl_proto_ver == TLSv1_2) meth = TLSv1_2_server_method(); # ifdef SSL_TXT_TLSV1_3 if (sslprm.ssl_proto_ver == TLSv1_3) meth = TLSv1_3_server_method(); # endif /* ifdef SSL_TXT_TLSV1_3 */ # endif /* ifdef SSL_TXT_TLSV1_2 */ # endif /* SSL_TXT_TLSV1_1 */ #endif /* OPENSSL_VERSION_NUMBER >= 0x10100000 */ ctx = SSL_CTX_new(meth); if (ctx == NULL) { while ((x = ERR_get_error()) != 0) { ERR_error_string(x, errstr); logit(LOG_ERR, "Error: could not create SSL context : %s", errstr); } SSL_CTX_free(ctx); exit(STATE_CRITICAL); } #if OPENSSL_VERSION_NUMBER >= 0x10100000 SSL_CTX_set_max_proto_version(ctx, 0); switch(sslprm.ssl_proto_ver) { case TLSv1_3: #if OPENSSL_VERSION_NUMBER >= 0x10101000 SSL_CTX_set_max_proto_version(ctx, TLS1_3_VERSION); #endif case TLSv1_3_plus: #if OPENSSL_VERSION_NUMBER >= 0x10101000 SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION); break; #endif case TLSv1_2: SSL_CTX_set_max_proto_version(ctx, TLS1_2_VERSION); case TLSv1_2_plus: SSL_CTX_set_min_proto_version(ctx, TLS1_2_VERSION); break; case TLSv1_1: SSL_CTX_set_max_proto_version(ctx, TLS1_1_VERSION); case TLSv1_1_plus: SSL_CTX_set_min_proto_version(ctx, TLS1_1_VERSION); break; case TLSv1: SSL_CTX_set_max_proto_version(ctx, TLS1_VERSION); case TLSv1_plus: SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION); break; case SSLv3: SSL_CTX_set_max_proto_version(ctx, SSL3_VERSION); case SSLv3_plus: SSL_CTX_set_min_proto_version(ctx, SSL3_VERSION); break; } #else /* OPENSSL_VERSION_NUMBER >= 0x10100000 */ switch(sslprm.ssl_proto_ver) { case SSLv2: case SSLv2_plus: break; case TLSv1_3: case TLSv1_3_plus: #ifdef SSL_OP_NO_TLSv1_2 ssl_opts |= SSL_OP_NO_TLSv1_2; #endif case TLSv1_2: case TLSv1_2_plus: ssl_opts |= SSL_OP_NO_TLSv1_1; case TLSv1_1: case TLSv1_1_plus: ssl_opts |= SSL_OP_NO_TLSv1; case TLSv1: case TLSv1_plus: ssl_opts |= SSL_OP_NO_SSLv3; case SSLv3: case SSLv3_plus: ssl_opts |= SSL_OP_NO_SSLv2; break; } #endif /* OPENSSL_VERSION_NUMBER >= 0x10100000 */ SSL_CTX_set_options(ctx, ssl_opts); if (sslprm.cert_file != NULL) { if (!SSL_CTX_use_certificate_file(ctx, sslprm.cert_file, SSL_FILETYPE_PEM)) { SSL_CTX_free(ctx); while ((x = ERR_get_error()) != 0) { ERR_error_string(x, errstr); logit(LOG_ERR, "Error: could not use certificate file %s : %s", sslprm.cert_file, errstr); } exit(STATE_CRITICAL); } if (!SSL_CTX_use_PrivateKey_file(ctx, sslprm.privatekey_file, SSL_FILETYPE_PEM)) { while ((x = ERR_get_error()) != 0) { ERR_error_string(x, errstr); logit(LOG_ERR, "Error: could not use private key file '%s' : %s", sslprm.privatekey_file, errstr); } SSL_CTX_free(ctx); exit(STATE_CRITICAL); } } if (sslprm.client_certs != 0) { vrfy = SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE; if ((sslprm.client_certs & Require_Cert) != 0) vrfy |= SSL_VERIFY_FAIL_IF_NO_PEER_CERT; SSL_CTX_set_verify(ctx, vrfy, verify_callback); if (!SSL_CTX_load_verify_locations(ctx, sslprm.cacert_file, NULL)) { while ((x = ERR_get_error_line_data(NULL, NULL, NULL, NULL)) != 0) { logit(LOG_ERR, "Error: could not use CA certificate file '%s': %s\n", sslprm.cacert_file, ERR_reason_error_string(x)); } SSL_CTX_free(ctx); logit(LOG_ERR, "Error: could not use CA certificate '%s'", sslprm.cacert_file); exit(STATE_CRITICAL); } } if (!sslprm.allowDH) { if (strlen(sslprm.cipher_list) < sizeof(sslprm.cipher_list) - 6) strcat(sslprm.cipher_list, ":!ADH"); } else { /* use anonymous DH ciphers */ if (sslprm.allowDH == 2) { #if OPENSSL_VERSION_NUMBER >= 0x10100000 strncpy(sslprm.cipher_list, "ADH@SECLEVEL=0", MAX_FILENAME_LENGTH - 1); #else strncpy(sslprm.cipher_list, "ADH", MAX_FILENAME_LENGTH - 1); #endif } #ifdef USE_SSL_DH dh = get_dh2048(); SSL_CTX_set_tmp_dh(ctx, dh); DH_free(dh); #endif } if (SSL_CTX_set_cipher_list(ctx, sslprm.cipher_list) == 0) { SSL_CTX_free(ctx); logit(LOG_ERR, "Error: Could not set SSL/TLS cipher list"); exit(STATE_CRITICAL); } if (debug == TRUE) logit(LOG_INFO, "INFO: SSL/TLS initialized. All network traffic will be encrypted."); #endif } void log_ssl_startup(void) { #ifdef HAVE_SSL char *vers; logit(LOG_INFO, "SSL Certificate File: %s", sslprm.cert_file ? sslprm.cert_file : "None"); logit(LOG_INFO, "SSL Private Key File: %s", sslprm.privatekey_file ? sslprm.privatekey_file : "None"); logit(LOG_INFO, "SSL CA Certificate File: %s", sslprm.cacert_file ? sslprm.cacert_file : "None"); logit(LOG_INFO, "SSL Cipher List: %s", sslprm.cipher_list); logit(LOG_INFO, "SSL Allow ADH: %d", sslprm.allowDH == 0); logit(LOG_INFO, "SSL Client Certs: %s", sslprm.client_certs == 0 ? "Don't Ask" : (sslprm.client_certs == 1 ? "Accept" : "Require")); logit(LOG_INFO, "SSL Log Options: 0x%02x", sslprm.log_opts); switch (sslprm.ssl_proto_ver) { case SSLv2: vers = "SSLv2"; break; case SSLv2_plus: vers = "SSLv2 And Above"; break; case SSLv3: vers = "SSLv3"; break; case SSLv3_plus: vers = "SSLv3 And Above"; break; case TLSv1: vers = "TLSv1"; break; case TLSv1_plus: vers = "TLSv1 And Above"; break; case TLSv1_1: vers = "TLSv1_1"; break; case TLSv1_1_plus: vers = "TLSv1_1 And Above"; break; case TLSv1_2: vers = "TLSv1_2"; break; case TLSv1_2_plus: vers = "TLSv1_2 And Above"; break; case TLSv1_3: vers = "TLSv1_3"; break; case TLSv1_3_plus: vers = "TLSv1_3 And Above"; break; default: vers = "INVALID VALUE!"; break; } logit(LOG_INFO, "SSL Version: %s", vers); #endif } void usage(int result) { if (result != OK) { printf("\n"); printf("Incorrect command line arguments supplied\n"); printf("\n"); } printf("NRPE - Nagios Remote Plugin Executor\n"); printf("Version: %s\n", PROGRAM_VERSION); printf("\n"); if (result != OK || show_help == TRUE) { printf("Copyright (c) 2009-2017 Nagios Enterprises\n"); printf(" 1999-2008 Ethan Galstad (nagios@nagios.org)\n"); printf("\n"); printf("Last Modified: %s\n", MODIFICATION_DATE); printf("\n"); printf("License: GPL v2 with exemptions (-l for more info)\n"); printf("\n"); #ifdef HAVE_SSL printf("SSL/TLS Available, OpenSSL 0.9.6 or higher required\n"); printf("\n"); #endif #ifdef HAVE_LIBWRAP printf("TCP Wrappers Available\n"); printf("\n"); #endif #ifdef ENABLE_COMMAND_ARGUMENTS printf("***************************************************************\n"); printf("** POSSIBLE SECURITY RISK - COMMAND ARGUMENTS ARE SUPPORTED! **\n"); printf("** Read the NRPE SECURITY file for more information **\n"); printf("***************************************************************\n"); printf("\n"); #endif #ifndef HAVE_LIBWRAP printf("***************************************************************\n"); printf("** POSSIBLE SECURITY RISK - TCP WRAPPERS ARE NOT AVAILABLE! **\n"); printf("** Read the NRPE SECURITY file for more information **\n"); printf("***************************************************************\n"); printf("\n"); #endif printf("Usage: nrpe [-V] [-n] -c [-4|-6] \n"); printf("\n"); printf("Options:\n"); printf(" -V, --version Print version info and quit\n"); printf(" -n, --no-ssl Do not use SSL\n"); printf(" -c, --config=FILE Name of config file to use\n"); printf(" -4, --ipv4 Use ipv4 only\n"); printf(" -6, --ipv6 Use ipv6 only\n"); printf(" (One of the following operating modes)\n"); printf(" -i, --inetd Run as a service under inetd or xinetd\n"); printf(" -d, --daemon Run as a standalone daemon\n"); printf(" -s, --src Run as a subsystem under AIX\n"); printf(" -f, --no-forking Don't fork() (for systemd, launchd, etc.)\n"); printf("\n"); printf("Notes:\n"); printf("This program is designed to process requests from the check_nrpe\n"); printf("plugin on the host(s) running Nagios. It can run as a service\n"); printf("under inetd or xinetd (read the docs for info on this), or as a\n"); printf("standalone daemon. Once a request is received from an authorized\n"); printf("host, NRPE will execute the command/plugin (as defined in the\n"); printf("config file) and return the plugin output and return code to the\n"); printf("check_nrpe plugin.\n"); printf("\n"); } if (show_license == TRUE) display_license(); exit(STATE_UNKNOWN); } void run_inetd(void) { check_privileges(); /* make sure we're not root */ close(2); /* redirect STDERR to /dev/null */ open("/dev/null", O_WRONLY); handle_connection(0); /* handle the connection */ } void run_src(void) { /* if we're running under SRC we don't fork but does drop-privileges */ set_stdio_sigs(); do { /* reset flags */ sigrestart = FALSE; sigshutdown = FALSE; wait_for_connections(); /* wait for connections */ cleanup(); } while (sigrestart == TRUE && sigshutdown == FALSE); } /* daemonize and start listening for requests... */ void run_daemon(void) { pid_t pid; pid = fork(); if (pid != 0) { if (pid == -1) { logit(LOG_ERR, "fork() failed with error %d, bailing out...", errno); exit(STATE_CRITICAL); } return; } setsid(); /* we're a daemon - set up a new process group */ set_stdio_sigs(); do { /* reset flags */ sigrestart = FALSE; sigshutdown = FALSE; wait_for_connections(); /* wait for connections */ cleanup(); } while (sigrestart == TRUE && sigshutdown == FALSE); } void set_stdio_sigs(void) { #ifdef HAVE_SIGACTION struct sigaction sig_action; #endif if (chdir("/") == -1) { printf("ERROR: chdir(): %s, bailing out...\n", strerror(errno)); exit(STATE_CRITICAL); } close(0); /* close standard file descriptors */ close(1); close(2); open("/dev/null", O_RDONLY); /* redirect standard descriptors to /dev/null */ open("/dev/null", O_WRONLY); open("/dev/null", O_WRONLY); /* handle signals */ #ifdef HAVE_SIGACTION sig_action.sa_sigaction = NULL; sig_action.sa_handler = sighandler; sigfillset(&sig_action.sa_mask); sig_action.sa_flags = SA_NODEFER | SA_RESTART; sigaction(SIGQUIT, &sig_action, NULL); sigaction(SIGTERM, &sig_action, NULL); sigaction(SIGHUP, &sig_action, NULL); #else /* HAVE_SIGACTION */ signal(SIGQUIT, sighandler); signal(SIGTERM, sighandler); signal(SIGHUP, sighandler); #endif /* HAVE_SIGACTION */ logit(LOG_NOTICE, "Starting up daemon"); /* log info */ if (write_pid_file() == ERROR) /* write pid file */ exit(STATE_CRITICAL); clean_environ(keep_env_vars, nrpe_user); /* drop and then check privileges */ drop_privileges(nrpe_user, nrpe_group, 0); check_privileges(); } void cleanup(void) { int result; free_memory(); /* free all memory we allocated */ if (sigrestart == TRUE && sigshutdown == FALSE) { close_log_file(); result = read_config_file(config_file); /* read the config file */ if (result == ERROR) { /* exit if there are errors... */ logit(LOG_ERR, "Config file '%s' contained errors, bailing out...", config_file); exit(STATE_CRITICAL); } return; } remove_pid_file(); /* remove pid file */ logit(LOG_NOTICE, "Daemon shutdown\n"); close_log_file(); /* close the log file */ } #ifdef HAVE_SSL int verify_callback(int preverify_ok, X509_STORE_CTX * ctx) { char name[256], issuer[256]; X509 *err_cert; int err; SSL *ssl; if (preverify_ok || ((sslprm.log_opts & SSL_LogCertDetails) == 0)) return preverify_ok; err_cert = X509_STORE_CTX_get_current_cert(ctx); err = X509_STORE_CTX_get_error(ctx); /* Get the pointer to the SSL of the current connection */ ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); X509_NAME_oneline(X509_get_subject_name(err_cert), name, 256); X509_NAME_oneline(X509_get_issuer_name(err_cert), issuer, 256); if (!preverify_ok && (sslprm.log_opts & SSL_LogCertDetails)) { logit(LOG_ERR, "SSL Client has an invalid certificate: %s (issuer=%s) err=%d:%s", name, issuer, err, X509_verify_cert_error_string(err)); } return preverify_ok; } #endif /* * Given a string, convert any byte pairs representing an escape sequence (e.g. "\\r" into * the single-byte metacharacter (e.g. '\r') * Currently, this doesn't support octal/hex numbers or unicode code points (\n, \x, \u, \U) */ char* process_metachars(const char* input) { char* copy = strdup(input); int i,j; int length = strlen(input); for (i = 0, j = 0; i < length, j < length; i++, j++) { if (copy[j] != '\\') { copy[i] = copy[j]; continue; } j += 1; switch (copy[j]) { case 'a': copy[i] = '\a'; break; case 'b': copy[i] = '\b'; break; case 'f': copy[i] = '\f'; break; case 'n': copy[i] = '\n'; break; case 'r': copy[i] = '\r'; break; case 't': copy[i] = '\t'; break; case 'v': copy[i] = '\v'; break; case '\\': copy[i] = '\\'; break; case '\'': copy[i] = '\''; break; case '"': copy[i] = '\"'; break; case '?': copy[i] = '\?'; break; } } copy[i] = '\0'; return copy; } /* read in the configuration file */ int read_config_file(char *filename) { struct stat st; FILE *fp; char config_file[MAX_FILENAME_LENGTH]; char input_buffer[MAX_INPUT_BUFFER]; char *input_line; char *temp_buffer; char *varname; char *varvalue; int line = 0; int len = 0; int x = 0; fp = fopen(filename, "r"); /* open the config file for reading */ /* exit if we couldn't open the config file */ if (fp == NULL) { logit(LOG_ERR, "Unable to open config file '%s' for reading\n", filename); return ERROR; } while (fgets(input_buffer, MAX_INPUT_BUFFER - 1, fp)) { line++; input_line = input_buffer; /* skip leading whitespace */ while (isspace(*input_line)) ++input_line; /* trim trailing whitespace */ len = strlen(input_line); for (x = len - 1; x >= 0; x--) { if (isspace(input_line[x])) input_line[x] = '\x0'; else break; } /* skip comments and blank lines */ if (input_line[0] == '#' || input_line[0] == '\x0' || input_line[0] == '\n') continue; /* get the variable name */ varname = strtok(input_line, "="); if (varname == NULL) { logit(LOG_ERR, "No variable name specified in config file '%s' - Line %d\n", filename, line); return ERROR; } /* get the variable value */ varvalue = strtok(NULL, "\n"); if (varvalue == NULL) { logit(LOG_ERR, "No variable value specified in config file '%s' - Line %d\n", filename, line); return ERROR; } else if (!strcmp(varname, "include_dir")) { /* allow users to specify directories to recurse into for config files */ strncpy(config_file, varvalue, sizeof(config_file) - 1); config_file[sizeof(config_file) - 1] = '\x0'; /* strip trailing / if necessary */ if (config_file[strlen(config_file) - 1] == '/') config_file[strlen(config_file) - 1] = '\x0'; /* process the config directory... */ if (read_config_dir(config_file) == ERROR) logit(LOG_ERR, "Continuing with errors..."); } else if (!strcmp(varname, "include") || !strcmp(varname, "include_file")) { /* allow users to specify individual config files to include */ /* process the config file... */ if (read_config_file(varvalue) == ERROR) logit(LOG_ERR, "Continuing with errors..."); } else if (!strcmp(varname, "max_commands")) { max_commands = atoi(varvalue); if (max_commands < 0) { logit(LOG_WARNING, "max_commands set too low, setting to 0\n"); max_commands = 0; } } else if (!strcmp(varname, "server_port")) { server_port = atoi(varvalue); if (server_port < 1024) { logit(LOG_ERR, "Invalid port number specified in config file '%s' - Line %d\n", filename, line); return ERROR; } } else if (!strcmp(varname, "command_prefix")) command_prefix = strdup(varvalue); else if (!strcmp(varname, "server_address")) { strncpy(server_address, varvalue, sizeof(server_address) - 1); server_address[sizeof(server_address) - 1] = '\0'; } else if (!strcmp(varname, "allowed_hosts")) { allowed_hosts = strdup(varvalue); parse_allowed_hosts(allowed_hosts); if (debug == TRUE) show_acl_lists(); } else if (strstr(input_line, "command[")) { temp_buffer = strtok(varname, "["); temp_buffer = strtok(NULL, "]"); if (temp_buffer == NULL) { logit(LOG_ERR, "Invalid command specified in config file '%s' - Line %d\n", filename, line); return ERROR; } add_command(temp_buffer, varvalue); } else if (strstr(input_buffer, "debug")) { debug = atoi(varvalue); if (debug > 0) debug = TRUE; else debug = FALSE; } else if (!strcmp(varname, "nrpe_user")) nrpe_user = strdup(varvalue); else if (!strcmp(varname, "nrpe_group")) nrpe_group = strdup(varvalue); else if (!strcmp(varname, "dont_blame_nrpe")) allow_arguments = (atoi(varvalue) == 1) ? TRUE : FALSE; else if (!strcmp(varname, "disable_syslog")) disable_syslog = (atoi(varvalue) == 1) ? TRUE : FALSE; else if (!strcmp(varname, "allow_bash_command_substitution")) allow_bash_cmd_subst = (atoi(varvalue) == 1) ? TRUE : FALSE; else if (!strcmp(varname, "command_timeout")) { command_timeout = atoi(varvalue); if (command_timeout < 1) { logit(LOG_ERR, "Invalid command_timeout specified in config file '%s' - Line %d\n", filename, line); return ERROR; } } else if (!strcmp(varname, "connection_timeout")) { connection_timeout = atoi(varvalue); if (connection_timeout < 1) { logit(LOG_ERR, "Invalid connection_timeout specified in config file '%s' - Line %d\n", filename, line); return ERROR; } } else if (!strcmp(varname, "ssl_shutdown_timeout")) { ssl_shutdown_timeout = atoi(varvalue); if (ssl_shutdown_timeout < 1) { logit(LOG_ERR, "Invalid ssl_shutdown_timeout specified in config file '%s' - Line %d\n", filename, line); return ERROR; } } else if (!strcmp(varname, "allow_weak_random_seed")) allow_weak_random_seed = (atoi(varvalue) == 1) ? TRUE : FALSE; else if (!strcmp(varname, "pid_file")) pid_file = strdup(varvalue); else if (!strcmp(varname, "listen_queue_size")) { listen_queue_size = atoi(varvalue); if (listen_queue_size == 0) { logit(LOG_ERR, "Invalid listen queue size specified in config file '%s' - Line %d\n", filename, line); return ERROR; } } else if (!strcmp(varname, "ssl_version")) { if (!strcmp(varvalue, "TLSv1.3")) sslprm.ssl_proto_ver = TLSv1_3; else if (!strcmp(varvalue, "TLSv1.3+")) sslprm.ssl_proto_ver = TLSv1_3_plus; else if (!strcmp(varvalue, "TLSv1.2")) sslprm.ssl_proto_ver = TLSv1_2; else if (!strcmp(varvalue, "TLSv1.2+")) sslprm.ssl_proto_ver = TLSv1_2_plus; else if (!strcmp(varvalue, "TLSv1.1")) sslprm.ssl_proto_ver = TLSv1_1; else if (!strcmp(varvalue, "TLSv1.1+")) sslprm.ssl_proto_ver = TLSv1_1_plus; else if (!strcmp(varvalue, "TLSv1")) sslprm.ssl_proto_ver = TLSv1; else if (!strcmp(varvalue, "TLSv1+")) sslprm.ssl_proto_ver = TLSv1_plus; else if (!strcmp(varvalue, "SSLv3")) sslprm.ssl_proto_ver = SSLv3; else if (!strcmp(varvalue, "SSLv3+")) sslprm.ssl_proto_ver = SSLv3_plus; #if OPENSSL_VERSION_NUMBER < 0x10100000 else if (!strcmp(varvalue, "SSLv2")) sslprm.ssl_proto_ver = SSLv2; else if (!strcmp(varvalue, "SSLv2+")) sslprm.ssl_proto_ver = SSLv2_plus; #endif /* OPENSSL_VERSION_NUMBER < 0x10100000 */ else { logit(LOG_ERR, "Invalid ssl version specified in config file '%s' - Line %d", filename, line); return ERROR; } } else if (!strcmp(varname, "ssl_use_adh")) { sslprm.allowDH = atoi(varvalue); if (sslprm.allowDH < 0 || sslprm.allowDH > 2) { logit(LOG_ERR, "Invalid use adh value specified in config file '%s' - Line %d", filename, line); return ERROR; } } else if (!strcmp(varname, "ssl_logging")) sslprm.log_opts = strtoul(varvalue, NULL, 0); else if (!strcmp(varname, "ssl_cipher_list")) { strncpy(sslprm.cipher_list, varvalue, sizeof(sslprm.cipher_list) - 1); sslprm.cipher_list[sizeof(sslprm.cipher_list) - 1] = '\0'; } else if (!strcmp(varname, "ssl_cert_file")) sslprm.cert_file = strdup(varvalue); else if (!strcmp(varname, "ssl_cacert_file")) sslprm.cacert_file = strdup(varvalue); else if (!strcmp(varname, "ssl_privatekey_file")) sslprm.privatekey_file = strdup(varvalue); else if (!strcmp(varname, "ssl_client_certs")) { sslprm.client_certs = atoi(varvalue); if ((int)sslprm.client_certs < 0 || sslprm.client_certs > Require_Cert) { logit(LOG_ERR, "Invalid client certs value specified in config file '%s' - Line %d", filename, line); return ERROR; } /* if requiring or logging client certs, make sure "Ask" is turned on */ if (sslprm.client_certs & Require_Cert) sslprm.client_certs |= Ask_For_Cert; } else if (!strcmp(varname, "log_facility")) { if ((get_log_facility(varvalue)) == OK) { /* re-open log using new facility */ closelog(); openlog("nrpe", LOG_PID, log_facility); } else logit(LOG_WARNING, "Invalid log_facility specified in config file '%s' - Line %d\n", filename, line); } else if (!strcmp(varname, "keep_env_vars")) keep_env_vars = strdup(varvalue); else if (!strcmp(varname, "nasty_metachars")) nasty_metachars = process_metachars(varvalue); else if (!strcmp(varname, "log_file")) { log_file = strdup(varvalue); open_log_file(); } else { logit(LOG_WARNING, "Unknown option specified in config file '%s' - Line %d\n", filename, line); continue; } } fclose(fp); /* close the config file */ return OK; } /* process all config files in a specific config directory (with directory recursion) */ int read_config_dir(char *dirname) { struct dirent *dirfile; #ifdef HAVE_SCANDIR struct dirent **dirfiles; int x, i, n; #else DIR *dirp; int x; #endif struct stat buf; char config_file[MAX_FILENAME_LENGTH]; int result = OK; #ifdef HAVE_SCANDIR /* read and sort the directory contents */ n = scandir(dirname, &dirfiles, 0, alphasort); if (n < 0) { logit(LOG_ERR, "Could not open config directory '%s' for reading.\n", dirname); return ERROR; } for (i = 0; i < n; i++) { dirfile = dirfiles[i]; #else /* open the directory for reading */ dirp = opendir(dirname); if (dirp == NULL) { logit(LOG_ERR, "Could not open config directory '%s' for reading.\n", dirname); return ERROR; } while ((dirfile = readdir(dirp)) != NULL) { #endif /* process all files in the directory... */ /* create the full path to the config file or subdirectory */ snprintf(config_file, sizeof(config_file) - 1, "%s/%s", dirname, dirfile->d_name); config_file[sizeof(config_file) - 1] = '\x0'; stat(config_file, &buf); /* process this if it's a config file... */ x = strlen(dirfile->d_name); if (x > 4 && !strcmp(dirfile->d_name + (x - 4), ".cfg")) { /* only process normal files */ if (!S_ISREG(buf.st_mode)) continue; /* process the config file */ result |= read_config_file(config_file); } /* recurse into subdirectories... */ if (S_ISDIR(buf.st_mode)) { /* ignore current, parent and hidden directory entries */ if (dirfile->d_name[0] == '.') continue; /* process the config directory */ result |= read_config_dir(config_file); } } #ifdef HAVE_SCANDIR for (i = 0; i < n; i++) free(dirfiles[i]); free(dirfiles); #else closedir(dirp); #endif return result; } /* determines facility to use with syslog */ int get_log_facility(char *varvalue) { if (!strcmp(varvalue, "kern")) log_facility = LOG_KERN; else if (!strcmp(varvalue, "user")) log_facility = LOG_USER; else if (!strcmp(varvalue, "mail")) log_facility = LOG_MAIL; else if (!strcmp(varvalue, "daemon")) log_facility = LOG_DAEMON; else if (!strcmp(varvalue, "auth")) log_facility = LOG_AUTH; else if (!strcmp(varvalue, "syslog")) log_facility = LOG_SYSLOG; else if (!strcmp(varvalue, "lrp")) log_facility = LOG_LPR; else if (!strcmp(varvalue, "news")) log_facility = LOG_NEWS; else if (!strcmp(varvalue, "uucp")) log_facility = LOG_UUCP; else if (!strcmp(varvalue, "cron")) log_facility = LOG_CRON; else if (!strcmp(varvalue, "authpriv")) log_facility = LOG_AUTHPRIV; else if (!strcmp(varvalue, "ftp")) log_facility = LOG_FTP; else if (!strcmp(varvalue, "local0")) log_facility = LOG_LOCAL0; else if (!strcmp(varvalue, "local1")) log_facility = LOG_LOCAL1; else if (!strcmp(varvalue, "local2")) log_facility = LOG_LOCAL2; else if (!strcmp(varvalue, "local3")) log_facility = LOG_LOCAL3; else if (!strcmp(varvalue, "local4")) log_facility = LOG_LOCAL4; else if (!strcmp(varvalue, "local5")) log_facility = LOG_LOCAL5; else if (!strcmp(varvalue, "local6")) log_facility = LOG_LOCAL6; else if (!strcmp(varvalue, "local7")) log_facility = LOG_LOCAL7; else { log_facility = LOG_DAEMON; return ERROR; } return OK; } /* adds a new command definition from the config file to the list in memory */ int add_command(char *command_name, char *command_line) { command *new_command; if (command_name == NULL || command_line == NULL) return ERROR; /* allocate memory for the new command */ new_command = (command *) malloc(sizeof(command)); if (new_command == NULL) return ERROR; new_command->command_name = strdup(command_name); if (new_command->command_name == NULL) { free(new_command); return ERROR; } new_command->command_line = strdup(command_line); if (new_command->command_line == NULL) { free(new_command->command_name); free(new_command); return ERROR; } /* add new command to head of list in memory */ new_command->next = command_list; command_list = new_command; if (debug == TRUE) logit(LOG_DEBUG, "Added command[%s]=%s\n", command_name, command_line); return OK; } /* given a command name, find the structure in memory */ command *find_command(char *command_name) { command *temp_command; for (temp_command = command_list; temp_command != NULL; temp_command = temp_command->next) if (!strcmp(command_name, temp_command->command_name)) return temp_command; return NULL; } /* Start listen on a particular port */ void create_listener(struct addrinfo *ai) { int ret; char ntop[NI_MAXHOST], strport[NI_MAXSERV]; int listen_sock; int flag = 1; if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) return; if (num_listen_socks >= MAX_LISTEN_SOCKS) { logit(LOG_ERR, "Too many listen sockets. Enlarge MAX_LISTEN_SOCKS"); exit(1); } if ((ret = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop, sizeof(ntop), strport, sizeof(strport), NI_NUMERICHOST | NI_NUMERICSERV)) != 0) { logit(LOG_ERR, "getnameinfo failed: %.100s", gai_strerror(ret)); return; } /* Create socket for listening. */ listen_sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if (listen_sock < 0) { /* kernel may not support ipv6 */ logit(LOG_ERR, "socket: %.100s", strerror(errno)); return; } /* socket should be non-blocking */ fcntl(listen_sock, F_SETFL, O_NONBLOCK); /* set the reuse address flag so we don't get errors when restarting */ if (setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &flag, sizeof(flag)) < 0) { logit(LOG_ERR, "setsockopt SO_REUSEADDR: %s", strerror(errno)); return; } #ifdef IPV6_V6ONLY /* Only communicate in IPv6 over AF_INET6 sockets. */ if (ai->ai_family == AF_INET6) { if (setsockopt(listen_sock, IPPROTO_IPV6, IPV6_V6ONLY, &flag, sizeof(flag)) == -1) { fprintf(stderr, "setsockopt IPV6_V6ONLY: %s", strerror(errno)); } } #endif /* Bind the socket to the desired port. */ if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { logit(LOG_ERR, "Bind to port %s on %s failed: %.200s.", strport, ntop, strerror(errno)); close(listen_sock); return; } listen_socks[num_listen_socks] = listen_sock; num_listen_socks++; /* Start listening on the port. */ if (listen(listen_sock, listen_queue_size) < 0) { logit(LOG_ERR, "listen on [%s]:%s: %.100s", ntop, strport, strerror(errno)); exit(1); } logit(LOG_INFO, "Server listening on %s port %s.", ntop, strport); } /* Close all listening sockets */ static void close_listen_socks(void) { int i; for (i = 0; i <= num_listen_socks; i++) { close(listen_socks[i]); num_listen_socks--; } } /* wait for incoming connection requests */ void wait_for_connections(void) { #ifdef HAVE_STRUCT_SOCKADDR_STORAGE struct sockaddr_storage from; #else struct sockaddr from; #endif socklen_t fromlen; fd_set *fdset = NULL; int maxfd = 0, new_sd = 0, i, rc, retval; setup_wait_conn(); /* listen for connection requests - fork() if we get one */ while (1) { /* bail out if necessary */ if (sigrestart == TRUE || sigshutdown == TRUE) break; for (i = 0; i < num_listen_socks; i++) { if (listen_socks[i] > maxfd) maxfd = listen_socks[i]; } if (fdset != NULL) free(fdset); fdset = (fd_set *) calloc(how_many(maxfd + 1, NFDBITS), sizeof(fd_mask)); for (i = 0; i < num_listen_socks; i++) FD_SET(listen_socks[i], fdset); /* Wait in select until there is a connection. */ retval = select(maxfd + 1, fdset, NULL, NULL, NULL); /* bail out if necessary */ if (sigrestart == TRUE || sigshutdown == TRUE) break; /* error */ if (retval < 0) continue; for (i = 0; i < num_listen_socks; i++) { if (!FD_ISSET(listen_socks[i], fdset)) continue; fromlen = (socklen_t)sizeof(from); /* accept a new connection request */ new_sd = accept(listen_socks[i], (struct sockaddr *)&from, &fromlen); /* some kind of error occurred... */ if (new_sd < 0) { /* bail out if necessary */ if (sigrestart == TRUE || sigshutdown == TRUE) break; if (errno == EWOULDBLOCK || errno == EINTR) /* retry */ continue; /* socket is nonblocking and we don't have a connection yet */ if (errno == EAGAIN) continue; if (errno == ENOBUFS) /* fix for HP-UX 11.0 - just retry */ continue; break; /* else handle the error later */ } rc = wait_conn_fork(new_sd); if (rc == TRUE) continue; /* Continue if this is the parent returning */ /* grandchild running here */ conn_check_peer(new_sd); /* handle the client connection */ handle_connection(new_sd); /* log info */ if (debug == TRUE) logit(LOG_DEBUG, "Connection from %s closed.", remote_host); /* close socket prior to exiting */ close(new_sd); exit(STATE_OK); } } /* close the sockets we're listening on */ close_listen_socks(); freeaddrinfo(listen_addrs); listen_addrs = NULL; return; } void setup_wait_conn(void) { struct addrinfo *ai; char addrstr[100]; void *ptr; add_listen_addr(&listen_addrs, address_family, (strcmp(server_address, "") == 0) ? NULL : server_address, server_port); for (ai = listen_addrs; ai; ai = ai->ai_next) { if (debug == TRUE) { inet_ntop (ai->ai_family, ai->ai_addr->sa_data, addrstr, 100); ptr = &((struct sockaddr_in *) ai->ai_addr)->sin_addr; inet_ntop (ai->ai_family, ptr, addrstr, 100); logit(LOG_INFO, "SETUP_WAIT_CONN FOR: IPv4 address: %s (%s)\n", addrstr, ai->ai_canonname); } create_listener(ai); } if (!num_listen_socks) { logit(LOG_ERR, "Cannot bind to any address."); exit(1); } /* log warning about command arguments */ #ifdef ENABLE_COMMAND_ARGUMENTS if (allow_arguments == TRUE) logit(LOG_NOTICE, "Warning: Daemon is configured to accept command arguments from clients!"); # ifdef ENABLE_BASH_COMMAND_SUBSTITUTION if (TRUE == allow_bash_cmd_subst) { if (TRUE == allow_arguments) logit(LOG_NOTICE, "Warning: Daemon is configured to accept command arguments with bash command substitutions!"); else logit(LOG_NOTICE, "Warning: Daemon is configured to accept command arguments with bash command substitutions, but is not configured to accept command arguments from clients. Enable command arguments if you wish to allow command arguments with bash command substitutions."); } # endif #endif logit(LOG_INFO, "Listening for connections on port %d", server_port); if (allowed_hosts) logit(LOG_INFO, "Allowing connections from: %s\n", allowed_hosts); } int wait_conn_fork(int sock) { #ifdef HAVE_SIGACTION struct sigaction sig_action; #endif pid_t pid; /* child process should handle the connection */ pid = fork(); if (pid > 0) { close(sock); /* parent doesn't need the new connection */ waitpid(pid, NULL, 0); /* parent waits for first child to exit */ return TRUE; /* tell caller this is the parent process */ } if (pid < 0) { logit(LOG_ERR, "fork() failed with error %d, bailing out...", errno); exit(STATE_CRITICAL); } /* fork again so we don't create zombies */ pid = fork(); if (pid < 0) { logit(LOG_ERR, "Second fork() failed with error %d, bailing out...", errno); exit(STATE_CRITICAL); } if (pid > 0) { /* first child returns immediately, grandchild is inherited by INIT process -> no zombies... */ exit(STATE_OK); } /* hey, there was an error... */ if (sock < 0) { /* log error */ logit(LOG_ERR, "Network server accept failure (%d: %s)", errno, strerror(errno)); exit(STATE_OK); } /* all good - handle signals */ #ifdef HAVE_SIGACTION sig_action.sa_sigaction = NULL; sig_action.sa_handler = child_sighandler; sigfillset(&sig_action.sa_mask); sig_action.sa_flags = SA_NODEFER | SA_RESTART; sigaction(SIGQUIT, &sig_action, NULL); sigaction(SIGTERM, &sig_action, NULL); sigaction(SIGHUP, &sig_action, NULL); #else /* HAVE_SIGACTION */ signal(SIGQUIT, child_sighandler); signal(SIGTERM, child_sighandler); signal(SIGHUP, child_sighandler); #endif /* HAVE_SIGACTION */ close_listen_socks(); /* grandchild does not need to listen */ return FALSE; /* tell caller this isn't the parent process */ } void conn_check_peer(int sock) { #ifdef HAVE_LIBWRAP struct request_info req; #endif #ifdef HAVE_STRUCT_SOCKADDR_STORAGE struct sockaddr_storage addr; #else struct sockaddr addr; #endif struct sockaddr_in *nptr; struct sockaddr_in6 *nptr6; char ipstr[INET6_ADDRSTRLEN]; socklen_t addrlen; int rc; /* find out who just connected... */ addrlen = sizeof(addr); rc = getpeername(sock, (struct sockaddr *)&addr, &addrlen); if (rc < 0) { /* log error */ logit(LOG_ERR, "Error: Network server getpeername() failure (%d: %s)", errno, strerror(errno)); /* close socket prior to exiting */ close(sock); return; } #ifdef HAVE_STRUCT_SOCKADDR_STORAGE switch (addr.ss_family) { #else switch (addr.sa_family) { #endif case AF_INET: nptr = (struct sockaddr_in *)&addr; strncpy(remote_host, inet_ntoa(nptr->sin_addr), sizeof(remote_host) - 1); remote_host[MAX_HOST_ADDRESS_LENGTH - 1] = '\0'; break; case AF_INET6: nptr6 = (struct sockaddr_in6 *)&addr; if (inet_ntop(AF_INET6, (const void *)&(nptr6->sin6_addr), ipstr, sizeof(ipstr)) == NULL) { strncpy(ipstr, "Unknown", sizeof(ipstr)); } strncpy(remote_host, ipstr, sizeof(remote_host) - 1); remote_host[MAX_HOST_ADDRESS_LENGTH - 1] = '\0'; break; } if (debug == TRUE) logit(LOG_INFO, "CONN_CHECK_PEER: checking if host is allowed: %s port %d\n", remote_host, nptr->sin_port); /* is this host allowed? */ if (allowed_hosts) { #ifdef HAVE_STRUCT_SOCKADDR_STORAGE switch (addr.ss_family) { #else switch (addr.sa_family) { #endif case AF_INET: /* log info */ if (debug == TRUE || (sslprm.log_opts & SSL_LogIpAddr)) logit(LOG_DEBUG, "Connection from %s port %d", remote_host, nptr->sin_port); if (!is_an_allowed_host(AF_INET, (void *)&(nptr->sin_addr))) { /* log error */ logit(LOG_ERR, "Host %s is not allowed to talk to us!", remote_host); /* log info */ if (debug == TRUE) logit(LOG_DEBUG, "Connection from %s closed.", remote_host); /* close socket prior to exiting */ close(sock); exit(STATE_OK); } else { /* log info */ if (debug == TRUE) { logit(LOG_DEBUG, "Host address is in allowed_hosts"); } } break; case AF_INET6: /* log info */ strcpy(remote_host, ipstr); if (debug == TRUE || (sslprm.log_opts & SSL_LogIpAddr)) { logit(LOG_DEBUG, "Connection from %s port %d", ipstr, nptr6->sin6_port); } if (!is_an_allowed_host(AF_INET6, (void *)&(nptr6->sin6_addr))) { /* log error */ logit(LOG_ERR, "Host %s is not allowed to talk to us!", ipstr); /* log info */ if (debug == TRUE) logit(LOG_DEBUG, "Connection from %s closed.", ipstr); /* close socket prior to exiting */ close(sock); exit(STATE_OK); } else { /* log info */ if (debug == TRUE) logit(LOG_DEBUG, "Host address is in allowed_hosts"); } break; } } #ifdef HAVE_LIBWRAP /* Check whether or not connections are allowed from this host */ request_init(&req, RQ_DAEMON, "nrpe", RQ_FILE, sock, 0); fromhost(&req); if (!hosts_access(&req)) { logit(LOG_DEBUG, "Connection refused by TCP wrapper"); refuse(&req); /* refuse the connection */ /* should not be reached */ logit(LOG_ERR, "libwrap refuse() returns!"); close(sock); exit(STATE_CRITICAL); } #endif } /* handles a client connection */ void handle_connection(int sock) { u_int32_t calculated_crc32; command *temp_command; v2_packet receive_packet, send_packet; v3_packet *v3_receive_packet = NULL, *v3_send_packet = NULL; int bytes_to_send; char buffer[MAX_INPUT_BUFFER], *send_buff = NULL, *send_pkt; char raw_command[MAX_INPUT_BUFFER]; char processed_command[MAX_INPUT_BUFFER]; int result = STATE_OK; int early_timeout = FALSE; int rc; int x; int32_t pkt_size; #ifdef DEBUG FILE *errfp; #endif #ifdef HAVE_SSL SSL *ssl = NULL; #endif /* do SSL handshake */ #ifdef HAVE_SSL if (use_ssl == TRUE) { if ((ssl = SSL_new(ctx)) == NULL) { logit(LOG_ERR, "Error: Could not create SSL connection structure."); # ifdef DEBUG errfp = fopen("/tmp/err.log", "a"); ERR_print_errors_fp(errfp); fclose(errfp); # endif return; } if (handle_conn_ssl(sock, ssl) != OK) return; } #endif #ifdef HAVE_SSL rc = read_packet(sock, ssl, &receive_packet, &v3_receive_packet); #else rc = read_packet(sock, NULL, &receive_packet, &v3_receive_packet); #endif /* disable connection alarm - a new alarm will be setup during my_system */ alarm(0); /* recv() error or client disconnect */ if (rc <= 0) { /* log error */ logit(LOG_ERR, "Could not read request from client %s, bailing out...", remote_host); if (v3_receive_packet) free(v3_receive_packet); #ifdef HAVE_SSL if (ssl) { complete_SSL_shutdown(ssl); SSL_free(ssl); logit(LOG_INFO, "INFO: SSL Socket Shutdown.\n"); } #endif return; } /* make sure the request is valid */ if (validate_request(&receive_packet, v3_receive_packet) == ERROR) { /* log an error */ logit(LOG_ERR, "Client request from %s was invalid, bailing out...", remote_host); /* free memory */ free(command_name); command_name = NULL; for (x = 0; x < MAX_COMMAND_ARGUMENTS; x++) { free(macro_argv[x]); macro_argv[x] = NULL; } if (v3_receive_packet) free(v3_receive_packet); #ifdef HAVE_SSL if (ssl) { complete_SSL_shutdown(ssl); SSL_free(ssl); } #endif return; } /* log info */ if (debug == TRUE) logit(LOG_DEBUG, "Host %s is asking for command '%s' to be run...", remote_host, command_name); /* if this is the version check command, just spew it out */ if (!strcmp(command_name, NRPE_HELLO_COMMAND)) { snprintf(buffer, sizeof(buffer), "NRPE v%s", PROGRAM_VERSION); buffer[sizeof(buffer) - 1] = '\x0'; if (debug == TRUE) /* log info */ logit(LOG_DEBUG, "Response to %s: %s", remote_host, buffer); if (v3_receive_packet) send_buff = strdup(buffer); else { send_buff = calloc(1, sizeof(buffer)); strcpy(send_buff, buffer); } result = STATE_OK; } else { /* find the command we're supposed to run */ temp_command = find_command(command_name); if (temp_command == NULL) { snprintf(buffer, sizeof(buffer), "NRPE: Command '%s' not defined", command_name); buffer[sizeof(buffer) - 1] = '\x0'; if (debug == TRUE) /* log error */ logit(LOG_DEBUG, "%s", buffer); if (v3_receive_packet) send_buff = strdup(buffer); else { send_buff = calloc(1, sizeof(buffer)); strcpy(send_buff, buffer); } result = STATE_UNKNOWN; } else { /* process command line */ if (command_prefix == NULL) strncpy(raw_command, temp_command->command_line, sizeof(raw_command) - 1); else snprintf(raw_command, sizeof(raw_command) - 1, "%s %s", command_prefix, temp_command->command_line); raw_command[sizeof(raw_command) - 1] = '\x0'; process_macros(raw_command, processed_command, sizeof(processed_command)); if (debug == TRUE) /* log info */ logit(LOG_DEBUG, "Running command: %s", processed_command); /* run the command */ strcpy(buffer, ""); result = my_system(processed_command, command_timeout, &early_timeout, &send_buff); if (debug == TRUE) /* log debug info */ logit(LOG_DEBUG, "Command completed with return code %d and output: %s", result, send_buff); /* see if the command timed out */ if (early_timeout == TRUE) { sprintf(send_buff, "NRPE: Command timed out after %d seconds\n", command_timeout); result = STATE_UNKNOWN; } else if (!strcmp(send_buff, "")) { sprintf(send_buff, "NRPE: Unable to read output\n"); result = STATE_UNKNOWN; } /* check return code bounds */ if ((result < 0) || (result > 3)) { /* log error */ logit(LOG_ERR, "Bad return code for [%s]: %d", send_buff, result); result = STATE_UNKNOWN; } } } /* free memory */ free(command_name); command_name = NULL; for (x = 0; x < MAX_COMMAND_ARGUMENTS; x++) { free(macro_argv[x]); macro_argv[x] = NULL; } if (v3_receive_packet) free(v3_receive_packet); pkt_size = strlen(send_buff); /* strip newline character from end of output buffer */ if (send_buff[strlen(send_buff) - 1] == '\n') send_buff[strlen(send_buff) - 1] = '\x0'; if (packet_ver == NRPE_PACKET_VERSION_2) { pkt_size = sizeof(v2_packet); send_pkt = (char *)&send_packet; /* clear the response packet buffer */ memset(&send_packet, 0, sizeof(send_packet)); /* fill the packet with semi-random data */ randomize_buffer((char *)&send_packet, sizeof(send_packet)); /* initialize response packet data */ send_packet.packet_version = htons(packet_ver); send_packet.packet_type = htons(RESPONSE_PACKET); send_packet.result_code = htons(result); strncpy(&send_packet.buffer[0], send_buff, MAX_PACKETBUFFER_LENGTH); send_packet.buffer[MAX_PACKETBUFFER_LENGTH - 1] = '\x0'; /* calculate the crc 32 value of the packet */ send_packet.crc32_value = 0; calculated_crc32 = calculate_crc32((char *)&send_packet, sizeof(send_packet)); send_packet.crc32_value = htonl(calculated_crc32); } else { pkt_size = (sizeof(v3_packet) - NRPE_V4_PACKET_SIZE_OFFSET) + strlen(send_buff) + 1; if (packet_ver == NRPE_PACKET_VERSION_3) { pkt_size = (sizeof(v3_packet) - NRPE_V3_PACKET_SIZE_OFFSET) + strlen(send_buff) + 1; } v3_send_packet = calloc(1, pkt_size); send_pkt = (char *)v3_send_packet; /* initialize response packet data */ v3_send_packet->packet_version = htons(packet_ver); v3_send_packet->packet_type = htons(RESPONSE_PACKET); v3_send_packet->result_code = htons(result); v3_send_packet->alignment = 0; v3_send_packet->buffer_length = htonl(strlen(send_buff) + 1); strcpy(&v3_send_packet->buffer[0], send_buff); /* calculate the crc 32 value of the packet */ v3_send_packet->crc32_value = 0; calculated_crc32 = calculate_crc32((char *)v3_send_packet, pkt_size); v3_send_packet->crc32_value = htonl(calculated_crc32); } /* send the response back to the client */ bytes_to_send = pkt_size; if (use_ssl == FALSE) sendall(sock, send_pkt, &bytes_to_send); #ifdef HAVE_SSL else SSL_write(ssl, send_pkt, bytes_to_send); #endif #ifdef HAVE_SSL if (ssl) { complete_SSL_shutdown(ssl); SSL_free(ssl); } #endif if (v3_send_packet) free(v3_send_packet); /* log info */ if (debug == TRUE) logit(LOG_DEBUG, "Return Code: %d, Output: %s", result, send_buff); free(send_buff); return; } void init_handle_conn(void) { #ifdef HAVE_SIGACTION struct sigaction sig_action; #endif /* log info */ if (debug == TRUE) logit(LOG_DEBUG, "Handling the connection..."); /* set connection handler */ #ifdef HAVE_SIGACTION sig_action.sa_sigaction = NULL; sig_action.sa_handler = my_connection_sighandler; sigfillset(&sig_action.sa_mask); sig_action.sa_flags = SA_NODEFER | SA_RESTART; sigaction(SIGALRM, &sig_action, NULL); #else signal(SIGALRM, my_connection_sighandler); #endif /* HAVE_SIGACTION */ alarm(connection_timeout); } int handle_conn_ssl(int sock, void *ssl_ptr) { #ifdef HAVE_SSL # if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux) SSL_CIPHER *c; #else const SSL_CIPHER *c; #endif const char *errmsg = NULL; char buffer[MAX_INPUT_BUFFER]; SSL *ssl = (SSL*)ssl_ptr; X509 *peer; int rc, x, sockfd, retval; fd_set rfds; struct timeval timeout; SSL_set_fd(ssl, sock); sockfd = SSL_get_fd(ssl); FD_ZERO(&rfds); FD_SET(sockfd, &rfds); timeout.tv_sec = connection_timeout; timeout.tv_usec = 0; /* keep attempting the request if needed */ do { retval = select(sockfd + 1, &rfds, NULL, NULL, &timeout); if (retval > 0) { rc = SSL_accept(ssl); } else { logit(LOG_ERR, "Error: (!log_opts) Could not complete SSL handshake with %s: timeout %d seconds", remote_host, connection_timeout); return ERROR; } } while (SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ); if (rc != 1) { /* oops, got an unrecoverable error -- get out */ if (sslprm.log_opts & (SSL_LogCertDetails | SSL_LogIfClientCert)) { int nerrs = 0; rc = 0; while ((x = ERR_get_error_line_data(NULL, NULL, NULL, NULL)) != 0) { errmsg = ERR_reason_error_string(x); logit(LOG_ERR, "Error: (ERR_get_error_line_data = %d), Could not complete SSL handshake with %s: %s", x, remote_host, errmsg); if (errmsg && !strcmp(errmsg, "no shared cipher") && (sslprm.cert_file == NULL || sslprm.cacert_file == NULL)) logit(LOG_ERR, "Error: This could be because you have not specified certificate or ca-certificate files"); ++nerrs; } if (nerrs == 0) { logit(LOG_ERR, "Error: (nerrs = 0) Could not complete SSL handshake with %s: %d", remote_host, SSL_get_error(ssl, rc)); } } else { logit(LOG_ERR, "Error: (!log_opts) Could not complete SSL handshake with %s: %d", remote_host, SSL_get_error(ssl, rc)); } # ifdef DEBUG errfp = fopen("/tmp/err.log", "a"); ERR_print_errors_fp(errfp); fclose(errfp); # endif return ERROR; } /* successful handshake */ if (sslprm.log_opts & SSL_LogVersion) logit(LOG_NOTICE, "Remote %s - SSL Version: %s", remote_host, SSL_get_version(ssl)); if (sslprm.log_opts & SSL_LogCipher) { c = SSL_get_current_cipher(ssl); logit(LOG_NOTICE, "Remote %s - %s, Cipher is %s", remote_host, SSL_CIPHER_get_version(c), SSL_CIPHER_get_name(c)); } if ((sslprm.log_opts & SSL_LogIfClientCert) || (sslprm.log_opts & SSL_LogCertDetails)) { peer = SSL_get_peer_certificate(ssl); if (peer) { if (sslprm.log_opts & SSL_LogIfClientCert) logit(LOG_NOTICE, "SSL Client %s has %s certificate", remote_host, SSL_get_verify_result(ssl) == X509_V_OK ? "a valid" : "an invalid"); if (sslprm.log_opts & SSL_LogCertDetails) { X509_NAME_oneline(X509_get_subject_name(peer), buffer, sizeof(buffer)); logit(LOG_NOTICE, "SSL Client %s Cert Name: %s", remote_host, buffer); X509_NAME_oneline(X509_get_issuer_name(peer), buffer, sizeof(buffer)); logit(LOG_NOTICE, "SSL Client %s Cert Issuer: %s", remote_host, buffer); } } else if (sslprm.client_certs == 0) logit(LOG_NOTICE, "SSL Not asking for client certification"); else logit(LOG_NOTICE, "SSL Client %s did not present a certificate", remote_host); } #endif return OK; } int read_packet(int sock, void *ssl_ptr, v2_packet * v2_pkt, v3_packet ** v3_pkt) { int32_t common_size, tot_bytes, bytes_to_recv, buffer_size; int rc; char *buff_ptr; /* Read only the part that's common between versions 2 & 3 */ common_size = tot_bytes = bytes_to_recv = (char *)&v2_pkt->buffer - (char *)v2_pkt; if (use_ssl == FALSE) { rc = recvall(sock, (char *)v2_pkt, &tot_bytes, socket_timeout); if (rc <= 0 || rc != bytes_to_recv) return -1; packet_ver = ntohs(v2_pkt->packet_version); if (packet_ver != NRPE_PACKET_VERSION_2 && packet_ver != NRPE_PACKET_VERSION_4) { logit(LOG_ERR, "Error: (use_ssl == false): Request packet version was invalid!"); return -1; } if (packet_ver == NRPE_PACKET_VERSION_2) { buffer_size = sizeof(v2_packet) - common_size; buff_ptr = (char *)v2_pkt + common_size; } else { int32_t pkt_size = sizeof(v3_packet) - 1; /* Read the alignment filler */ bytes_to_recv = sizeof(int16_t); rc = recvall(sock, (char *)&buffer_size, &bytes_to_recv, socket_timeout); if (rc <= 0 || bytes_to_recv != sizeof(int16_t)) return -1; tot_bytes += rc; /* Read the buffer size */ bytes_to_recv = sizeof(buffer_size); rc = recvall(sock, (char *)&buffer_size, &bytes_to_recv, socket_timeout); if (rc <= 0 || bytes_to_recv != sizeof(buffer_size)) return -1; tot_bytes += rc; buffer_size = ntohl(buffer_size); if (buffer_size < 0 || buffer_size > 65536) { logit(LOG_ERR, "Error: (use_ssl == false): Received packet with invalid buffer size"); return -1; } pkt_size += buffer_size; if ((*v3_pkt = calloc(1, pkt_size)) == NULL) { logit(LOG_ERR, "Error: (use_ssl == false): Could not allocate memory for packet"); return -1; } memcpy(*v3_pkt, v2_pkt, common_size); (*v3_pkt)->buffer_length = htonl(buffer_size); buff_ptr = (*v3_pkt)->buffer; } bytes_to_recv = buffer_size; rc = recvall(sock, buff_ptr, &bytes_to_recv, socket_timeout); if (rc <= 0 || rc != buffer_size) { if (packet_ver == NRPE_PACKET_VERSION_3) { free(*v3_pkt); *v3_pkt = NULL; } return -1; } else tot_bytes += rc; } #ifdef HAVE_SSL else { SSL *ssl = (SSL *) ssl_ptr; int sockfd, retval; fd_set rfds; struct timeval timeout; sockfd = SSL_get_fd(ssl); FD_ZERO(&rfds); FD_SET(sockfd, &rfds); timeout.tv_sec = connection_timeout; timeout.tv_usec = 0; do { retval = select(sockfd + 1, &rfds, NULL, NULL, &timeout); if (retval > 0) { rc = SSL_read(ssl, v2_pkt, bytes_to_recv); } else { logit(LOG_ERR, "Error (!log_opts): Could not complete SSL_read with %s: timeout %d seconds", remote_host, connection_timeout); return -1; } } while (SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ); if (rc <= 0 || rc != bytes_to_recv) return -1; packet_ver = ntohs(v2_pkt->packet_version); if (packet_ver != NRPE_PACKET_VERSION_2 && packet_ver != NRPE_PACKET_VERSION_4) { logit(LOG_ERR, "Error: (use_ssl == true): Request packet version was invalid!"); return -1; } if (packet_ver == NRPE_PACKET_VERSION_2) { buffer_size = sizeof(v2_packet) - common_size; buff_ptr = (char *)v2_pkt + common_size; } else { int32_t pkt_size = sizeof(v3_packet); if (packet_ver == NRPE_PACKET_VERSION_3) { pkt_size -= NRPE_V3_PACKET_SIZE_OFFSET; } else if (packet_ver == NRPE_PACKET_VERSION_4) { pkt_size -= NRPE_V4_PACKET_SIZE_OFFSET; } /* Read the alignment filler */ bytes_to_recv = sizeof(int16_t); while (((rc = SSL_read(ssl, &buffer_size, bytes_to_recv)) <= 0) && (SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ)) { } if (rc <= 0 || bytes_to_recv != sizeof(int16_t)) return -1; tot_bytes += rc; /* Read the buffer size */ bytes_to_recv = sizeof(buffer_size); while (((rc = SSL_read(ssl, &buffer_size, bytes_to_recv)) <= 0) && (SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ)) { } if (rc <= 0 || bytes_to_recv != sizeof(buffer_size)) return -1; tot_bytes += rc; buffer_size = ntohl(buffer_size); if (buffer_size < 0 || buffer_size > 65536) { logit(LOG_ERR, "Error: (use_ssl == true): Received packet with invalid buffer size"); return -1; } pkt_size += buffer_size; if ((*v3_pkt = calloc(1, pkt_size)) == NULL) { logit(LOG_ERR, "Error: (use_ssl == true): Could not allocate memory for packet"); return -1; } memcpy(*v3_pkt, v2_pkt, common_size); (*v3_pkt)->buffer_length = htonl(buffer_size); buff_ptr = (*v3_pkt)->buffer; } bytes_to_recv = buffer_size; while (((rc = SSL_read(ssl, buff_ptr, bytes_to_recv)) <= 0) && (SSL_get_error(ssl, rc) == SSL_ERROR_WANT_READ)) { } if (rc <= 0 || rc != buffer_size) { if (packet_ver == NRPE_PACKET_VERSION_3) { free(*v3_pkt); *v3_pkt = NULL; } return -1; } else tot_bytes += rc; } #endif return tot_bytes; } /* free all allocated memory */ void free_memory(void) { command *this_command; command *next_command; /* free memory for the command list */ this_command = command_list; while (this_command != NULL) { next_command = this_command->next; if (this_command->command_name) free(this_command->command_name); if (this_command->command_line) free(this_command->command_line); free(this_command); this_command = next_command; } command_list = NULL; return; } /* executes a system command via popen(), but protects against timeouts */ int my_system(char *command, int timeout, int *early_timeout, char **output) { FILE *fp; pid_t pid; time_t start_time, end_time; int status; int result; char buffer[MAX_INPUT_BUFFER]; int fd[2]; int bytes_read = 0, tot_bytes = 0; int output_size; #ifdef HAVE_SIGACTION struct sigaction sig_action; #endif *early_timeout = FALSE; /* initialize return variables */ if (command == NULL) /* if no command was passed, return with no error */ return STATE_OK; /* make sure that we are within max_commands boundaries before attempting */ if (max_commands != 0) { while (commands_running >= max_commands) { logit(LOG_WARNING, "Commands choked. Sleeping 1s - commands_running: %d, max_commands: %d", commands_running, max_commands); sleep(1); } } /* create a pipe */ if (pipe(fd) == -1) { logit(LOG_ERR, "ERROR: pipe(): %s, bailing out...", strerror(errno)); exit(STATE_CRITICAL); } /* make the pipe non-blocking */ fcntl(fd[0], F_SETFL, O_NONBLOCK); fcntl(fd[1], F_SETFL, O_NONBLOCK); time(&start_time); /* get the command start time */ pid = fork(); /* fork */ /* return an error if we couldn't fork */ if (pid == -1) { snprintf(buffer, sizeof(buffer) - 1, "NRPE: Call to fork() failed\n"); buffer[sizeof(buffer) - 1] = '\x0'; if (packet_ver == NRPE_PACKET_VERSION_2) { int output_size = sizeof(v2_packet); *output = calloc(1, output_size); strncpy(*output, buffer, output_size - 1); *output[output_size - 1] = '\0'; } else *output = strdup(buffer); /* close both ends of the pipe */ close(fd[0]); close(fd[1]); return STATE_UNKNOWN; } /* execute the command in the child process */ if (pid == 0) { /* get root back so the next call works correctly */ 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 */ setpgid(0, 0); /* become process group leader */ /* trap commands that timeout */ #ifdef HAVE_SIGACTION sig_action.sa_sigaction = NULL; sig_action.sa_handler = my_system_sighandler; sigfillset(&sig_action.sa_mask); sig_action.sa_flags = SA_NODEFER | SA_RESTART; sigaction(SIGALRM, &sig_action, NULL); #else signal(SIGALRM, my_system_sighandler); #endif /* HAVE_SIGACTION */ alarm(timeout); fp = popen(command, "r"); /* run the command */ /* report an error if we couldn't run the command */ if (fp == NULL) { strncpy(buffer, "NRPE: Call to popen() failed\n", sizeof(buffer) - 1); buffer[sizeof(buffer) - 1] = '\x0'; /* write the error back to the parent process */ if (write(fd[1], buffer, strlen(buffer) + 1) == -1) logit(LOG_ERR, "ERROR: my_system() write(fd, buffer)-1 failed..."); result = STATE_CRITICAL; } else { /* read all lines of output - supports Nagios 3.x multiline output */ while ((bytes_read = fread(buffer, 1, sizeof(buffer) - 1, fp)) > 0) { /* write the output back to the parent process */ if (write(fd[1], buffer, bytes_read) == -1) logit(LOG_ERR, "ERROR: my_system() write(fd, buffer)-2 failed..."); } if (write(fd[1], "\0", 1) == -1) logit(LOG_ERR, "ERROR: my_system() write(fd, NULL) failed..."); status = pclose(fp); /* close the command and get termination status */ /* report an error if we couldn't close the command */ if (status == -1) result = STATE_CRITICAL; else if (!WIFEXITED(status)) /* report an error if child died due to signal (Klas Lindfors) */ result = STATE_CRITICAL; else result = WEXITSTATUS(status); } close(fd[1]); /* close pipe for writing */ alarm(0); /* reset the alarm */ exit(result); /* return plugin exit code to parent process */ } else { /* parent waits for child to finish executing command */ commands_running++; close(fd[1]); /* close pipe for writing */ waitpid(pid, &status, 0); /* wait for child to exit */ time(&end_time); /* get the end time for running the command */ result = WEXITSTATUS(status); /* get the exit code returned from the program */ /* because of my idiotic idea of having UNKNOWN states be equivalent to -1, I must hack things a bit... */ if (result == 255) result = STATE_UNKNOWN; /* check bounds on the return value */ if (result < 0 || result > 3) result = STATE_UNKNOWN; if (packet_ver == NRPE_PACKET_VERSION_2) { output_size = sizeof(v2_packet); *output = calloc(1, output_size); } else { output_size = 1024 * 64; /* Maximum buffer is 64K */ *output = calloc(1, output_size); } /* try and read the results from the command output (retry if we encountered a signal) */ for (;;) { bytes_read = read(fd[0], buffer, sizeof(buffer) - 1); if (bytes_read == 0) break; if (bytes_read == -1) { if (errno == EINTR) continue; else break; } if (tot_bytes < output_size) /* If buffer is full, discard the rest */ strncat(*output, buffer, output_size - tot_bytes - 1); tot_bytes += bytes_read; } (*output)[output_size - 1] = '\0'; /* if there was a critical return code and no output AND the * command time exceeded the timeout thresholds, assume a timeout */ if (result == STATE_CRITICAL && bytes_read == -1 && (end_time - start_time) >= timeout) { *early_timeout = TRUE; /* send termination signal to child process group */ kill((pid_t) (-pid), SIGTERM); kill((pid_t) (-pid), SIGKILL); } close(fd[0]); /* close the pipe for reading */ commands_running--; } #ifdef DEBUG printf("my_system() end\n"); #endif return result; } /* handle timeouts when executing commands via my_system() */ void my_system_sighandler(int sig) { exit(STATE_CRITICAL); /* force the child process to exit... */ } /* handle errors where connection takes too long */ void my_connection_sighandler(int sig) { logit(LOG_ERR, "Connection has taken too long to establish. Exiting..."); exit(STATE_CRITICAL); } /* drops privileges */ int drop_privileges(char *user, char *group, int full_drop) { uid_t uid = (uid_t)-1; gid_t gid = (gid_t)-1; struct group *grp; struct passwd *pw; if (use_inetd == TRUE) return OK; /* set effective group ID */ if (group != NULL) { /* see if this is a group name */ if (strspn(group, "0123456789") < strlen(group)) { grp = (struct group *)getgrnam(group); if (grp != NULL) gid = (gid_t) (grp->gr_gid); else logit(LOG_ERR, "Warning: Could not get group entry for '%s'", group); endgrent(); } else /* else we were passed the GID */ gid = (gid_t) atoi(group); /* set effective group ID if other than current EGID */ if (gid != getegid()) { if (setgid(gid) == -1) logit(LOG_ERR, "Warning: Could not set effective GID=%d", (int)gid); } } /* set effective user ID */ if (user != NULL) { /* see if this is a user name */ if (strspn(user, "0123456789") < strlen(user)) { pw = (struct passwd *)getpwnam(user); if (pw != NULL) uid = (uid_t) (pw->pw_uid); else logit(LOG_ERR, "Warning: Could not get passwd entry for '%s'", user); endpwent(); } else /* else we were passed the UID */ uid = (uid_t) atoi(user); if (uid != geteuid()) { /* set effective user ID if other than current EUID */ #ifdef HAVE_INITGROUPS /* initialize supplementary groups */ if (initgroups(user, gid) == -1) { if (errno == EPERM) logit(LOG_ERR, "Warning: Unable to change supplementary groups using initgroups()"); else { logit(LOG_ERR, "Warning: Possibly root user failed dropping privileges with initgroups()"); return ERROR; } } #endif if (full_drop) { if (setuid(uid) == -1) logit(LOG_ERR, "Warning: Could not set UID=%d", (int)uid); } else if (SETEUID(uid) == -1) logit(LOG_ERR, "Warning: Could not set effective UID=%d", (int)uid); } } return OK; } /* write an optional pid file */ int write_pid_file(void) { int fd; int result = 0; pid_t pid = 0; char pbuf[16]; /* no pid file was specified */ if (pid_file == NULL) return OK; /* read existing pid file */ if ((fd = open(pid_file, O_RDONLY)) >= 0) { result = read(fd, pbuf, (sizeof pbuf) - 1); close(fd); if (result > 0) { pbuf[result] = '\x0'; pid = (pid_t) atoi(pbuf); /* if previous process is no longer running running, remove the old pid file */ if (pid && (pid == getpid() || kill(pid, 0) < 0)) unlink(pid_file); else { /* previous process is still running */ logit(LOG_ERR, "There's already an NRPE server running (PID %lu). Bailing out...", (unsigned long)pid); return ERROR; } } } /* write new pid file */ if ((fd = open(pid_file, O_WRONLY | O_CREAT, 0644)) >= 0) { sprintf(pbuf, "%d\n", (int)getpid()); if (write(fd, pbuf, strlen(pbuf)) == -1) logit(LOG_ERR, "ERROR: write_pid_file() write(fd, pbuf) failed..."); close(fd); wrote_pid_file = TRUE; } else { logit(LOG_ERR, "Cannot write to pidfile '%s' - check your privileges.", pid_file); return ERROR; } return OK; } /* remove pid file */ int remove_pid_file(void) { if (pid_file == NULL) return OK; /* no pid file was specified */ if (wrote_pid_file == FALSE) return OK; /* pid file was not written */ /* get root back so we can delete the pid file */ 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); return ERROR; } return OK; } #ifdef HAVE_SSL void my_disconnect_sighandler(int sig) { logit(LOG_ERR, "SSL_shutdown() has taken too long to complete. Exiting now.."); exit(STATE_CRITICAL); } void complete_SSL_shutdown(SSL * ssl) { /* Thanks to Jari Takkala (jtakkala@gmail.com) for the following information. We need to call SSL_shutdown() at least twice, otherwise we'll be left with data in the socket receive buffer, and the subsequent process termination will cause TCP RST's to be sent to the client. See http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/32219/diff for more information. */ int x; /* set disconnection handler */ signal(SIGALRM, my_disconnect_sighandler); alarm(ssl_shutdown_timeout); for (x = 0; x < 4; x++) { if (SSL_shutdown(ssl)) break; } alarm(0); } #endif /*HAVE_SSL */ /* bail if daemon is running as root */ int check_privileges(void) { uid_t uid = geteuid(); gid_t gid = getegid(); if (uid == 0 || gid == 0) { logit(LOG_ERR, "Error: NRPE daemon cannot be run as user/group root!"); exit(STATE_CRITICAL); } return OK; } /* handle signals (parent process) */ void sighandler(int sig) { static char *sigs[] = { "EXIT", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "UNUSED", "ZERR", "DEBUG", (char *)NULL }; int i; if (sig < 0) sig = -sig; for (i = 0; sigs[i] != (char *)NULL; i++) ; sig %= i; /* we received a SIGHUP, so restart... */ if (sig == SIGHUP) { sigrestart = TRUE; logit(LOG_NOTICE, "Caught SIGHUP - restarting...\n"); } /* else begin shutting down... */ if (sig == SIGTERM) { /* if shutdown is already true, we're in a signal trap loop! */ if (sigshutdown == TRUE) exit(STATE_CRITICAL); sigshutdown = TRUE; logit(LOG_NOTICE, "Caught SIG%s - shutting down...\n", sigs[sig]); } return; } /* handle signals (child processes) */ void child_sighandler(int sig) { exit(0); /* terminate */ } /* tests whether or not a client request is valid */ int validate_request(v2_packet * v2pkt, v3_packet * v3pkt) { u_int32_t packet_crc32; u_int32_t calculated_crc32; int32_t pkt_size, buffer_size; char *buff, *ptr; int rc; #ifdef ENABLE_COMMAND_ARGUMENTS int x; #endif /* check the crc 32 value */ if (packet_ver >= NRPE_PACKET_VERSION_3) { buffer_size = ntohl(v3pkt->buffer_length); pkt_size = sizeof(v3_packet); pkt_size -= (packet_ver == NRPE_PACKET_VERSION_3 ? NRPE_V3_PACKET_SIZE_OFFSET : NRPE_V4_PACKET_SIZE_OFFSET); pkt_size += buffer_size; packet_crc32 = ntohl(v3pkt->crc32_value); v3pkt->crc32_value = 0L; v3pkt->alignment = 0; calculated_crc32 = calculate_crc32((char *)v3pkt, pkt_size); } else { packet_crc32 = ntohl(v2pkt->crc32_value); v2pkt->crc32_value = 0L; calculated_crc32 = calculate_crc32((char *)v2pkt, sizeof(v2_packet)); } if (packet_crc32 != calculated_crc32) { logit(LOG_ERR, "Error: Request packet had invalid CRC32."); return ERROR; } /* make sure this is the right type of packet */ if (ntohs(v2pkt->packet_type) != QUERY_PACKET) { logit(LOG_ERR, "Error: Request packet type was invalid!"); return ERROR; } /* make sure buffer is terminated */ if (packet_ver >= NRPE_PACKET_VERSION_3) { int32_t l = ntohs(v3pkt->buffer_length); v3pkt->buffer[l - 1] = '\x0'; buff = v3pkt->buffer; } else { v2pkt->buffer[MAX_PACKETBUFFER_LENGTH - 1] = '\x0'; buff = v2pkt->buffer; } /* client must send some kind of request */ if (buff[0] == '\0') { logit(LOG_ERR, "Error: Request contained no query!"); return ERROR; } /* make sure request doesn't contain nasties */ if (packet_ver >= NRPE_PACKET_VERSION_3) rc = contains_nasty_metachars(v3pkt->buffer); else rc = contains_nasty_metachars(v2pkt->buffer); if (rc == TRUE) { logit(LOG_ERR, "Error: Request contained illegal metachars!"); return ERROR; } /* make sure the request doesn't contain arguments */ if (strchr(buff, '!')) { #ifdef ENABLE_COMMAND_ARGUMENTS if (allow_arguments == FALSE) { logit(LOG_ERR, "Error: Request contained command arguments, but argument option is not enabled!"); return ERROR; } #else logit(LOG_ERR, "Error: Request contained command arguments!"); return ERROR; #endif } /* get command name */ #ifdef ENABLE_COMMAND_ARGUMENTS ptr = strtok(buff, "!"); #else ptr = buff; #endif command_name = strdup(ptr); if (command_name == NULL) { logit(LOG_ERR, "Error: Memory allocation failed"); return ERROR; } #ifdef ENABLE_COMMAND_ARGUMENTS /* get command arguments */ if (allow_arguments == TRUE) { for (x = 0; x < MAX_COMMAND_ARGUMENTS; x++) { ptr = strtok(NULL, "!"); if (ptr == NULL) break; macro_argv[x] = strdup(ptr); if (macro_argv[x] == NULL) { logit(LOG_ERR, "Error: Memory allocation failed"); return ERROR; } if (!strcmp(macro_argv[x], "")) { logit(LOG_ERR, "Error: Request contained an empty command argument"); return ERROR; } if (strstr(macro_argv[x], "$(")) { # ifndef ENABLE_BASH_COMMAND_SUBSTITUTION logit(LOG_ERR, "Error: Request contained a bash command substitution!"); return ERROR; # else if (FALSE == allow_bash_cmd_subst) { logit(LOG_ERR, "Error: Request contained a bash command substitution, but they are disallowed!"); return ERROR; } # endif } } } #endif return OK; } /* tests whether a buffer contains illegal metachars */ int contains_nasty_metachars(char *str) { int result; if (str == NULL) return FALSE; result = strcspn(str, nasty_metachars); if (result != strlen(str)) return TRUE; return FALSE; } /* replace macros in buffer */ int process_macros(char *input_buffer, char *output_buffer, int buffer_length) { char *temp_buffer; int in_macro; int arg_index = 0; char *selected_macro = NULL; strcpy(output_buffer, ""); in_macro = FALSE; for (temp_buffer = my_strsep(&input_buffer, "$"); temp_buffer != NULL; temp_buffer = my_strsep(&input_buffer, "$")) { selected_macro = NULL; if (in_macro == FALSE) { if (strlen(output_buffer) + strlen(temp_buffer) < buffer_length - 1) { strncat(output_buffer, temp_buffer, buffer_length - strlen(output_buffer) - 1); output_buffer[buffer_length - 1] = '\x0'; } in_macro = TRUE; } else { if (strlen(output_buffer) + strlen(temp_buffer) < buffer_length - 1) { /* argument macro */ if (strstr(temp_buffer, "ARG") == temp_buffer) { arg_index = atoi(temp_buffer + 3); if (arg_index >= 1 && arg_index <= MAX_COMMAND_ARGUMENTS) selected_macro = macro_argv[arg_index - 1]; } else if (!strcmp(temp_buffer, "")) { /* an escaped $ is done by specifying two $$ next to each other */ strncat(output_buffer, "$", buffer_length - strlen(output_buffer) - 1); } else { /* a non-macro, just some user-defined string between two $s */ strncat(output_buffer, "$", buffer_length - strlen(output_buffer) - 1); output_buffer[buffer_length - 1] = '\x0'; strncat(output_buffer, temp_buffer, buffer_length - strlen(output_buffer) - 1); output_buffer[buffer_length - 1] = '\x0'; strncat(output_buffer, "$", buffer_length - strlen(output_buffer) - 1); } /* insert macro */ if (selected_macro != NULL) strncat(output_buffer, (selected_macro == NULL) ? "" : selected_macro, buffer_length - strlen(output_buffer) - 1); output_buffer[buffer_length - 1] = '\x0'; } in_macro = FALSE; } } return OK; } /* process command line arguments */ int process_arguments(int argc, char **argv) { char optchars[MAX_INPUT_BUFFER]; int c = 1; int have_mode = FALSE; #ifdef HAVE_GETOPT_LONG int option_index = 0; static struct option long_options[] = { {"config", required_argument, 0, 'c'}, {"inetd", no_argument, 0, 'i'}, /* To compatibility between short and long options but not used on AIX */ {"src", no_argument, 0, 's'}, {"no-forking", no_argument, 0, 'f'}, {"4", no_argument, 0, '4'}, {"ipv6", no_argument, 0, '6'}, {"daemon", no_argument, 0, 'd'}, {"no-ssl", no_argument, 0, 'n'}, {"help", no_argument, 0, 'h'}, {"license", no_argument, 0, 'l'}, {"version", no_argument, 0, 'V'}, {0, 0, 0, 0} }; #endif /* no options were supplied */ if (argc < 2) return ERROR; snprintf(optchars, MAX_INPUT_BUFFER, "c:hVldi46nsf"); while (1) { #ifdef HAVE_GETOPT_LONG c = getopt_long(argc, argv, optchars, long_options, &option_index); #else c = getopt(argc, argv, optchars); #endif if (c == -1 || c == EOF) break; /* process all arguments */ switch (c) { case '?': case 'h': show_help = TRUE; break; case 'V': show_version = TRUE; have_mode = TRUE; break; case 'l': show_license = TRUE; break; case 'c': strncpy(config_file, optarg, sizeof(config_file)); config_file[sizeof(config_file) - 1] = '\x0'; break; case 'd': use_inetd = FALSE; have_mode = TRUE; break; case 'i': use_inetd = TRUE; have_mode = TRUE; break; case '4': address_family = AF_INET; break; case '6': address_family = AF_INET6; break; case 'n': use_ssl = FALSE; break; case 's': /* Argument s to indicate SRC option */ use_src = TRUE; have_mode = TRUE; break; case 'f': use_inetd = FALSE; no_forking = TRUE; have_mode = TRUE; break; default: return ERROR; } } /* bail if we didn't get required args */ if (have_mode == FALSE) return ERROR; return OK; } nrpe-nrpe-4.0.3/src/snprintf.c000066400000000000000000001031661365211572000162330ustar00rootroot00000000000000/* * NOTE: If you change this file, please merge it into rsync, samba, etc. */ /* * Copyright Patrick Powell 1995 * This code is based on code written by Patrick Powell (papowell@astart.com) * It may be used for any purpose as long as this notice remains intact * on all source code distributions */ /************************************************************** * Original: * Patrick Powell Tue Apr 11 09:48:21 PDT 1995 * A bombproof version of doprnt (dopr) included. * Sigh. This sort of thing is always nasty do deal with. Note that * the version here does not include floating point... * * snprintf() is used instead of sprintf() as it does limit checks * for string length. This covers a nasty loophole. * * The other functions are there to prevent NULL pointers from * causing nast effects. * * More Recently: * Brandon Long 9/15/96 for mutt 0.43 * This was ugly. It is still ugly. I opted out of floating point * numbers, but the formatter understands just about everything * from the normal C string format, at least as far as I can tell from * the Solaris 2.5 printf(3S) man page. * * Brandon Long 10/22/97 for mutt 0.87.1 * Ok, added some minimal floating point support, which means this * probably requires libm on most operating systems. Don't yet * support the exponent (e,E) and sigfig (g,G). Also, fmtint() * was pretty badly broken, it just wasn't being exercised in ways * which showed it, so that's been fixed. Also, formated the code * to mutt conventions, and removed dead code left over from the * original. Also, there is now a builtin-test, just compile with: * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm * and run snprintf for results. * * Thomas Roessler 01/27/98 for mutt 0.89i * The PGP code was using unsigned hexadecimal formats. * Unfortunately, unsigned formats simply didn't work. * * Michael Elkins 03/05/98 for mutt 0.90.8 * The original code assumed that both snprintf() and vsnprintf() were * missing. Some systems only have snprintf() but not vsnprintf(), so * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF. * * Andrew Tridgell (tridge@samba.org) Oct 1998 * fixed handling of %.0f * added test for HAVE_LONG_DOUBLE * * tridge@samba.org, idra@samba.org, April 2001 * got rid of fcvt code (twas buggy and made testing harder) * added C99 semantics * * date: 2002/12/19 19:56:31; author: herb; state: Exp; lines: +2 -0 * actually print args for %g and %e * * date: 2002/06/03 13:37:52; author: jmcd; state: Exp; lines: +8 -0 * Since includes.h isn't included here, VA_COPY has to be defined here. I don't * see any include file that is guaranteed to be here, so I'm defining it * locally. Fixes AIX and Solaris builds. * * date: 2002/06/03 03:07:24; author: tridge; state: Exp; lines: +5 -13 * put the ifdef for HAVE_VA_COPY in one place rather than in lots of * functions * * date: 2002/05/17 14:51:22; author: jmcd; state: Exp; lines: +21 -4 * Fix usage of va_list passed as an arg. Use __va_copy before using it * when it exists. * * date: 2002/04/16 22:38:04; author: idra; state: Exp; lines: +20 -14 * Fix incorrect zpadlen handling in fmtfp. * Thanks to Ollie Oldham for spotting it. * few mods to make it easier to compile the tests. * added the "Ollie" test to the floating point ones. * * Martin Pool (mbp@samba.org) April 2003 * Remove NO_CONFIG_H so that the test case can be built within a source * tree with less trouble. * Remove unnecessary SAFE_FREE() definition. * * Martin Pool (mbp@samba.org) May 2003 * Put in a prototype for dummy_snprintf() to quiet compiler warnings. * * Move #endif to make sure VA_COPY, LDOUBLE, etc are defined even * if the C library has some snprintf functions already. * * Darren Tucker (dtucker@zip.com.au) 2005 * Fix bug allowing read overruns of the source string with "%.*s" * Usually harmless unless the read runs outside the process' allocation * (eg if your malloc does guard pages) in which case it will segfault. * From OpenSSH. Also added test for same. * * Simo Sorce (idra@samba.org) Jan 2006 * * Add support for position independent parameters * fix fmtstr now it conforms to sprintf wrt min.max * **************************************************************/ #ifndef NO_CONFIG_H /* 08/13/2007 EG changed path to config.h to match NRPE distro */ #include "../include/config.h" #else #define NULL 0 #endif #ifdef TEST_SNPRINTF /* need math library headers for testing */ /* In test mode, we pretend that this system doesn't have any snprintf * functions, regardless of what config.h says. */ # undef HAVE_SNPRINTF # undef HAVE_VSNPRINTF # undef HAVE_C99_VSNPRINTF # undef HAVE_ASPRINTF # undef HAVE_VASPRINTF # include #endif /* TEST_SNPRINTF */ #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STRINGS_H #include #endif #ifdef HAVE_CTYPE_H #include #endif #include #include #ifdef HAVE_STDLIB_H #include #endif #if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && defined(HAVE_C99_VSNPRINTF) /* only include stdio.h if we are not re-defining snprintf or vsnprintf */ #include /* make the compiler happy with an empty file */ void dummy_snprintf(void); void dummy_snprintf(void) {} #endif /* HAVE_SNPRINTF, etc */ #ifdef HAVE_LONG_DOUBLE #define LDOUBLE long double #else #define LDOUBLE double #endif #ifdef HAVE_LONG_LONG #define LLONG long long #else #define LLONG long #endif #ifndef VA_COPY #ifdef HAVE_VA_COPY #define VA_COPY(dest, src) va_copy(dest, src) #else #ifdef HAVE___VA_COPY #define VA_COPY(dest, src) __va_copy(dest, src) #else #define VA_COPY(dest, src) (dest) = (src) #endif #endif /* * dopr(): poor man's version of doprintf */ /* format read states */ #define DP_S_DEFAULT 0 #define DP_S_FLAGS 1 #define DP_S_MIN 2 #define DP_S_DOT 3 #define DP_S_MAX 4 #define DP_S_MOD 5 #define DP_S_CONV 6 #define DP_S_DONE 7 /* format flags - Bits */ #define DP_F_MINUS (1 << 0) #define DP_F_PLUS (1 << 1) #define DP_F_SPACE (1 << 2) #define DP_F_NUM (1 << 3) #define DP_F_ZERO (1 << 4) #define DP_F_UP (1 << 5) #define DP_F_UNSIGNED (1 << 6) /* Conversion Flags */ #define DP_C_CHAR 1 #define DP_C_SHORT 2 #define DP_C_LONG 3 #define DP_C_LDOUBLE 4 #define DP_C_LLONG 5 /* Chunk types */ #define CNK_FMT_STR 0 #define CNK_INT 1 #define CNK_OCTAL 2 #define CNK_UINT 3 #define CNK_HEX 4 #define CNK_FLOAT 5 #define CNK_CHAR 6 #define CNK_STRING 7 #define CNK_PTR 8 #define CNK_NUM 9 #define CNK_PRCNT 10 #define char_to_int(p) ((p)- '0') #ifndef MAX #define MAX(p,q) (((p) >= (q)) ? (p) : (q)) #endif /* yes this really must be a ||. Don't muck with this (tridge) */ #if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF) struct pr_chunk { int type; /* chunk type */ int num; /* parameter number */ int min; int max; int flags; int cflags; int start; int len; LLONG value; LDOUBLE fvalue; char *strvalue; void *pnum; struct pr_chunk *min_star; struct pr_chunk *max_star; struct pr_chunk *next; }; struct pr_chunk_x { struct pr_chunk **chunks; int num; }; static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args_in); static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max); static void fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags); static void fmtfp(char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags); static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c); static struct pr_chunk *new_chunk(void); static int add_cnk_list_entry(struct pr_chunk_x **list, int max_num, struct pr_chunk *chunk); static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args_in) { char ch; int state; int pflag; int pnum; int pfirst; size_t currlen; va_list args; const char *base; struct pr_chunk *chunks = NULL; struct pr_chunk *cnk = NULL; struct pr_chunk_x *clist = NULL; int max_pos; size_t ret = (size_t)-1; VA_COPY(args, args_in); state = DP_S_DEFAULT; pfirst = 1; pflag = 0; pnum = 0; max_pos = 0; base = format; ch = *format++; /* retrieve the string structure as chunks */ while (state != DP_S_DONE) { if (ch == '\0') state = DP_S_DONE; switch(state) { case DP_S_DEFAULT: if (cnk) { cnk->next = new_chunk(); cnk = cnk->next; } else { cnk = new_chunk(); } if (!cnk) goto done; if (!chunks) chunks = cnk; if (ch == '%') { state = DP_S_FLAGS; ch = *format++; } else { cnk->type = CNK_FMT_STR; cnk->start = format - base -1; while ((ch != '\0') && (ch != '%')) ch = *format++; cnk->len = format - base - cnk->start -1; } break; case DP_S_FLAGS: switch (ch) { case '-': cnk->flags |= DP_F_MINUS; ch = *format++; break; case '+': cnk->flags |= DP_F_PLUS; ch = *format++; break; case ' ': cnk->flags |= DP_F_SPACE; ch = *format++; break; case '#': cnk->flags |= DP_F_NUM; ch = *format++; break; case '0': cnk->flags |= DP_F_ZERO; ch = *format++; break; case 'I': /* internationalization not supported yet */ ch = *format++; break; default: state = DP_S_MIN; break; } break; case DP_S_MIN: if (isdigit((unsigned char)ch)) { cnk->min = 10 * cnk->min + char_to_int (ch); ch = *format++; } else if (ch == '$') { if (!pfirst && !pflag) { /* parameters must be all positioned or none */ goto done; } if (pfirst) { pfirst = 0; pflag = 1; } if (cnk->min == 0) /* what ?? */ goto done; cnk->num = cnk->min; cnk->min = 0; ch = *format++; } else if (ch == '*') { if (pfirst) pfirst = 0; cnk->min_star = new_chunk(); if (!cnk->min_star) /* out of memory :-( */ goto done; cnk->min_star->type = CNK_INT; if (pflag) { int num; ch = *format++; if (!isdigit((unsigned char)ch)) { /* parameters must be all positioned or none */ goto done; } for (num = 0; isdigit((unsigned char)ch); ch = *format++) { num = 10 * num + char_to_int(ch); } cnk->min_star->num = num; if (ch != '$') /* what ?? */ goto done; } else { cnk->min_star->num = ++pnum; } max_pos = add_cnk_list_entry(&clist, max_pos, cnk->min_star); if (max_pos == 0) /* out of memory :-( */ goto done; ch = *format++; state = DP_S_DOT; } else { if (pfirst) pfirst = 0; state = DP_S_DOT; } break; case DP_S_DOT: if (ch == '.') { state = DP_S_MAX; ch = *format++; } else { state = DP_S_MOD; } break; case DP_S_MAX: if (isdigit((unsigned char)ch)) { if (cnk->max < 0) cnk->max = 0; cnk->max = 10 * cnk->max + char_to_int (ch); ch = *format++; } else if (ch == '$') { if (!pfirst && !pflag) { /* parameters must be all positioned or none */ goto done; } if (cnk->max <= 0) /* what ?? */ goto done; cnk->num = cnk->max; cnk->max = -1; ch = *format++; } else if (ch == '*') { cnk->max_star = new_chunk(); if (!cnk->max_star) /* out of memory :-( */ goto done; cnk->max_star->type = CNK_INT; if (pflag) { int num; ch = *format++; if (!isdigit((unsigned char)ch)) { /* parameters must be all positioned or none */ goto done; } for (num = 0; isdigit((unsigned char)ch); ch = *format++) { num = 10 * num + char_to_int(ch); } cnk->max_star->num = num; if (ch != '$') /* what ?? */ goto done; } else { cnk->max_star->num = ++pnum; } max_pos = add_cnk_list_entry(&clist, max_pos, cnk->max_star); if (max_pos == 0) /* out of memory :-( */ goto done; ch = *format++; state = DP_S_MOD; } else { state = DP_S_MOD; } break; case DP_S_MOD: switch (ch) { case 'h': cnk->cflags = DP_C_SHORT; ch = *format++; if (ch == 'h') { cnk->cflags = DP_C_CHAR; ch = *format++; } break; case 'l': cnk->cflags = DP_C_LONG; ch = *format++; if (ch == 'l') { /* It's a long long */ cnk->cflags = DP_C_LLONG; ch = *format++; } break; case 'L': cnk->cflags = DP_C_LDOUBLE; ch = *format++; break; default: break; } state = DP_S_CONV; break; case DP_S_CONV: if (cnk->num == 0) cnk->num = ++pnum; max_pos = add_cnk_list_entry(&clist, max_pos, cnk); if (max_pos == 0) /* out of memory :-( */ goto done; switch (ch) { case 'd': case 'i': cnk->type = CNK_INT; break; case 'o': cnk->type = CNK_OCTAL; cnk->flags |= DP_F_UNSIGNED; break; case 'u': cnk->type = CNK_UINT; cnk->flags |= DP_F_UNSIGNED; break; case 'X': cnk->flags |= DP_F_UP; case 'x': cnk->type = CNK_HEX; cnk->flags |= DP_F_UNSIGNED; break; case 'A': /* hex float not supported yet */ case 'E': case 'G': case 'F': cnk->flags |= DP_F_UP; case 'a': /* hex float not supported yet */ case 'e': case 'f': case 'g': cnk->type = CNK_FLOAT; break; case 'c': cnk->type = CNK_CHAR; break; case 's': cnk->type = CNK_STRING; break; case 'p': cnk->type = CNK_PTR; break; case 'n': cnk->type = CNK_NUM; break; case '%': cnk->type = CNK_PRCNT; break; default: /* Unknown, bail out*/ goto done; } ch = *format++; state = DP_S_DEFAULT; break; case DP_S_DONE: break; default: /* hmm? */ break; /* some picky compilers need this */ } } /* retieve the format arguments */ for (pnum = 0; pnum < max_pos; pnum++) { int i; if (clist[pnum].num == 0) { /* ignoring a parameter should not be permitted * all parameters must be matched at least once * BUT seem some system ignore this rule ... * at least my glibc based system does --SSS */ #ifdef DEBUG_SNPRINTF printf("parameter at position %d not used\n", pnum+1); #endif /* eat the parameter */ va_arg (args, int); continue; } for (i = 1; i < clist[pnum].num; i++) { if (clist[pnum].chunks[0]->type != clist[pnum].chunks[i]->type) { /* nooo noo no! * all the references to a parameter * must be of the same type */ goto done; } } cnk = clist[pnum].chunks[0]; switch (cnk->type) { case CNK_INT: if (cnk->cflags == DP_C_SHORT) cnk->value = va_arg (args, int); else if (cnk->cflags == DP_C_LONG) cnk->value = va_arg (args, long int); else if (cnk->cflags == DP_C_LLONG) cnk->value = va_arg (args, LLONG); else cnk->value = va_arg (args, int); for (i = 1; i < clist[pnum].num; i++) { clist[pnum].chunks[i]->value = cnk->value; } break; case CNK_OCTAL: case CNK_UINT: case CNK_HEX: if (cnk->cflags == DP_C_SHORT) cnk->value = va_arg (args, unsigned int); else if (cnk->cflags == DP_C_LONG) cnk->value = (long)va_arg (args, unsigned long int); else if (cnk->cflags == DP_C_LLONG) cnk->value = (LLONG)va_arg (args, unsigned LLONG); else cnk->value = (long)va_arg (args, unsigned int); for (i = 1; i < clist[pnum].num; i++) { clist[pnum].chunks[i]->value = cnk->value; } break; case CNK_FLOAT: if (cnk->cflags == DP_C_LDOUBLE) cnk->fvalue = va_arg (args, LDOUBLE); else cnk->fvalue = va_arg (args, double); for (i = 1; i < clist[pnum].num; i++) { clist[pnum].chunks[i]->fvalue = cnk->fvalue; } break; case CNK_CHAR: cnk->value = va_arg (args, int); for (i = 1; i < clist[pnum].num; i++) { clist[pnum].chunks[i]->value = cnk->value; } break; case CNK_STRING: cnk->strvalue = va_arg (args, char *); if (!cnk->strvalue) cnk->strvalue = "(NULL)"; for (i = 1; i < clist[pnum].num; i++) { clist[pnum].chunks[i]->strvalue = cnk->strvalue; } break; case CNK_PTR: cnk->strvalue = va_arg (args, void *); for (i = 1; i < clist[pnum].num; i++) { clist[pnum].chunks[i]->strvalue = cnk->strvalue; } break; case CNK_NUM: if (cnk->cflags == DP_C_CHAR) cnk->pnum = va_arg (args, char *); else if (cnk->cflags == DP_C_SHORT) cnk->pnum = va_arg (args, short int *); else if (cnk->cflags == DP_C_LONG) cnk->pnum = va_arg (args, long int *); else if (cnk->cflags == DP_C_LLONG) cnk->pnum = va_arg (args, LLONG *); else cnk->pnum = va_arg (args, int *); for (i = 1; i < clist[pnum].num; i++) { clist[pnum].chunks[i]->pnum = cnk->pnum; } break; case CNK_PRCNT: break; default: /* what ?? */ goto done; } } /* print out the actual string from chunks */ currlen = 0; cnk = chunks; while (cnk) { int len, min, max; if (cnk->min_star) min = cnk->min_star->value; else min = cnk->min; if (cnk->max_star) max = cnk->max_star->value; else max = cnk->max; switch (cnk->type) { case CNK_FMT_STR: if (maxlen != 0 && maxlen > currlen) { if (maxlen > (currlen + cnk->len)) len = cnk->len; else len = maxlen - currlen; memcpy(&(buffer[currlen]), &(base[cnk->start]), len); } currlen += cnk->len; break; case CNK_INT: case CNK_UINT: fmtint (buffer, &currlen, maxlen, cnk->value, 10, min, max, cnk->flags); break; case CNK_OCTAL: fmtint (buffer, &currlen, maxlen, cnk->value, 8, min, max, cnk->flags); break; case CNK_HEX: fmtint (buffer, &currlen, maxlen, cnk->value, 16, min, max, cnk->flags); break; case CNK_FLOAT: fmtfp (buffer, &currlen, maxlen, cnk->fvalue, min, max, cnk->flags); break; case CNK_CHAR: dopr_outch (buffer, &currlen, maxlen, cnk->value); break; case CNK_STRING: if (max == -1) { max = strlen(cnk->strvalue); } fmtstr (buffer, &currlen, maxlen, cnk->strvalue, cnk->flags, min, max); break; case CNK_PTR: fmtint (buffer, &currlen, maxlen, (long)(cnk->strvalue), 16, min, max, cnk->flags); break; case CNK_NUM: if (cnk->cflags == DP_C_CHAR) *((char *)(cnk->pnum)) = (char)currlen; else if (cnk->cflags == DP_C_SHORT) *((short int *)(cnk->pnum)) = (short int)currlen; else if (cnk->cflags == DP_C_LONG) *((long int *)(cnk->pnum)) = (long int)currlen; else if (cnk->cflags == DP_C_LLONG) *((LLONG *)(cnk->pnum)) = (LLONG)currlen; else *((int *)(cnk->pnum)) = (int)currlen; break; case CNK_PRCNT: dopr_outch (buffer, &currlen, maxlen, '%'); break; default: /* what ?? */ goto done; } cnk = cnk->next; } if (maxlen != 0) { if (currlen < maxlen - 1) buffer[currlen] = '\0'; else if (maxlen > 0) buffer[maxlen - 1] = '\0'; } ret = currlen; done: while (chunks) { cnk = chunks->next; free(chunks); chunks = cnk; } if (clist) { for (pnum = 0; pnum < max_pos; pnum++) { if (clist[pnum].chunks) free(clist[pnum].chunks); } free(clist); } return ret; } static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, int min, int max) { int padlen, strln; /* amount to pad */ int cnt = 0; #ifdef DEBUG_SNPRINTF printf("fmtstr min=%d max=%d s=[%s]\n", min, max, value); #endif if (value == 0) { value = ""; } for (strln = 0; strln < max && value[strln]; ++strln); /* strlen */ padlen = min - strln; if (padlen < 0) padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justify */ while (padlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --padlen; } while (*value && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, *value++); ++cnt; } while (padlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; } } /* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ static void fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, int min, int max, int flags) { int signvalue = 0; unsigned long uvalue; char convert[20]; int place = 0; int spadlen = 0; /* amount to space pad */ int zpadlen = 0; /* amount to zero pad */ int caps = 0; if (max < 0) max = 0; uvalue = value; if(!(flags & DP_F_UNSIGNED)) { if( value < 0 ) { signvalue = '-'; uvalue = -value; } else { if (flags & DP_F_PLUS) /* Do a sign (+/i) */ signvalue = '+'; else if (flags & DP_F_SPACE) signvalue = ' '; } } if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ do { convert[place++] = (caps? "0123456789ABCDEF":"0123456789abcdef") [uvalue % (unsigned)base ]; uvalue = (uvalue / (unsigned)base ); } while(uvalue && (place < 20)); if (place == 20) place--; convert[place] = 0; zpadlen = max - place; spadlen = min - MAX (max, place) - (signvalue ? 1 : 0); if (zpadlen < 0) zpadlen = 0; if (spadlen < 0) spadlen = 0; if (flags & DP_F_ZERO) { zpadlen = MAX(zpadlen, spadlen); spadlen = 0; } if (flags & DP_F_MINUS) spadlen = -spadlen; /* Left Justify */ #ifdef DEBUG_SNPRINTF printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", zpadlen, spadlen, min, max, place); #endif /* Spaces */ while (spadlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --spadlen; } /* Sign */ if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); /* Zeros */ if (zpadlen > 0) { while (zpadlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --zpadlen; } } /* Digits */ while (place > 0) dopr_outch (buffer, currlen, maxlen, convert[--place]); /* Left Justified spaces */ while (spadlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); ++spadlen; } } static LDOUBLE abs_val(LDOUBLE value) { LDOUBLE result = value; if (value < 0) result = -value; return result; } static LDOUBLE POW10(int exp) { LDOUBLE result = 1; while (exp) { result *= 10; exp--; } return result; } static LLONG ROUND(LDOUBLE value) { LLONG intpart; intpart = (LLONG)value; value = value - intpart; if (value >= 0.5) intpart++; return intpart; } /* a replacement for modf that doesn't need the math library. Should be portable, but slow */ static double my_modf(double x0, double *iptr) { int i; long l; double x = x0; double f = 1.0; for (i=0;i<100;i++) { l = (long)x; if (l <= (x+1) && l >= (x-1)) break; x *= 0.1; f *= 10.0; } if (i == 100) { /* yikes! the number is beyond what we can handle. What do we do? */ (*iptr) = 0; return 0; } if (i != 0) { double i2; double ret; ret = my_modf(x0-l*f, &i2); (*iptr) = l*f + i2; return ret; } (*iptr) = l; return x - (*iptr); } static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags) { int signvalue = 0; double ufvalue; char iconvert[311]; char fconvert[311]; int iplace = 0; int fplace = 0; int padlen = 0; /* amount to pad */ int zpadlen = 0; int caps = 0; int idx; double intpart; double fracpart; double temp; /* * AIX manpage says the default is 0, but Solaris says the default * is 6, and sprintf on AIX defaults to 6 */ if (max < 0) max = 6; ufvalue = abs_val (fvalue); if (fvalue < 0) { signvalue = '-'; } else { if (flags & DP_F_PLUS) { /* Do a sign (+/i) */ signvalue = '+'; } else { if (flags & DP_F_SPACE) signvalue = ' '; } } #if 0 if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ #endif #if 0 if (max == 0) ufvalue += 0.5; /* if max = 0 we must round */ #endif /* * Sorry, we only support 9 digits past the decimal because of our * conversion method */ if (max > 9) max = 9; /* We "cheat" by converting the fractional part to integer by * multiplying by a factor of 10 */ temp = ufvalue; my_modf(temp, &intpart); fracpart = ROUND((POW10(max)) * (ufvalue - intpart)); if (fracpart >= POW10(max)) { intpart++; fracpart -= POW10(max); } /* Convert integer part */ do { temp = intpart*0.1; my_modf(temp, &intpart); idx = (int) ((temp -intpart +0.05)* 10.0); /* idx = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */ /* printf ("%llf, %f, %x\n", temp, intpart, idx); */ iconvert[iplace++] = (caps? "0123456789ABCDEF":"0123456789abcdef")[idx]; } while (intpart && (iplace < 311)); if (iplace == 311) iplace--; iconvert[iplace] = 0; /* Convert fractional part */ if (fracpart) { do { temp = fracpart*0.1; my_modf(temp, &fracpart); idx = (int) ((temp -fracpart +0.05)* 10.0); /* idx = (int) ((((temp/10) -fracpart) +0.05) *10); */ /* printf ("%lf, %lf, %ld\n", temp, fracpart, idx ); */ fconvert[fplace++] = (caps? "0123456789ABCDEF":"0123456789abcdef")[idx]; } while(fracpart && (fplace < 311)); if (fplace == 311) fplace--; } fconvert[fplace] = 0; /* -1 for decimal point, another -1 if we are printing a sign */ padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); zpadlen = max - fplace; if (zpadlen < 0) zpadlen = 0; if (padlen < 0) padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justify */ if ((flags & DP_F_ZERO) && (padlen > 0)) { if (signvalue) { dopr_outch (buffer, currlen, maxlen, signvalue); --padlen; signvalue = 0; } while (padlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --padlen; } } while (padlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --padlen; } if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); while (iplace > 0) dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); #ifdef DEBUG_SNPRINTF printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen); #endif /* * Decimal point. This should probably use locale to find the correct * char to print out. */ if (max > 0) { dopr_outch (buffer, currlen, maxlen, '.'); while (zpadlen > 0) { dopr_outch (buffer, currlen, maxlen, '0'); --zpadlen; } while (fplace > 0) dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); } while (padlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; } } static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) { if (*currlen < maxlen) { buffer[(*currlen)] = c; } (*currlen)++; } static struct pr_chunk *new_chunk(void) { struct pr_chunk *new_c = (struct pr_chunk *)malloc(sizeof(struct pr_chunk)); if ( !new_c ) return NULL; new_c->type = 0; new_c->num = 0; new_c->min = 0; new_c->min_star = NULL; new_c->max = -1; new_c->max_star = NULL; new_c->flags = 0; new_c->cflags = 0; new_c->start = 0; new_c->len = 0; new_c->value = 0; new_c->fvalue = 0; new_c->strvalue = NULL; new_c->pnum = NULL; new_c->next = NULL; return new_c; } static int add_cnk_list_entry(struct pr_chunk_x **list, int max_num, struct pr_chunk *chunk) { struct pr_chunk_x *l; struct pr_chunk **c; int max; int cnum; int i, pos; if (chunk->num > max_num) { max = chunk->num; if (*list == NULL) { l = (struct pr_chunk_x *)malloc(sizeof(struct pr_chunk_x) * max); pos = 0; } else { l = (struct pr_chunk_x *)realloc(*list, sizeof(struct pr_chunk_x) * max); pos = max_num; } if (l == NULL) { for (i = 0; i < max; i++) { if ((*list)[i].chunks) free((*list)[i].chunks); } return 0; } for (i = pos; i < max; i++) { l[i].chunks = NULL; l[i].num = 0; } } else { l = *list; max = max_num; } i = chunk->num - 1; cnum = l[i].num + 1; if (l[i].chunks == NULL) { c = (struct pr_chunk **)malloc(sizeof(struct pr_chunk *) * cnum); } else { c = (struct pr_chunk **)realloc(l[i].chunks, sizeof(struct pr_chunk *) * cnum); } if (c == NULL) { for (i = 0; i < max; i++) { if (l[i].chunks) free(l[i].chunks); } return 0; } c[l[i].num] = chunk; l[i].chunks = c; l[i].num = cnum; *list = l; return max; } int smb_vsnprintf (char *str, size_t count, const char *fmt, va_list args) { return dopr(str, count, fmt, args); } #define vsnprintf smb_vsnprintf #endif /* yes this really must be a ||. Don't muck with this (tridge) * * The logic for these two is that we need our own definition if the * OS *either* has no definition of *sprintf, or if it does have one * that doesn't work properly according to the autoconf test. */ #if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF) int smb_snprintf(char *str,size_t count,const char *fmt,...) { size_t ret; va_list ap; va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap); return ret; } #define snprintf smb_snprintf #endif #endif #ifndef HAVE_VASPRINTF int vasprintf(char **ptr, const char *format, va_list ap) { int ret; va_list ap2; VA_COPY(ap2, ap); ret = vsnprintf(NULL, 0, format, ap2); if (ret <= 0) return ret; (*ptr) = (char *)malloc(ret+1); if (!*ptr) return -1; VA_COPY(ap2, ap); ret = vsnprintf(*ptr, ret+1, format, ap2); return ret; } #endif #ifndef HAVE_ASPRINTF int asprintf(char **ptr, const char *format, ...) { va_list ap; int ret; *ptr = NULL; va_start(ap, format); ret = vasprintf(ptr, format, ap); va_end(ap); return ret; } #endif #ifdef TEST_SNPRINTF int sprintf(char *str,const char *fmt,...); int main (void) { char buf1[1024]; char buf2[1024]; char *buf3; char *fp_fmt[] = { "%1.1f", "%-1.5f", "%1.5f", "%123.9f", "%10.5f", "% 10.5f", "%+22.9f", "%+4.9f", "%01.3f", "%4f", "%3.1f", "%3.2f", "%.0f", "%f", "%-8.8f", "%-9.9f", NULL }; double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 203.9, 0.96, 0.996, 0.9996, 1.996, 4.136, 5.030201, 0.00205, /* END LIST */ 0}; char *int_fmt[] = { "%-1.5d", "%1.5d", "%123.9d", "%5.5d", "%10.5d", "% 10.5d", "%+22.33d", "%01.3d", "%4d", "%d", NULL }; long int_nums[] = { -1, 134, 91340, 341, 0203, 0, 1234567890}; char *str_fmt[] = { "%10.5s", "%-10.5s", "%5.10s", "%-5.10s", "%10.1s", "%0.10s", "%10.0s", "%1.10s", "%s", "%.1s", "%.10s", "%10s", NULL }; char *str_vals[] = {"hello", "a", "", "a longer string", NULL}; int x, y; int fail = 0; int num = 0; int l1, l2; printf ("Testing snprintf format codes against system sprintf...\n"); for (x = 0; fp_fmt[x] ; x++) { for (y = 0; fp_nums[y] != 0 ; y++) { buf1[0] = buf2[0] = '\0'; l1 = snprintf(NULL, 0, fp_fmt[x], fp_nums[y]); l2 = snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]); sprintf (buf2, fp_fmt[x], fp_nums[y]); buf1[1023] = buf1[1023] = '\0'; if (strcmp (buf1, buf2) || (l1 != l2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", fp_fmt[x], l1, buf1, l2, buf2); fail++; } num++; } } for (x = 0; int_fmt[x] ; x++) { for (y = 0; int_nums[y] != 0 ; y++) { buf1[0] = buf2[0] = '\0'; l1 = snprintf(NULL, 0, int_fmt[x], int_nums[y]); l2 = snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]); sprintf (buf2, int_fmt[x], int_nums[y]); buf1[1023] = buf1[1023] = '\0'; if (strcmp (buf1, buf2) || (l1 != l2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", int_fmt[x], l1, buf1, l2, buf2); fail++; } num++; } } for (x = 0; str_fmt[x] ; x++) { for (y = 0; str_vals[y] != 0 ; y++) { buf1[0] = buf2[0] = '\0'; l1 = snprintf(NULL, 0, str_fmt[x], str_vals[y]); l2 = snprintf(buf1, sizeof(buf1), str_fmt[x], str_vals[y]); sprintf (buf2, str_fmt[x], str_vals[y]); buf1[1023] = buf1[1023] = '\0'; if (strcmp (buf1, buf2) || (l1 != l2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", str_fmt[x], l1, buf1, l2, buf2); fail++; } num++; } } #define BUFSZ 2048 buf1[0] = buf2[0] = '\0'; if ((buf3 = malloc(BUFSZ)) == NULL) { fail++; } else { num++; memset(buf3, 'a', BUFSZ); snprintf(buf1, sizeof(buf1), "%.*s", 1, buf3); buf1[1023] = '\0'; if (strcmp(buf1, "a") != 0) { printf("length limit buf1 '%s' expected 'a'\n", buf1); fail++; } } buf1[0] = buf2[0] = '\0'; l1 = snprintf(buf1, sizeof(buf1), "%4$*1$d %2$s %3$*1$.*1$f", 3, "pos test", 12.3456, 9); l2 = sprintf(buf2, "%4$*1$d %2$s %3$*1$.*1$f", 3, "pos test", 12.3456, 9); buf1[1023] = buf1[1023] = '\0'; if (strcmp(buf1, buf2) || (l1 != l2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", "%4$*1$d %2$s %3$*1$.*1$f", l1, buf1, l2, buf2); fail++; } buf1[0] = buf2[0] = '\0'; l1 = snprintf(buf1, sizeof(buf1), "%4$*4$d %2$s %3$*4$.*4$f", 3, "pos test", 12.3456, 9); l2 = sprintf(buf2, "%4$*4$d %2$s %3$*4$.*4$f", 3, "pos test", 12.3456, 9); buf1[1023] = buf1[1023] = '\0'; if (strcmp(buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", "%4$*1$d %2$s %3$*1$.*1$f", l1, buf1, l2, buf2); fail++; } #if 0 buf1[0] = buf2[0] = '\0'; l1 = snprintf(buf1, sizeof(buf1), "%lld", (LLONG)1234567890); l2 = sprintf(buf2, "%lld", (LLONG)1234567890); buf1[1023] = buf1[1023] = '\0'; if (strcmp(buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", "%lld", l1, buf1, l2, buf2); fail++; } buf1[0] = buf2[0] = '\0'; l1 = snprintf(buf1, sizeof(buf1), "%Lf", (LDOUBLE)890.1234567890123); l2 = sprintf(buf2, "%Lf", (LDOUBLE)890.1234567890123); buf1[1023] = buf1[1023] = '\0'; if (strcmp(buf1, buf2)) { printf("snprintf doesn't match Format: %s\n\tsnprintf(%d) = [%s]\n\t sprintf(%d) = [%s]\n", "%Lf", l1, buf1, l2, buf2); fail++; } #endif printf ("%d tests failed out of %d.\n", fail, num); printf("seeing how many digits we support\n"); { double v0 = 0.12345678901234567890123456789012345678901; for (x=0; x<100; x++) { double p = pow(10, x); double r = v0*p; snprintf(buf1, sizeof(buf1), "%1.1f", r); sprintf(buf2, "%1.1f", r); if (strcmp(buf1, buf2)) { printf("we seem to support %d digits\n", x-1); break; } } } return 0; } #endif /* TEST_SNPRINTF */ nrpe-nrpe-4.0.3/src/utils.c000066400000000000000000000353431365211572000155310ustar00rootroot00000000000000/**************************************************************************** * * utils.c - NRPE Utility Functions * * License: GPLv2 * Copyright (c) 2009-2017 Nagios Enterprises * 1999-2008 Ethan Galstad (nagios@nagios.org) * * Description: * * This file contains common network functions used in nrpe and check_nrpe. * * License Notice: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ****************************************************************************/ #include "../include/common.h" #include "../include/utils.h" #include #ifdef HAVE_PATHS_H #include #endif #ifndef HAVE_ASPRINTF extern int asprintf(char **ptr, const char *format, ...); #endif #ifndef HAVE_VASPRINTF extern int vasprintf(char **ptr, const char *format, va_list ap); #endif #ifndef NI_MAXSERV # define NI_MAXSERV 32 #endif #ifndef NI_MAXHOST # define NI_MAXHOST 1025 #endif extern char **environ; static unsigned long crc32_table[256]; char *log_file = NULL; FILE *log_fp = NULL; static int my_create_socket(struct addrinfo *ai, const char *bind_address, int redirect_stderr); /* build the crc table - must be called before calculating the crc value */ void generate_crc32_table(void) { unsigned long crc, poly; int i, j; poly = 0xEDB88320L; for (i = 0; i < 256; i++) { crc = i; for (j = 8; j > 0; j--) { if (crc & 1) crc = (crc >> 1) ^ poly; else crc >>= 1; } crc32_table[i] = crc; } return; } /* calculates the CRC 32 value for a buffer */ unsigned long calculate_crc32(char *buffer, int buffer_size) { register unsigned long crc = 0xFFFFFFFF; int this_char; int current_index; for (current_index = 0; current_index < buffer_size; current_index++) { this_char = (int)buffer[current_index]; crc = ((crc >> 8) & 0x00FFFFFF) ^ crc32_table[(crc ^ this_char) & 0xFF]; } return (crc ^ 0xFFFFFFFF); } /* fill a buffer with semi-random data */ void randomize_buffer(char *buffer, int buffer_size) { FILE *fp; int x; int seed; /**** FILL BUFFER WITH RANDOM ALPHA-NUMERIC CHARACTERS ****/ /*************************************************************** Only use alpha-numeric characters because plugins usually only generate numbers and letters in their output. We want the buffer to contain the same set of characters as plugins, so its harder to distinguish where the real output ends and the rest of the buffer (padded randomly) starts. ***************************************************************/ /* try to get seed value from /dev/urandom, as its a better source of entropy */ fp = fopen("/dev/urandom", "r"); if (fp != NULL) { seed = fgetc(fp); fclose(fp); } /* else fallback to using the current time as the seed */ else seed = (int)time(NULL); srand(seed); for (x = 0; x < buffer_size; x++) buffer[x] = (int)'0' + (int)(72.0 * rand() / (RAND_MAX + 1.0)); return; } /* opens a connection to a remote host */ #ifdef HAVE_STRUCT_SOCKADDR_STORAGE int my_connect(const char *host, struct sockaddr_storage *hostaddr, u_short port, int address_family, const char *bind_address, int redirect_stderr) #else int my_connect(const char *host, struct sockaddr *hostaddr, u_short port, int address_family, const char *bind_address, int redirect_stderr) #endif { struct addrinfo hints, *ai, *aitop; char ntop[NI_MAXHOST], strport[NI_MAXSERV]; int gaierr; int sock = -1; FILE *output = stderr; if (redirect_stderr) output = stdout; memset(&hints, 0, sizeof(hints)); hints.ai_family = address_family; hints.ai_socktype = SOCK_STREAM; snprintf(strport, sizeof strport, "%u", port); if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) { fprintf(output, "Could not resolve hostname %.100s: %s\n", host, gai_strerror(gaierr)); exit(1); } /* * Loop through addresses for this host, and try each one in * sequence until the connection succeeds. */ for (ai = aitop; ai; ai = ai->ai_next) { if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) continue; if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop, sizeof(ntop), strport, sizeof(strport), NI_NUMERICHOST | NI_NUMERICSERV) != 0) { fprintf(output, "my_connect: getnameinfo failed\n"); continue; } /* Create a socket for connecting. */ sock = my_create_socket(ai, bind_address, redirect_stderr); if (sock < 0) continue; /* Any error is already output */ if (connect(sock, ai->ai_addr, ai->ai_addrlen) >= 0) { /* Successful connection. */ memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen); break; } else { fprintf(output, "connect to address %s port %s: %s\n", ntop, strport, strerror(errno)); close(sock); sock = -1; } } freeaddrinfo(aitop); /* Return failure if we didn't get a successful connection. */ if (sock == -1) { fprintf(output, "connect to host %s port %s: %s\n", host, strport, strerror(errno)); return -1; } return sock; } /* Creates a socket for the connection. */ int my_create_socket(struct addrinfo *ai, const char *bind_address, int redirect_stderr) { int sock, gaierr; struct addrinfo hints, *res; FILE *output = stderr; if (redirect_stderr) output = stdout; sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if (sock < 0) fprintf(output, "socket: %.100s\n", strerror(errno)); /* Bind the socket to an alternative local IP address */ if (bind_address == NULL) return sock; memset(&hints, 0, sizeof(hints)); hints.ai_family = ai->ai_family; hints.ai_socktype = ai->ai_socktype; hints.ai_protocol = ai->ai_protocol; hints.ai_flags = AI_PASSIVE; gaierr = getaddrinfo(bind_address, NULL, &hints, &res); if (gaierr) { fprintf(output, "getaddrinfo: %s: %s\n", bind_address, gai_strerror(gaierr)); close(sock); return -1; } if (bind(sock, res->ai_addr, res->ai_addrlen) < 0) { fprintf(output, "bind: %s: %s\n", bind_address, strerror(errno)); close(sock); freeaddrinfo(res); return -1; } freeaddrinfo(res); return sock; } void add_listen_addr(struct addrinfo **listen_addrs, int address_family, char *addr, int port) { struct addrinfo hints, *ai, *aitop; char strport[NI_MAXSERV]; int gaierr; memset(&hints, 0, sizeof(hints)); hints.ai_family = address_family; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = (addr == NULL) ? AI_PASSIVE : 0; snprintf(strport, sizeof strport, "%d", port); if ((gaierr = getaddrinfo(addr, strport, &hints, &aitop)) != 0) { logit(LOG_ERR, "bad addr or host: %s (%s)\n", addr ? addr : "", gai_strerror(gaierr)); exit(1); } for (ai = aitop; ai->ai_next; ai = ai->ai_next) ; ai->ai_next = *listen_addrs; *listen_addrs = aitop; } int clean_environ(const char *keep_env_vars, const char *nrpe_user) { #if defined(HAVE_PATHS_H) && defined(_PATH_STDPATH) static char *path = _PATH_STDPATH; #else static char *path = "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"; #endif struct passwd *pw; size_t len, var_sz = 0; char **kept = NULL, *value, *var, *keep = NULL; int i, j, keepcnt = 0; if (keep_env_vars && *keep_env_vars) asprintf(&keep, "%s,NRPE_MULTILINESUPPORT,NRPE_PROGRAMVERSION", keep_env_vars); else asprintf(&keep, "NRPE_MULTILINESUPPORT,NRPE_PROGRAMVERSION"); if (keep == NULL) { logit(LOG_ERR, "Could not sanitize the environment. Aborting!"); return ERROR; } ++keepcnt; i = strlen(keep); while (i--) { if (keep[i] == ',') ++keepcnt; } if ((kept = calloc(keepcnt + 1, sizeof(char *))) == NULL) { logit(LOG_ERR, "Could not sanitize the environment. Aborting!"); return ERROR; } for (i = 0, var = my_strsep(&keep, ","); var != NULL; var = my_strsep(&keep, ",")) kept[i++] = strip(var); var = NULL; i = 0; while (environ[i]) { value = environ[i]; if ((len = strcspn(value, "=")) == 0) { free(keep); free(kept); free(var); logit(LOG_ERR, "Could not sanitize the environment. Aborting!"); return ERROR; } if (len >= var_sz) { var_sz = len + 1; var = realloc(var, var_sz); } strncpy(var, environ[i], var_sz); var[len] = 0; for (j = 0; kept[j]; ++j) { if (!strncmp(var, kept[j], strlen(kept[j]))) break; } if (kept[j]) { ++i; continue; } unsetenv(var); } free(var); free(keep); free(kept); char * user = NULL; if (nrpe_user != NULL) { user = strdup(nrpe_user); pw = (struct passwd *)getpwnam(nrpe_user); } if (nrpe_user == NULL || pw == NULL) { pw = (struct passwd *)getpwuid(getuid()); if (pw != NULL) { user = strdup(pw->pw_name); } } if (pw == NULL) { free(user); return OK; } setenv("PATH", path, 1); setenv("IFS", " \t\n", 1); setenv("LOGNAME", user, 0); setenv("USER", user, 0); setenv("HOME", pw->pw_dir, 0); setenv("SHELL", pw->pw_shell, 0); free(user); return OK; } char *strip(char *buffer) { int x; int index; char *buf = buffer; for (x = strlen(buffer); x >= 1; x--) { index = x - 1; if (buffer[index] == ' ' || buffer[index] == '\r' || buffer[index] == '\n' || buffer[index] == '\t') buffer[index] = '\x0'; else break; } while (*buf == ' ' || *buf == '\r' || *buf == '\n' || *buf == '\t') { ++buf; --x; } if (buf != buffer) { memmove(buffer, buf, x); buffer[x] = '\x0'; } return buffer; } /* sends all data - thanks to Beej's Guide to Network Programming */ int sendall(int s, char *buf, int *len) { int total = 0; int bytesleft = *len; int n = 0; /* send all the data */ while (total < *len) { n = send(s, buf + total, bytesleft, 0); /* send some data */ if (n == -1) /* break on error */ break; /* apply bytes we sent */ total += n; bytesleft -= n; } *len = total; /* return number of bytes actually sent here */ return n == -1 ? -1 : 0; /* return -1 on failure, 0 on success */ } /* receives all data - modelled after sendall() */ int recvall(int s, char *buf, int *len, int timeout) { time_t start_time; time_t current_time; int total = 0; int bytesleft = *len; int n = 0; bzero(buf, *len); /* clear the receive buffer */ time(&start_time); /* receive all data */ while (total < *len) { n = recv(s, buf + total, bytesleft, 0); /* receive some data */ if (n == -1 && errno == EAGAIN) { /* no data has arrived yet (non-blocking socket) */ time(¤t_time); if (current_time - start_time > timeout) break; sleep(1); continue; } else if (n <= 0) break; /* receive error or client disconnect */ /* apply bytes we received */ total += n; bytesleft -= n; } /* return number of bytes actually received here */ *len = total; /* return <=0 on failure, bytes received on success */ return (n <= 0) ? n : total; } /* fixes compiler problems under Solaris, since strsep() isn't included */ /* this code is taken from the glibc source */ char *my_strsep(char **stringp, const char *delim) { char *begin, *end; begin = *stringp; if (begin == NULL) return NULL; /* A frequent case is when the delimiter string contains only one character. Here we don't need to call the expensive `strpbrk' function and instead work using `strchr'. */ if (delim[0] == '\0' || delim[1] == '\0') { char ch = delim[0]; if (ch == '\0') end = NULL; else { if (*begin == ch) end = begin; else end = strchr(begin + 1, ch); } } else end = strpbrk(begin, delim); /* Find the end of the token. */ if (end) { /* Terminate the token and set *STRINGP past NUL character. */ *end++ = '\0'; *stringp = end; } else /* No more delimiters; this is the last token. */ *stringp = NULL; return begin; } void open_log_file() { int fh; int flags = O_RDWR|O_APPEND|O_CREAT; struct stat st; close_log_file(); if (!log_file) return; #ifdef O_NOFOLLOW flags |= O_NOFOLLOW; #endif if ((fh = open(log_file, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) == -1) { printf("Warning: Cannot open log file '%s' for writing\n", log_file); logit(LOG_WARNING, "Warning: Cannot open log file '%s' for writing", log_file); return; } log_fp = fdopen(fh, "a+"); if(log_fp == NULL) { printf("Warning: Cannot open log file '%s' for writing\n", log_file); logit(LOG_WARNING, "Warning: Cannot open log file '%s' for writing", log_file); return; } if ((fstat(fh, &st)) == -1) { log_fp = NULL; close(fh); printf("Warning: Cannot fstat log file '%s'\n", log_file); logit(LOG_WARNING, "Warning: Cannot fstat log file '%s'", log_file); return; } if (st.st_nlink != 1 || (st.st_mode & S_IFMT) != S_IFREG) { log_fp = NULL; close(fh); printf("Warning: log file '%s' has an invalid mode\n", log_file); logit(LOG_WARNING, "Warning: log file '%s' has an invalid mode", log_file); return; } (void)fcntl(fileno(log_fp), F_SETFD, FD_CLOEXEC); } void logit(int priority, const char *format, ...) { time_t log_time = 0L; va_list ap; char *buffer = NULL; if (!format || !*format) return; va_start(ap, format); if(vasprintf(&buffer, format, ap) > 0) { if (log_fp) { time(&log_time); /* strip any newlines from the end of the buffer */ strip(buffer); /* write the buffer to the log file */ fprintf(log_fp, "[%llu] %s\n", (unsigned long long)log_time, buffer); fflush(log_fp); } else if (!disable_syslog) { syslog(priority, "%s", buffer); } free(buffer); } va_end(ap); } void close_log_file() { if(!log_fp) return; fflush(log_fp); fclose(log_fp); log_fp = NULL; return; } /* show license */ void display_license(void) { printf("This program is released under the GPL (see below) with the additional\n"); printf("exemption that compiling, linking, and/or using OpenSSL is allowed.\n\n"); printf("This program is free software; you can redistribute it and/or modify\n"); printf("it under the terms of the GNU General Public License as published by\n"); printf("the Free Software Foundation; either version 2 of the License, or\n"); printf("(at your option) any later version.\n\n"); printf("This program is distributed in the hope that it will be useful,\n"); printf("but WITHOUT ANY WARRANTY; without even the implied warranty of\n"); printf("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"); printf("GNU General Public License for more details.\n\n"); printf("You should have received a copy of the GNU General Public License\n"); printf("along with this program; if not, write to the Free Software\n"); printf("Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n"); return; } nrpe-nrpe-4.0.3/startup/000077500000000000000000000000001365211572000151305ustar00rootroot00000000000000nrpe-nrpe-4.0.3/startup/bsd-init.in000066400000000000000000000023571365211572000172000ustar00rootroot00000000000000#!/bin/sh # Start/stop/restart/reload nrpe # Copyright (c) 2016 Nagios(R) Core(TM) Development Team NRPE_BIN=@sbindir@/nrpe NRPE_CFG=@pkgsysconfdir@/nrpe.cfg PID_DIR=@piddir@ PID_FILE=@piddir@/nrpe.pid # Start nrpe nrpe_start() { echo -n "Starting nrpe daemon: $NRPE_BIN - " if [ ! -d "$PID_DIR" ]; then mkdir -p "$PID_DIR" fi $NRPE_BIN -c $NRPE_CFG -d if [ $? = 0 ]; then echo "started" else echo "failed" fi } # Stop nrpe nrpe_stop() { echo -n "Stopping nrpe daemon - " if [ -r "$PID_FILE" ]; then kill $(cat "$PID_FILE") else killall nrpe fi if [ $? = 0 ]; then echo "stopped" else echo "failed" fi } # Restart nrpe nrpe_restart() { nrpe_stop sleep 1 nrpe_start } # Reload nrpe nrpe_reload() { echo -n "Reloading nrpe daemon - " if [ -r "$PID_FILE" ]; then kill -HUP $(cat "$PID_FILE") else killall -HUP nrpe fi if [ $? = 0 ]; then echo "reloaded" else echo "failed" fi } # nrpe status nrpe_status() { if ps -C nrpe >/dev/null; then echo "nrpe is running." else echo "nrpe is stopped." fi } case "$1" in 'start') nrpe_start ;; 'stop') nrpe_stop ;; 'restart') nrpe_restart ;; 'reload') nrpe_reload ;; 'status') nrpe_status ;; *) echo "Usage $0 start|stop|restart|reload|status" ;; esac nrpe-nrpe-4.0.3/startup/debian-init.in000066400000000000000000000020561365211572000176460ustar00rootroot00000000000000#!/bin/sh # # Copyright (c) 2016 Nagios(R) Core(TM) Development Team # # Start/stop the nrpe daemon. NRPE_BIN=@sbindir@/nrpe NRPE_CFG=@pkgsysconfdir@/nrpe.cfg PID_FILE=@piddir@/nrpe.pid test -x $NRPE_BIN || exit 0 case "$1" in start) echo -n "Starting nagios remote plugin daemon: nrpe" start-stop-daemon --start --quiet --pidfile $PID_FILE --exec $NRPE_BIN -- -c $NRPE_CFG -d echo "." ;; stop) echo -n "Stopping nagios remote plugin daemon: nrpe" start-stop-daemon --stop --quiet --pidfile $PID_FILE --exec $NRPE_BIN echo "." ;; restart|force-reload) echo -n "Restarting nagios remote plugin daemon: nrpe" start-stop-daemon --stop --quiet --pidfile $PID_FILE --exec $NRPE_BIN start-stop-daemon --start --quiet --pidfile $PID_FILE --exec $NRPE_BIN -- -c $NRPE_CFG -d echo "." ;; reload) echo -n "Reloading configuration files for nagios remote plugin daemon: nrpe" test -f $PID_FILE || exit 0 test -x /bin/kill && /bin/kill -HUP `cat $PID_FILE` echo "." ;; *) echo "Usage: $0 start|stop|restart|reload|force-reload" exit 1 ;; esac exit 0 nrpe-nrpe-4.0.3/startup/default-inetd.in000066400000000000000000000005041365211572000202040ustar00rootroot00000000000000# # Enable the following entry to enable the nrpe daemon #nrpe stream tcp nowait @nrpe_user@ @sbindir@/nrpe nrpe -c @pkgsysconfdir@/nrpe.cfg --inetd # Enable the following entry if the nrpe daemon didn't link with libwrap #nrpe stream tcp nowait @nrpe_user@ /usr/sbin/tcpd @sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg --inetd nrpe-nrpe-4.0.3/startup/default-init.in000066400000000000000000000061661365211572000200560ustar00rootroot00000000000000#!/bin/sh # # Copyright (c) 2016 Nagios(R) Core(TM) Development Team # # chkconfig: - 80 30 # description: Starts and stops the Nagios Remote Plugin Executor \ # so a remote nagios server can run plugins on this host # ### BEGIN INIT INFO # Provides: nrpe # Required-Start: $local_fs $remote_fs $time # Required-Stop: $local_fs $remote_fs # Should-Start: $syslog $network # Should-Stop: $syslog $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Starts and stops the Nagios Remote Plugin Executor # Description: Starts and stops the Nagios Remote Plugin Executor # so a remote nagios server can run plugins on this host ### END INIT INFO NRPE_BIN=@sbindir@/nrpe NRPE_CFG=@pkgsysconfdir@/nrpe.cfg LOCK_DIR=@subsyslockdir@ LOCK_FILE=@subsyslockfile@ PID_FILE=@piddir@/nrpe.pid test -x $NRPE_BIN || exit 5 RETVAL=0 _set_rc (){ return; } # Default these commands/functions to RedHat/CentOS etc. values MSG_CMD="echo -n" START_CMD="daemon --pidfile $PID_FILE" TERM_CMD="killproc -p $PID_FILE $NRPE_BIN -TERM" HUP_CMD="killproc -p $PID_FILE $NRPE_BIN -HUP" PRT_STAT="echo" STAT_MSG="echo -n Checking for nrpe daemon... " STAT_CMD="status nrpe" EXIT_CMD="exit" # Source the function library if [ -f /etc/rc.status ]; then . /etc/rc.status _set_rc (){ return $RETVAL; } # Set these commands/functions to SuSE etc. values START_CMD="startproc -p $PID_FILE" TERM_CMD="killproc -p $PID_FILE -TERM $NRPE_BIN" HUP_CMD="killproc -p $PID_FILE -HUP $NRPE_BIN" PRT_STAT="rc_status -v -r" STAT_CMD="checkproc -p $PID_FILE $NRPE_BIN" EXIT_CMD="rc_exit" rc_reset elif [ -f /etc/rc.d/init.d/functions ]; then . /etc/rc.d/init.d/functions elif [ -f /etc/init.d/functions ]; then . /etc/init.d/functions elif [ -f /lib/lsb/init-functions ]; then . /lib/lsb/init-functions MSG_CMD="log_daemon_msg" START_CMD="start_daemon -p $PID_FILE" PRT_STAT="log_end_msg" STAT_MSG= STAT_CMD="status_of_proc -p $PID_FILE $NRPE_BIN nrpe" elif [ -f /etc/rc.d/functions ]; then . /etc/rc.d/functions fi # See how we were called. case "$1" in start) # Start daemons. $MSG_CMD "Starting nrpe " $START_CMD $NRPE_BIN -c $NRPE_CFG -d RETVAL=$? if test "$PRT_STAT" = log_end_msg; then $PRT_STAT $RETVAL else _set_rc; $PRT_STAT fi if [ $RETVAL = 0 ]; then [ -d $LOCK_DIR ] && touch $LOCK_FILE || true fi ;; stop) # Stop daemons. $MSG_CMD "Shutting down nrpe " $TERM_CMD RETVAL=$? if test "$PRT_STAT" = log_end_msg; then $PRT_STAT $RETVAL else _set_rc; $PRT_STAT fi if [ $RETVAL = 0 ]; then [ -d $LOCK_DIR ] && rm -f $LOCK_FILE fi ;; restart|force-reload) $0 stop $0 start RETVAL=$? ;; reload) $MSG_CMD "Reloading nrpe " $HUP_CMD RETVAL=$? if test "$PRT_STAT" = log_end_msg; then $PRT_STAT $RETVAL else _set_rc; $PRT_STAT fi ;; try-restart|condrestart) $STAT_CMD || exit 0 $0 stop $0 start RETVAL=$? ;; status) $STAT_MSG $STAT_CMD RETVAL=$? if test "$PRT_STAT" != log_end_msg; then _set_rc; $PRT_STAT fi ;; *) echo "Usage: nrpe {start|stop|restart|reload|try-restart|condrestart|status}" exit 1 esac $EXIT_CMD $RETVAL nrpe-nrpe-4.0.3/startup/default-service.in000066400000000000000000000012021365211572000205350ustar00rootroot00000000000000[Unit] Description=Nagios Remote Plugin Executor Documentation=http://www.nagios.org/documentation After=var-run.mount nss-lookup.target network.target local-fs.target time-sync.target Before=getty@tty1.service plymouth-quit.service xdm.service Conflicts=nrpe.socket [Install] WantedBy=multi-user.target [Service] Type=simple Restart=on-abort PIDFile=@piddir@/nrpe.pid RuntimeDirectory=nrpe RuntimeDirectoryMode=0755 ExecStart=@sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg -f ExecReload=/bin/kill -HUP $MAINPID ExecStopPost=/bin/rm -f @piddir@/nrpe.pid TimeoutStopSec=60 User=@nrpe_user@ Group=@nrpe_group@ PrivateTmp=true OOMScoreAdjust=-500 nrpe-nrpe-4.0.3/startup/default-socket-svc.in000066400000000000000000000006231365211572000211640ustar00rootroot00000000000000[Unit] Description=Nagios Remote Plugin Executor Documentation=http://www.nagios.org/documentation After=var-run.mount nss-lookup.target network.target local-fs.target time-sync.target [Service] Restart=on-failure ExecStart=@sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg --inetd KillMode=process User=@nrpe_user@ Group=@nrpe_group@ PrivateTmp=true OOMScoreAdjust=-500 [Install] WantedBy=multi-user.target nrpe-nrpe-4.0.3/startup/default-socket.in000066400000000000000000000003371365211572000203750ustar00rootroot00000000000000[Unit] Description=Nagios Remote Plugin Executor Documentation=http://www.nagios.org/documentation Before=nrpe.service Conflicts=nrpe.service [Socket] ListenStream=@nrpe_port@ Accept=yes [Install] WantedBy=sockets.target nrpe-nrpe-4.0.3/startup/default-xinetd.in000066400000000000000000000006451365211572000204020ustar00rootroot00000000000000# default: off # description: NRPE (Nagios Remote Plugin Executor) service nrpe { disable = yes socket_type = stream port = @nrpe_port@ wait = no user = @nrpe_user@ group = @nrpe_group@ server = @sbindir@/nrpe server_args = -c @pkgsysconfdir@/nrpe.cfg --inetd only_from = 127.0.0.1 ::1 log_on_success = } nrpe-nrpe-4.0.3/startup/gentoo-init.in000066400000000000000000000017241365211572000177200ustar00rootroot00000000000000#!/sbin/openrc-run # # Copyright (c) 2016 Nagios(R) Core(TM) Development Team # # Start/stop the nrpe daemon. # # Goes in /etc/init.d - Config is in /etc/conf.d/nrpe extra_started_commands="reload" NRPE_BIN="@sbindir@/nrpe" NRPE_PID="@piddir@/nrpe.pid" NRPE_CFG=@pkgsysconfdir@/nrpe.cfg depend() { use logger dns net localmount netmount nfsmount } checkconfig() { # Make sure the config file exists if [ ! -f $NRPE_CFG ]; then eerror "You need to setup $NRPE_CFG." return 1 fi return 0 } start() { checkconfig || return 1 ebegin "Starting nrpe" # Make sure we have a sane current directory cd / start-stop-daemon --start --exec $NRPE_BIN --pidfile $NRPE_PID \ --background -- -c $NRPE_CFG -f $NRPE_OPTS eend $? } stop() { ebegin "Stopping nrpe" start-stop-daemon --stop --exec $NRPE_BIN --pidfile $NRPE_PID eend $? } reload() { ebegin "Reloading nrpe" start-stop-daemon --stop --oknodo --exec $NRPE_BIN \ --pidfile $NRPE_PID --signal HUP eend $? } nrpe-nrpe-4.0.3/startup/mac-inetd.plist.in000066400000000000000000000016301365211572000204530ustar00rootroot00000000000000 Label org.nagios.nrpe UserName @nrpe_user@ GroupName @nrpe_group@ Program @sbindir@/nrpe ProgramArguments nrpe -c @pkgsysconfdir@/nrpe.cfg -i Sockets Listeners SockServiceName 5666 SockType stream SockFamily IPv4 inetdCompatibility Wait ProcessType Background nrpe-nrpe-4.0.3/startup/mac-init.plist.in000066400000000000000000000013621365211572000203150ustar00rootroot00000000000000 Label org.nagios.nrpe UserName @nrpe_user@ GroupName @nrpe_group@ Program @sbindir@/nrpe ProgramArguments nrpe -c @pkgsysconfdir@/nrpe.cfg -f KeepAlive SuccessfulExit NetworkState RunAtLoad ProcessType Background nrpe-nrpe-4.0.3/startup/newbsd-init.in000066400000000000000000000012241365211572000177020ustar00rootroot00000000000000#!/bin/sh # # Copyright (c) 2016 Nagios(R) Core(TM) Development Team # # PROVIDE: nrpe # REQUIRE: DAEMON # KEYWORD: shutdown . /etc/rc.subr : ${nrpe@bsd_enable@:="NO"} : ${nrpe_configfile:="@pkgsysconfdir@/nrpe.cfg"} name=nrpe command="@sbindir@/nrpe" command_args="-c $nrpe_configfile -d" pidfile="@piddir@/nrpe.pid" extra_commands=reload sig_reload=HUP rcvar=nrpe@bsd_enable@ load_rc_config "$name" required_files="$nrpe_configfile" sig_reload=HUP start_precmd=nrpe_prestart nrpe_prestart() { [ -n "$nrpe_pidfile" ] && warn "No longer necessary to set nrpe_pidfile in rc.conf[.local]" install -d -o @nrpe_user@ ${pidfile%/*} } run_rc_command "$1" nrpe-nrpe-4.0.3/startup/openbsd-init.in000066400000000000000000000003441365211572000200540ustar00rootroot00000000000000#!/bin/sh # # Copyright (c) 2016 Nagios(R) Core(TM) Development Team # daemon="@sbindir@/nrpe" . /etc/rc.d/rc.subr rc_pre() { install -d -o @nrpe_user@ ${pidfile%/*} } rc_reload() { pkill -HUP -xf "${pexp}" } rc_cmd "$1" nrpe-nrpe-4.0.3/startup/openrc-conf.in000066400000000000000000000003141365211572000176670ustar00rootroot00000000000000# /etc/conf.d/nrpe : config file for /etc/init.d/nrpe # The configuration file to use. NRPE_CFG="@sysconfdir@/nrpe.cfg" # Any additional options (e.g. -n -4 -6) to pass to the nrpe daemon. NRPE_OPTS="" nrpe-nrpe-4.0.3/startup/openrc-init.in000066400000000000000000000010761365211572000177130ustar00rootroot00000000000000#!/sbin/openrc-run # # Copyright (c) 2017 Nagios(R) Core(TM) Development Team # # Supply a default value for NRPE_CFG in case the corresponding # conf.d file is not installed. : ${NRPE_CFG:="@sysconfdir@/nrpe.cfg"} command="@sbindir@/nrpe" command_args="--config=${NRPE_CFG} ${NRPE_OPTS}" command_args_background="--daemon" description="Nagios Remote Plugin Executor (NRPE) daemon" extra_started_commands="reload" pidfile="@piddir@/${RC_SVCNAME}.pid" reload() { ebegin "Reloading ${RC_SVCNAME}" start-stop-daemon --signal HUP --pidfile "${pidfile}" eend $? } nrpe-nrpe-4.0.3/startup/rh-upstart-init.in000066400000000000000000000005701365211572000205340ustar00rootroot00000000000000# nrpe - the Nagios Remote Plugin Executor # # nrpe is a program that runs plugins on this host # and reports the results back to a nagios server # # Copyright (c) 2016 Nagios(R) Core(TM) Development Team description "the Nagios Remote Plugin Executor" oom -10 start on started network stop on runlevel [!2345] respawn exec @sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg -f nrpe-nrpe-4.0.3/startup/solaris-inetd.xml.in000066400000000000000000000042231365211572000210350ustar00rootroot00000000000000 nrpe-nrpe-4.0.3/startup/solaris-init.xml.in000066400000000000000000000061671365211572000207060ustar00rootroot00000000000000 nrpe-nrpe-4.0.3/startup/tmpfile.conf.in000066400000000000000000000001331365211572000200410ustar00rootroot00000000000000#Type Path Mode UID GID Age Argument d @piddir@ 0755 @nrpe_user@ @nrpe_group@ - - nrpe-nrpe-4.0.3/startup/upstart-init.in000066400000000000000000000007061365211572000201260ustar00rootroot00000000000000# nrpe - the Nagios Remote Plugin Executor # # nrpe is a program that runs plugins on this host # and reports the results back to a nagios server # # Copyright (c) 2016 Nagios(R) Core(TM) Development Team description "the Nagios Remote Plugin Executor" oom score -800 setgid @nrpe_group@ setuid @nrpe_user@ start on (local-filesystems and net-device-up IFACE!=lo) stop on runlevel [!2345] respawn exec @sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg -f nrpe-nrpe-4.0.3/test-wrapper000077500000000000000000000001121365211572000160030ustar00rootroot00000000000000#!/bin/bash # Replace this once test is working properly. ./travis-test-1 nrpe-nrpe-4.0.3/travis-test-1000077500000000000000000000017251365211572000160040ustar00rootroot00000000000000#!/bin/bash # Integration test for nrpe/check_nrpe # Should be run only on machines which do NOT have Nagios installed # and which do not have an enabled firewall. cd sample-config echo >> nrpe.cfg # Hopefully this is a newline! I think nrpe.cfg ends in a newling anyways. echo 'command[check_test]=/tmp/check_yes.sh' >> nrpe.cfg # Make sure the directory exists such that nrpe can create the nrpe.pid file in the default location mkdir /usr/ || true mkdir /usr/local || true mkdir /usr/local/nagios || true mkdir /usr/local/nagios/var || true # Make sure nagios user exists useradd nagios # Make a plugin touch /tmp/check_yes.sh echo 'echo OK' >> /tmp/check_yes.sh # Give nagios control of plugins chown nagios /tmp/check_yes.sh chmod +x /tmp/check_yes.sh # Start running the NRPE daemon to accept commands cd ../src ./nrpe -c ../sample-config/nrpe.cfg -d # Try to check_nrpe with our check_test command/check_yes.sh plugin ./check_nrpe -H 127.0.0.1 -c check_test exit 0 nrpe-nrpe-4.0.3/uninstall.in000077500000000000000000000246151365211572000160020ustar00rootroot00000000000000#!/bin/sh # Initialize variables myname="$0" quiet=0 prompt=0 verb=0 progs=0 config=0 start=0 delusr=0 delgrp=0 delscpt=0 force="-f" redir=1 # Set file and path names NAME=@PKG_NAME@ OPSYS=@opsys@ DIST=@dist_type@ SBINDIR=@sbindir@ LIBEXECDIR=@libexecdir@ PLUGINSDIR=@pluginsdir@ PIDDIR=@piddir@ CFGDIR=@pkgsysconfdir@ INIT_TYPE=@init_type@ INIT_DIR=@initdir@ INIT_FILE=@initname@ INETD_TYPE=@inetd_type@ INETD_DIR=@inetddir@ INETD_FILE=@inetdname@ SRC_INETD=@src_inetd@ SRC_INIT=@src_init@ NRPE_USER=@nrpe_user@ NRPE_GROUP=@nrpe_group@ NAGIOS_USER=@nagios_user@ NAGIOS_GROUP=@nagios_group@ # Display usage message usage() { echo "Usage: $0 [-q] [-p] [-v] progs|config|startup|user|group|script|all" echo " Optional args:" echo " -q Do not print what is happening" echo " -p Prompt for each action" echo " -v Be a little more verbose about what is happening" echo " One or more of the following are required:" echo " progs Delete the program files" echo " config Delete configuration file(s)" echo " startup Delete startup files (inetd, init, etc.)" echo " user Delete the users" echo " group Delete the groups" echo " script Delete this uninstall script" echo " all Do all of the above" exit 1 } get_opts() { while test $# -gt 0 ; do arg=$1 shift case "$arg" in -q) quiet=1 ;; -p) prompt=1 ;; progs) progs=1 ;; config) config=1 ;; startup) start=1 ;; user) delusr=1; ;; group) delgrp=1; ;; script) delscpt=1; ;; -v) verb=1; force=""; redir=0 ;; all) progs=1; config=1; start=1; delusr=1; delgrp=1; delscpt=1 ;; *) echo "Invalid argument: $arg"; usage ;; esac done if test $prompt -eq 1 -a $quiet -eq 1 ; then echo "The -p and -q flags are mutually exclusive" echo Please specify one or the other exit 1 fi if test $verb -eq 1 -a $quiet -eq 1 ; then echo "The -v and -q flags are mutually exclusive" echo Please specify one or the other exit 1 fi if test $progs -eq 0 -a $config -eq 0 -a $start -eq 0 ; then usage fi } prt_msg() { if test $quiet -eq 1 ; then return 0 fi case $1 in 0) indent="" ;; 1) indent=" " ;; 2) indent=" " ;; *) indent="" ;; esac shift if test $1 -eq 1 -a $verb -eq 0 -a $prompt -eq 0 ; then return 0 fi shift if test $1 -eq 1 -a $prompt -eq 1 ; then shift echo -n "${indent}$*" echo -n "? [Y|n] " read yn if test "x$yn" = x -o x$yn = xy -o x$yn = xY ; then return 0 else return 1 fi fi shift echo "${indent}$*" return 0 } rm_progs() { num=0 prt_msg 1 0 0 "*** Uninstalling Progs" if test -f "$PLUGINSDIR/check_nrpe" ; then num=1 prt_msg 2 0 1 "Delete $PLUGINSDIR/check_nrpe" && { rm $force "$PLUGINSDIR/check_nrpe" prt_msg 2 1 0 "Remove directory $PLUGINSDIR" if test $redir -eq 1; then rmdir "$PLUGINSDIR" 2>/dev/null else rmdir "$PLUGINSDIR" fi prt_msg 2 1 0 "Remove directory $LIBEXECDIR" if test $redir -eq 1; then rmdir "$LIBEXECDIR" 2>/dev/null else rmdir "$LIBEXECDIR" fi } fi if test -f "$SBINDIR/$NAME" ; then num=1 prt_msg 2 0 1 "Delete $SBINDIR/$NAME" && { rm $force "$SBINDIR/$NAME" } fi if test -d "$PIDDIR" ; then num=1 prt_msg 2 0 1 "Remove directory $PIDDIR" && { if test $redir -eq 1; then rmdir "$PIDDIR" 2>/dev/null else rmdir "$PIDDIR" fi } fi if test $num -eq 0; then prt_msg 2 0 0 "There was nothing to uninstall" fi } rm_startup() { num=0 prt_msg 1 0 0 "*** Uninstalling Startup" if test "$SRC_INETD" != unknown; then if test "$INETD_TYPE" = inetd; then rc=`grep -E -q "^\W*$NAME\s+" "$INETD_DIR/$INETD_FILE"` if test $rc -eq 0; then num=1 prt_msg 2 0 1 "($INETD_TYPE) Remove entries from $INETD_DIR/$INETD_FILE" && { prt_msg 2 1 0 "($INETD_TYPE) Creating temp file: $INETD_DIR/$INETD_FILE.$NAME.unin" grep -v -q "\W*$NAME\s+" "$INETD_DIR/$INETD_FILE" > "$INETD_DIR/$INETD_FILE.$NAME.unin" prt_msg 2 1 0 "($INETD_TYPE) Renaming original to: $INETD_DIR/$INETD_FILE.$NAME_save" mv "$INETD_DIR/$INETD_FILE" "$INETD_DIR/$INETD_FILE.$NAME_save" prt_msg 2 1 0 "($INETD_TYPE) Renaming $INETD_DIR/$INETD_FILE.unin to $INETD_DIR/$INETD_FILE" mv "$INETD_DIR/$INETD_FILE.unin" "$INETD_DIR/$INETD_FILE" prt_msg 2 0 0 "($INETD_TYPE) Old $INETD_DIR/$INETD_FILE saved as $INETD_DIR/$INETD_FILE.$NAME_save" } fi elif test -f "$INETD_DIR/$INETD_FILE"; then num=1 if test "$INETD_TYPE" != xinetd; then prt_msg 2 0 1 "($INETD_TYPE) Stop and disable $NAME)" && { case "$INETD_TYPE" in systemd) systemctl stop $NAME; systemctl disable $NAME ;; upstart) if test $verb -eq 1; then stop $NAME else stop $NAME >/dev/null 2>&1 fi ;; launchd) launchctl unload $INETD_FILE; launchctl remove $INETD_FILE; ;; smf*) svcadm disable -s $NAME ;; esac } fi prt_msg 2 0 1 "($INETD_TYPE) Delete $INETD_DIR/$INETD_FILE" && { rm $force "$INETD_DIR/$INETD_FILE" if test "$INETD_TYPE" = systemd; then INETD_FILE=`echo "$INETD_FILE" | sed -e 's/socket$/service/'` prt_msg 2 0 1 "($INETD_TYPE) Delete $INETD_DIR/$INETD_FILE" && { rm $force "$INETD_DIR/$INETD_FILE" } elif test "$INETD_TYPE" = smf10 -o "$INETD_TYPE" = smf11; then prt_msg 2 0 1 "($INIT_TYPE) svcadm restart svc:/system/manifest-import" && { svcadm restart svc:/system/manifest-import } fi } fi fi if test "$SRC_INIT" != unknown; then if test -f "$INIT_DIR/$INIT_FILE"; then num=1 prt_msg 2 0 1 "($INIT_TYPE) Stop and disable $NAME" && { case "$INIT_TYPE" in systemd) systemctl stop $NAME; systemctl disable $NAME ;; upstart) if test $verb -eq 1; then stop $NAME else stop $NAME >/dev/null 2>&1 fi ;; launchd) launchctl unload $INIT_FILE; launchctl remove $INIT_FILE; ;; *bsd) if test -x $INIT_DIR/$INIT_FILE ; then $INIT_DIR/$INIT_FILE stop fi chmod 0644 $INIT_DIR/$INIT_FILE ;; openrc|gentoo) /sbin/start-stop-daemon --stop $NAME /sbin/rc-update del $NAME ;; smf*) svcadm disable -s $NAME ;; sysv) service stop $NAME; chkconfig --del $NAME ;; esac } prt_msg 2 0 1 "($INIT_TYPE) Delete $INIT_DIR/$INIT_FILE" && { rm $force "$INIT_DIR/$INIT_FILE" if test ${OPSYS} = bsd; then prt_msg 2 0 1 "($INITD_TYPE) Remove entries from $INETD_DIR/rc.conf" && { prt_msg 2 1 0 "($INIT_TYPE) Creating temp file: $INETD_DIR/rc.conf.$NAME.unin" grep -v -q "^$NAME" "$INETD_DIR/rc.conf" > "$INETD_DIR/rc.conf.$NAME.unin" prt_msg 2 1 0 "($INIT_TYPE) Renaming original to: $INETD_DIR/rc.conf.$NAME_save" mv "$INETD_DIR/rc.conf" "$INETD_DIR/rc.conf.$NAME_save" prt_msg 2 1 0 "($INIT_TYPE) Renaming $INETD_DIR/rc.conf.unin to $INETD_DIR/rc.conf" mv "$INETD_DIR/rc.conf.unin" "$INETD_DIR/rc.conf" prt_msg 2 0 0 "($INIT_TYPE) Old $INETD_DIR/rc.conf saved as $INETD_DIR/rc.conf.$NAME_save" } fi if test $INIT_TYPE = upstart; then prt_msg 2 0 1 "($INIT_TYPE) initctl reload-configuration" && { initctl reload-configuration } elif test "$INIT_TYPE" = smf10 -o "$INIT_TYPE" = smf11; then prt_msg 2 0 1 "($INIT_TYPE) svcadm restart svc:/system/manifest-import" && { svcadm restart svc:/system/manifest-import } fi } fi fi if test $num -eq 0; then prt_msg 2 0 0 "There was nothing to uninstall" fi } rm_config() { num=0 prt_msg 1 0 0 "*** Uninstalling Config" if test -f "$CFGDIR/$NAME.cfg"; then num=1 prt_msg 2 0 1 "Delete $CFGDIR/$NAME.cfg" || return rm $force "$CFGDIR/$NAME.cfg" prt_msg 2 1 0 "Removing directory $CFGDIR" if test $redir -eq 1; then rmdir "$CFGDIR" 2>/dev/null else rmdir "$CFGDIR" fi fi if test $num -eq 0; then prt_msg 2 0 0 "There was nothing to uninstall" fi } rm_user() { prt_msg 1 0 0 "*** Removing users" prt_msg 2 0 1 "Delete nrpe user:${NRPE_USER} and nagios user:${NAGIOS_USER}" || return if test ${OPSYS} = aix; then if test $redir -eq 1; then rmuser -p ${NRPE_USER} 2>/dev/null rmuser -p ${NAGIOS_USER} 2>/dev/null else rmuser -p ${NRPE_USER} rmuser -p ${NAGIOS_USER} fi elif test ${OPSYS} = osx; then dscl . -delete /Groups/${NRPE_GROUP} GroupMembership ${NRPE_USER} dscl . -delete /Users name ${NRPE_USER} dscl . -delete /Groups/${NAGIOS_GROUP} GroupMembership ${NAGIOS_USER} dscl . -delete /Users name ${NAGIOS_USER} elif test ${DIST} = "freebsd"; then if test $redir -eq 1; then pw del user ${NRPE_USER} 2>/dev/null pw del user ${NAGIOS_USER} 2>/dev/null else pw del user ${NRPE_USER} pw del user ${NAGIOS_USER} fi else if test $redir -eq 1; then userdel -r ${NRPE_USER} 2>/dev/null userdel -r ${NAGIOS_USER} 2>/dev/null else userdel -r ${NRPE_USER} userdel -r ${NAGIOS_USER} fi fi } rm_group() { prt_msg 1 0 0 "*** Removing groups" prt_msg 2 0 1 "Delete nrpe group:${NRPE_GROUP} and nagios group:${NAGIOS_GROUP}" || return if test ${OPSYS} = aix; then if test $redir -eq 1; then rmgroup -p ${NRPE_GROUP} 2>/dev/null rmgroup -p ${NAGIOS_GROUP} 2>/dev/null else rmgroup -p ${NRPE_GROUP} rmgroup -p ${NAGIOS_GROUP} fi elif test ${OPSYS} = osx; then if test $redir -eq 1; then dscl . -delete /Groups/${NRPE_GROUP} 2>/dev/null dscl . -delete /Groups/${NAGIOS_GROUP} 2>/dev/null else dscl . -delete /Groups/${NRPE_GROUP} dscl . -delete /Groups/${NAGIOS_GROUP} fi elif test ${DIST} = "freebsd"; then if test $redir -eq 1; then pw del group ${NRPE_GROUP} 2>/dev/null pw del group ${NAGIOS_GROUP} 2>/dev/null else pw del group ${NRPE_GROUP} pw del group ${NAGIOS_GROUP} fi else if test $redir -eq 1; then groupdel ${NRPE_GROUP} 2>/dev/null groupdel ${NAGIOS_GROUP} 2>/dev/null else groupdel ${NRPE_GROUP} groupdel ${NAGIOS_GROUP} fi fi } rm_script() { prt_msg 1 0 0 "*** Removing ${myname}" prt_msg 2 0 1 "Delete ${myname}" || return if test $redir -eq 1; then rm "${myname}" 2>/dev/null else rm "${myname}" fi } get_opts $@ prt_msg 0 0 0 "* * * Uninstall Starting * * *" if test $progs -eq 1 ; then rm_progs; fi if test $start -eq 1 ; then rm_startup; fi if test $config -eq 1 ; then rm_config; fi if test $delusr -eq 1; then rm_user; fi if test $delgrp -eq 1; then rm_group; fi if test $delscpt -eq 1; then rm_script; fi prt_msg 0 0 0 "* * * Uninstall Complete * * *" nrpe-nrpe-4.0.3/update-cfg.pl000077500000000000000000000103461365211572000160110ustar00rootroot00000000000000#! /usr/bin/perl -w use strict; my ($fname_in, $fname_out); if ($#ARGV != 0) { &usage; } $fname_in = $ARGV[0]; $fname_out = $fname_in . ".new"; if (&check_ssl) { print "\n'$fname_in' already has some or all of the\n"; print "new SSL parameters. No processing will be done.\n\n"; exit 0; } open IN, $fname_in or die "Could not open '$fname_in' for reading: $!\n"; open OUT, ">$fname_out" or die "Could not open '$fname_out' for writing: $!\n"; while () { print OUT; &add_ssl if $_ =~ /allow_weak_random_seed/; } print "\nConfig file '$fname_in' was read.\n"; print "The new SSL comments and parameters were added and the output written to\n"; print "'$fname_out'\n"; print "Please check this file for accuracy and rename it when you are satisfied.\n\n"; close IN; close OUT; # ========================================================================== sub usage { print "\nUsage: update-cfg.pl \n\n"; print "This perl script will read the nrpe configuration file\n"; print "specified on the command line, and write out a new file\n"; print "with the new SSL comments and parameters added.\n\n"; exit 1; } # -------------------------------------------------------------------------- # check_ssl checks if the config file already has the ssl parameters # -------------------------------------------------------------------------- sub check_ssl { my $has_ssl = 0; open IN, $fname_in or die "Could not open '$fname_in' for reading: $!\n"; while () { if ($_ =~ /ssl_version=/ or $_ =~ /ssl_use_adh=/ or $_ =~ /ssl_cipher_list=/ or $_ =~ /ssl_cacert_file=/ or $_ =~ /ssl_cert_file=/ or $_ =~ /ssl_privatekey_file=/ or $_ =~ /ssl_client_certs=/ or $_ =~ /ssl_logging=/) { $has_ssl = 1; last; } } close IN; return $has_ssl; } # -------------------------------------------------------------------------- # add_ssl inserts the new SSL comments and parameters into the config file # -------------------------------------------------------------------------- sub add_ssl { my $txt = <<"END_SSL"; # SSL/TLS OPTIONS # These directives allow you to specify how to use SSL/TLS. # SSL VERSION # This can be any of: SSLv2 (only use SSLv2), SSLv2+ (use any version), # SSLv3 (only use SSLv3), SSLv3+ (use SSLv3 or above), TLSv1 (only use # TLSv1), TLSv1+ (use TLSv1 or above), TLSv1.1 (only use TLSv1.1), # TLSv1.1+ (use TLSv1.1 or above), TLSv1.2 (only use TLSv1.2), # TLSv1.2+ (use TLSv1.2 or above) # If an "or above" version is used, the best will be negotiated. So if both # ends are able to do TLSv1.2 and use specify SSLv2, you will get TLSv1.2. #ssl_version=SSLv2+ # SSL USE ADH # This is for backward compatibility and is DEPRECATED. Set to 1 to enable # ADH or 2 to require ADH. 1 is currently the default but will be changed # in a later version. #ssl_use_adh=1 # SSL CIPHER LIST # This lists which ciphers can be used. For backward compatibility, this # defaults to 'ssl_cipher_list=ALL:!MD5:\@STRENGTH' in this version but # will be changed to something like the example below in a later version of NRPE. #ssl_cipher_list=ALL:!MD5:\@STRENGTH #ssl_cipher_list=ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!RC4:!MD5:\@STRENGTH # SSL Certificate and Private Key Files #ssl_cacert_file=/etc/ssl/servercerts/ca-cert.pem #ssl_cert_file=/etc/ssl/servercerts/nagios-cert.pem #ssl_privatekey_file=/etc/ssl/servercerts/nagios-key.pem # SSL USE CLIENT CERTS # This options determines client certificate usage. # Values: 0 = Don't ask for or require client certificates (default) # 1 = Ask for client certificates # 2 = Require client certificates #ssl_client_certs=0 # SSL LOGGING # This option determines which SSL messages are send to syslog. OR values # together to specify multiple options. # Values: 0x00 (0) = No additional logging (default) # 0x01 (1) = Log startup SSL/TLS parameters # 0x02 (2) = Log remote IP address # 0x04 (4) = Log SSL/TLS version of connections # 0x08 (8) = Log which cipher is being used for the connection # 0x10 (26) = Log if client has a certificate # 0x20 (32) = Log details of client's certificate if it has one # -1 or 0xff or 0x2f = All of the above #ssl_logging=0x00 END_SSL print OUT $txt; } nrpe-nrpe-4.0.3/update-version000077500000000000000000000062031365211572000163220ustar00rootroot00000000000000#!/bin/sh # Make sure autoconf is installed and is the correct version min_autoconf_major=2 min_autoconf_minor=59 autoconf_error="Autoconf version $min_autoconf_major.$min_autoconf_minor or later must be installed to run this script." autoconf_version=`(autoconf -V 2> /dev/null) |\ grep "^autoconf (GNU Autoconf)" | gawk '{print $NF}'` if [ "$autoconf_version" != "" ] ; then autoconf_major=`echo $autoconf_version | gawk -F '.' '{print $1}'` autoconf_minor=`echo $autoconf_version | gawk -F '.' '{print $2}'` if [ $autoconf_major -lt $min_autoconf_major -o $autoconf_minor -lt $min_autoconf_minor ] ; then echo $autoconf_error exit 1 fi else echo $autoconf_error exit 1 fi # Get date (two formats) if [ -n "$2" ]; then LONGDATE=$(LC_ALL=C date -u -d "$2" "+%B %d, %Y") SHORTDATE=$(date -u -d "$2" "+%Y-%m-%d") else LONGDATE=$(LC_ALL=C date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%B %d, %Y") SHORTDATE=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d") fi # Current version number CURRENTVERSION=4.0.3 # Last date LASTDATE=2020-04-28 if [ "x$1" = "x" ] then echo "Usage: $0 [revision date]" echo "" echo "Run this script with the name of the new version (i.e \"2.6\") to" echo "update version number and modification date in files." echo "Use the \"newdate\" argument if you want to keep the current version" echo "number and just update the modification date." echo "When using \"newdate\" you can specify the release date with" echo "a second argument in the form of YYYY-MM-DD." echo "" echo "Current version=$CURRENTVERSION" echo "Current Modification date=$LASTDATE" echo "" exit 1 fi newversion=$1 if [ "x$newversion" = "xnewdate" ] then newversion=$CURRENTVERSION fi # Update version number and release date in common code perl -i -p -e "s/VERSION \".*\"/VERSION \"$1\"/;" include/common.h.in perl -i -p -e "s/MODIFICATION_DATE \".*\"/MODIFICATION_DATE \"$SHORTDATE\"/;" include/common.h.in perl -i -p -e "s/Last Modified: [0-9].*/Last Modified: $SHORTDATE/;" include/common.h.in # Update version number and release date in main code perl -i -p -e "s/Last Modified: [0-9].*/Last Modified: $SHORTDATE/;" src/nrpe.c perl -i -p -e "s/Last Modified: [0-9].*/Last Modified: $SHORTDATE/;" src/check_nrpe.c # Update version number and release date in configure.in perl -i -p -e "if( /^AC_INIT/) { s/$CURRENTVERSION/$1/; }" configure.ac perl -i -p -e "s/PKG_VERSION=.*/PKG_VERSION=\"$1\"/;" configure.ac perl -i -p -e "s/PKG_REL_DATE=.*\"/PKG_REL_DATE=\"$SHORTDATE\"/;" configure.ac # Run autoconf to update configure (this is easier than updating every instance # of the version number in configure) autoconf # Update RPM spec file with version number perl -i -p -e "s/%define version .*/%define version $1/;" nrpe.spec.in perl -i -p -e "if( /\%define _docdir/) { s/$CURRENTVERSION/$1/; }" nrpe.spec.in # Update this file with version number and last date perl -i -p -e "s/^CURRENTVERSION=.*/CURRENTVERSION=$newversion/;" update-version perl -i -p -e "s/^LASTDATE=.*/LASTDATE=$SHORTDATE/;" update-version