[Pkg-nagios-changes] nagios-nrpe/debian/patches 00list, NONE,
1.1 01_nodevrandom-and-docoptions.dpatch, NONE, 1.1
seanius at haydn.debian.org
seanius at haydn.debian.org
Tue Oct 25 13:08:44 UTC 2005
Update of /cvsroot/pkg-nagios/nagios-nrpe/debian/patches
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv18933/debian/patches
Added Files:
00list 01_nodevrandom-and-docoptions.dpatch
Log Message:
added options + dev/randomless patch from weasel and joerg. note that
these are dpatch patches, but still using cdbs simple-patchsys for
the time being.
--- NEW FILE: 00list ---
01_nodevrandom-and-docoptions.dpatch
--- NEW FILE: 01_nodevrandom-and-docoptions.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_nodevrandom-and-docoptions.dpatch by <seanius at localhost.localdomain>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad sid~/src/check_nrpe.c sid/src/check_nrpe.c
--- sid~/src/check_nrpe.c 2003-09-09 04:52:37.000000000 +0200
+++ sid/src/check_nrpe.c 2005-10-25 14:17:25.000000000 +0200
@@ -82,7 +82,7 @@
if(result!=OK || show_help==TRUE){
- printf("Usage: check_nrpe -H <host> [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]\n");
+ printf("Usage: check_nrpe -H <host> [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>] [--no-ssl] [--help] [--license]\n");
printf("\n");
printf("Options:\n");
printf(" <host> = The address of the host running the NRPE daemon\n");
@@ -92,6 +92,9 @@
printf(" [arglist] = Optional arguments that should be passed to the command. Multiple\n");
printf(" arguments should be separated by a space. If provided, this must be\n");
printf(" the last option supplied on the command line.\n");
+ printf(" -h, --help Print this short help.\n");
+ printf(" -l,--license Print licensing information.\n");
+ printf(" -n,--no-ssl Do not initial an ssl handshake with the server, talk in plaintext.\n");
printf("\n");
printf("Note:\n");
printf("This plugin requires that you have the NRPE daemon running on the remote host.\n");
diff -urNad sid~/src/nrpe.c sid/src/nrpe.c
--- sid~/src/nrpe.c 2003-09-09 04:52:37.000000000 +0200
+++ sid/src/nrpe.c 2005-10-25 14:17:25.000000000 +0200
@@ -120,13 +120,16 @@
else if(result!=OK || show_help==TRUE){
- printf("Usage: nrpe -c <config_file> <mode>\n");
+ printf("Usage: nrpe -c <config_file> <mode> [--help] [--license] [--no-ssl]\n");
printf("\n");
printf("Options:\n");
printf(" <config_file> = Name of config file to use\n");
- printf(" <mode> = One of the following two operating modes:\n");
- printf(" -i = Run as a service under inetd or xinetd\n");
- printf(" -d = Run as a standalone daemon\n");
+ printf(" <mode> = One of the following two 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(" -h, --help Print this short help.\n");
+ printf(" -l, --license Print licensing information.\n");
+ printf(" -n, --no-ssl Do not initial an ssl handshake with the server, talk in plaintext.\n");
printf("\n");
printf("Notes:\n");
printf("This program is designed to process requests from the check_nrpe\n");
diff -urNad sid~/src/utils.c sid/src/utils.c
--- sid~/src/utils.c 2003-06-14 03:29:28.000000000 +0200
+++ sid/src/utils.c 2005-10-25 14:17:25.000000000 +0200
@@ -90,17 +90,7 @@
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);
-
+ seed=(int)time(NULL)*311-getpid()*359+getppid()*383;
srand(seed);
for(x=0;x<buffer_size;x++)
buffer[x]=(int)'0'+(int)(72.0*rand()/(RAND_MAX+1.0));
More information about the Pkg-nagios-changes
mailing list