From 073f232890bf532ac59ef29f66d31fa963694478 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 4 Feb 2006 13:16:08 +0000 Subject: [PATCH] initial import of nrpe-2.3 (Nagios Remote Plugin Executor) NRPE is an addon for Nagios that allows you to execute "local" plugins (like check_disk, check_procs, etc.) on remote hosts. The check_nrpe plugin is called from Nagios and makes plugin execution requests to the NRPE daemon running on the remote host (either as a standalone daemon or as a service under inetd). Supports passing command arguments to server, as well as native SSL/TLS encryption (anonymous DH mode). help/ok sturm@ bernd@ --- net/nagios/nrpe/Makefile | 44 +++++++++++++++++++++++ net/nagios/nrpe/distinfo | 4 +++ net/nagios/nrpe/patches/patch-configure | 12 +++++++ net/nagios/nrpe/patches/patch-src_nrpe_c | 12 +++++++ net/nagios/nrpe/patches/patch-src_utils_c | 14 ++++++++ net/nagios/nrpe/pkg/DESCR | 6 ++++ net/nagios/nrpe/pkg/PLIST | 12 +++++++ 7 files changed, 104 insertions(+) create mode 100644 net/nagios/nrpe/Makefile create mode 100644 net/nagios/nrpe/distinfo create mode 100644 net/nagios/nrpe/patches/patch-configure create mode 100644 net/nagios/nrpe/patches/patch-src_nrpe_c create mode 100644 net/nagios/nrpe/patches/patch-src_utils_c create mode 100644 net/nagios/nrpe/pkg/DESCR create mode 100644 net/nagios/nrpe/pkg/PLIST diff --git a/net/nagios/nrpe/Makefile b/net/nagios/nrpe/Makefile new file mode 100644 index 00000000000..825dbf9e915 --- /dev/null +++ b/net/nagios/nrpe/Makefile @@ -0,0 +1,44 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2006/02/04 13:16:08 david Exp $ + +COMMENT= "Nagios Remote Plugin Executor" + +DISTNAME= nrpe-2.3 +CATEGORIES= net + +MAINTAINER= David Krause +HOMEPAGE= http://www.nagios.org/ + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes +WANTLIB= c crypto ssl wrap + +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nagios/} + +RUN_DEPENDS= nagios-plugins::net/nagios/plugins + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+=--enable-command-args +CONFIGURE_ARGS+=--libexecdir=${LOCALBASE}/libexec/nagios +CONFIGURE_ARGS+=--with-nrpe-user=_nrpe +CONFIGURE_ARGS+=--with-nrpe-group=_nrpe +CONFIGURE_ARGS+=--with-kerberos-inc=/usr/include/kerberosV/ + +pre-configure: + @perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/src/nrpe.c + +do-install: + ${INSTALL_DATA_DIR} ${PREFIX}/libexec/nagios + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nrpe + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/nrpe + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/nrpe + ${INSTALL_DATA} ${WRKSRC}/SECURITY ${PREFIX}/share/doc/nrpe + ${INSTALL_DATA} ${WRKSRC}/sample-config/nrpe.cfg ${PREFIX}/share/examples/nrpe + ${INSTALL_PROGRAM} ${WRKSRC}/src/check_nrpe ${PREFIX}/libexec/nagios + ${INSTALL_PROGRAM} ${WRKSRC}/src/nrpe ${PREFIX}/sbin + +NO_REGRESS= Yes + +.include diff --git a/net/nagios/nrpe/distinfo b/net/nagios/nrpe/distinfo new file mode 100644 index 00000000000..641db5b0db8 --- /dev/null +++ b/net/nagios/nrpe/distinfo @@ -0,0 +1,4 @@ +MD5 (nrpe-2.3.tar.gz) = 2e9b7d0a29aa9b57c4a0cc14d80c75c1 +RMD160 (nrpe-2.3.tar.gz) = b366e1bb4209921002079c8cf75414bb9cf25cd7 +SHA1 (nrpe-2.3.tar.gz) = 03231fecaf5dbbde1d56ba95b0ad77b30106df0c +SIZE (nrpe-2.3.tar.gz) = 97586 diff --git a/net/nagios/nrpe/patches/patch-configure b/net/nagios/nrpe/patches/patch-configure new file mode 100644 index 00000000000..fa0acbd6ad0 --- /dev/null +++ b/net/nagios/nrpe/patches/patch-configure @@ -0,0 +1,12 @@ +$OpenBSD: patch-configure,v 1.1.1.1 2006/02/04 13:16:08 david Exp $ +--- configure.orig Mon Jan 23 10:36:50 2006 ++++ configure Wed Jan 25 13:46:20 2006 +@@ -5594,6 +5594,8 @@ _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ++int allow_severity; ++int deny_severity; + + + int diff --git a/net/nagios/nrpe/patches/patch-src_nrpe_c b/net/nagios/nrpe/patches/patch-src_nrpe_c new file mode 100644 index 00000000000..f1e0587522a --- /dev/null +++ b/net/nagios/nrpe/patches/patch-src_nrpe_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_nrpe_c,v 1.1.1.1 2006/02/04 13:16:08 david Exp $ +--- src/nrpe.c.orig Mon Jan 23 10:36:50 2006 ++++ src/nrpe.c Wed Jan 25 10:48:41 2006 +@@ -47,7 +47,7 @@ int use_ssl=FALSE; + char *command_name=NULL; + char *macro_argv[MAX_COMMAND_ARGUMENTS]; + +-char config_file[MAX_INPUT_BUFFER]="nrpe.cfg"; ++char config_file[MAX_INPUT_BUFFER]="%%SYSCONFDIR%%/nrpe.cfg"; + int server_port=DEFAULT_SERVER_PORT; + char server_address[16]="0.0.0.0"; + int socket_timeout=DEFAULT_SOCKET_TIMEOUT; diff --git a/net/nagios/nrpe/patches/patch-src_utils_c b/net/nagios/nrpe/patches/patch-src_utils_c new file mode 100644 index 00000000000..798081d5fee --- /dev/null +++ b/net/nagios/nrpe/patches/patch-src_utils_c @@ -0,0 +1,14 @@ +$OpenBSD: patch-src_utils_c,v 1.1.1.1 2006/02/04 13:16:08 david Exp $ +--- src/utils.c.orig Wed Oct 15 18:14:27 2003 ++++ src/utils.c Thu Feb 2 00:42:42 2006 +@@ -90,8 +90,8 @@ void randomize_buffer(char *buffer,int b + 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"); ++ /* try to get seed value from /dev/arandom, as its a better source of entropy */ ++ fp=fopen("/dev/arandom","r"); + if(fp!=NULL){ + seed=fgetc(fp); + fclose(fp); diff --git a/net/nagios/nrpe/pkg/DESCR b/net/nagios/nrpe/pkg/DESCR new file mode 100644 index 00000000000..cd9cb24bef5 --- /dev/null +++ b/net/nagios/nrpe/pkg/DESCR @@ -0,0 +1,6 @@ +NRPE is an addon for Nagios that allows you to execute "local" plugins +(like check_disk, check_procs, etc.) on remote hosts. The check_nrpe +plugin is called from Nagios and makes plugin execution requests to the +NRPE daemon running on the remote host (either as a standalone daemon +or as a service under inetd). Supports passing command arguments to +server, as well as native SSL/TLS encryption (anonymous DH mode). diff --git a/net/nagios/nrpe/pkg/PLIST b/net/nagios/nrpe/pkg/PLIST new file mode 100644 index 00000000000..c2a1a2e6a23 --- /dev/null +++ b/net/nagios/nrpe/pkg/PLIST @@ -0,0 +1,12 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2006/02/04 13:16:08 david Exp $ +@newgroup _nrpe:556 +@newuser _nrpe:556:_nrpe:daemon:NRPE Account:/nonexistent:/sbin/nologin +libexec/nagios/ +libexec/nagios/check_nrpe +sbin/nrpe +share/doc/nrpe/ +share/doc/nrpe/README +share/doc/nrpe/SECURITY +share/examples/nrpe/ +share/examples/nrpe/nrpe.cfg +@sample ${SYSCONFDIR}/nrpe.cfg