Ethan Galstad 23 лет назад
Родитель
Сommit
b5b56231eb
2 измененных файлов с 19 добавлено и 20 удалено
  1. 6 6
      src/dh.h
  2. 13 14
      src/nrpe.c

+ 6 - 6
src/dh.h

@@ -4,12 +4,12 @@
 DH *get_dh512()
 	{
 	static unsigned char dh512_p[]={
-		0xA8,0xB7,0xDD,0xA4,0xF1,0x04,0xC7,0x59,0xE5,0x64,0x96,0xA7,
-		0x66,0xDF,0xB4,0x01,0xCB,0xCD,0xB0,0xB0,0x1E,0x4E,0xFE,0x79,
-		0x6F,0xD1,0xF8,0x95,0xD6,0xA6,0x74,0x7F,0x78,0x35,0x04,0x26,
-		0x26,0xD0,0x01,0x6C,0x0C,0x3B,0x2E,0xCA,0x2E,0x21,0x5F,0x78,
-		0x84,0xF7,0x36,0xB6,0x00,0x73,0xAF,0x66,0xF0,0xD7,0x3D,0xBD,
-		0xFD,0x29,0x8A,0x83,
+		0xAA,0xF3,0x9B,0x3F,0xDE,0x79,0x15,0x52,0x5E,0x92,0x3A,0xD1,
+		0x47,0x21,0xFE,0xAA,0xB4,0x56,0xB8,0x6E,0xB2,0x2A,0x79,0xBC,
+		0x54,0xB0,0xD0,0xF6,0xCE,0x2D,0x73,0x9A,0x8C,0x12,0x99,0xEE,
+		0x0F,0xDC,0x3E,0x0B,0x8D,0xF1,0xAA,0x8A,0x1B,0xAA,0x32,0xD9,
+		0x7B,0xA9,0xF9,0xC0,0xE4,0x5A,0x78,0x33,0x69,0x99,0x56,0x7B,
+		0xD1,0xB2,0xBE,0x6B,
 		};
 	static unsigned char dh512_g[]={
 		0x02,

+ 13 - 14
src/nrpe.c

@@ -4,7 +4,7 @@
  * Copyright (c) 1999-2003 Ethan Galstad (nagios@nagios.org)
  * License: GPL
  *
- * Last Modified: 06-13-2003
+ * Last Modified: 07-22-2003
  *
  * Command line: nrpe -c <config_file> [--inetd | --daemon]
  *
@@ -551,7 +551,6 @@ void wait_for_connections(void){
 		exit(STATE_CRITICAL);
                 }
 
-
 	/* bind the address to the Internet socket */
 	if(bind(sock,(struct sockaddr *)&myname,sizeof(myname))<0){
 		syslog(LOG_ERR,"Network server bind failure (%d: %s)\n",errno,strerror(errno));
@@ -593,18 +592,6 @@ void wait_for_connections(void){
 			sleep(1);
 		        }
 
-		/* hey, there was an error... */
-		if(new_sd<0){
-
-			/* log error to syslog facility */
-			syslog(LOG_ERR,"Network server accept failure (%d: %s)",errno,strerror(errno));
-
-			/* close socket prioer to exiting */
-			close(sock);
-
-			return;
-			}
-
 		/* child process should handle the connection */
     		pid=fork();
     		if(pid==0){
@@ -613,6 +600,18 @@ void wait_for_connections(void){
 			pid=fork();
 			if(pid==0){
 
+				/* hey, there was an error... */
+				if(new_sd<0){
+
+					/* log error to syslog facility */
+					syslog(LOG_ERR,"Network server accept failure (%d: %s)",errno,strerror(errno));
+
+					/* close socket prioer to exiting */
+					close(sock);
+			
+					return;
+				        }
+
 				/* grandchild does not need to listen for connections, so close the socket */
 				close(sock);