From f1af93971b7490792d8541bc790e0d8c6d787059 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 6 Sep 2019 10:28:05 +0100 Subject: gentoo resync : 06.08.2019 --- net-analyzer/nrpe/files/nrpe-2.14-multiline.patch | 204 ---------------------- 1 file changed, 204 deletions(-) delete mode 100644 net-analyzer/nrpe/files/nrpe-2.14-multiline.patch (limited to 'net-analyzer/nrpe/files/nrpe-2.14-multiline.patch') diff --git a/net-analyzer/nrpe/files/nrpe-2.14-multiline.patch b/net-analyzer/nrpe/files/nrpe-2.14-multiline.patch deleted file mode 100644 index 3af2ef95baba..000000000000 --- a/net-analyzer/nrpe/files/nrpe-2.14-multiline.patch +++ /dev/null @@ -1,204 +0,0 @@ -Add support for large output - -http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.htmlIndex: nrpe-2.14/include/common.h -=================================================================== -Index: nrpe-2.14/include/common.h -=================================================================== ---- nrpe-2.14.orig/include/common.h -+++ nrpe-2.14/include/common.h -@@ -41,7 +41,7 @@ - #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_INPUT_BUFFER 16384 /* max size of most buffers we use */ - #define MAX_FILENAME_LENGTH 256 - - #define MAX_HOST_ADDRESS_LENGTH 256 /* max size of a host address */ -@@ -55,12 +55,14 @@ - - #define QUERY_PACKET 1 /* id code for a packet containing a query */ - #define RESPONSE_PACKET 2 /* id code for a packet containing a response */ -+#define RESPONSE_PACKET_WITH_MORE 3 /* id code for a packet containing a response, with more data to follow */ - - #define NRPE_PACKET_VERSION_3 3 /* packet version identifier */ - #define NRPE_PACKET_VERSION_2 2 - #define NRPE_PACKET_VERSION_1 1 /* older packet version identifiers (no longer supported) */ - - #define MAX_PACKETBUFFER_LENGTH 1024 /* max amount of data we'll send in one query/response */ -+ /* WARNING - do not change this as older clients/servers will not work */ - - typedef struct packet_struct{ - int16_t packet_version; -Index: nrpe-2.14/src/check_nrpe.c -=================================================================== ---- nrpe-2.14.orig/src/check_nrpe.c -+++ nrpe-2.14/src/check_nrpe.c -@@ -221,6 +221,11 @@ int main(int argc, char **argv){ - return STATE_UNKNOWN; - } - -+ /* Altinity patch: Allow multiple packets to be received */ -+ /* Indentation not corrected to allow simpler patching */ -+ /* START MULTI_PACKET LOOP */ -+ do { -+ - /* wait for the response packet */ - bytes_to_recv=sizeof(receive_packet); - if(use_ssl==FALSE) -@@ -233,31 +238,24 @@ int main(int argc, char **argv){ - /* reset timeout */ - 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){ - printf("CHECK_NRPE: Error receiving data from daemon.\n"); -+ graceful_close(sd,1000); - return STATE_UNKNOWN; - } - - /* server disconnected */ - else if(rc==0){ - printf("CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.\n"); -+ graceful_close(sd,1000); - return STATE_UNKNOWN; - } - - /* receive underflow */ - else if(bytes_to_recv0) -+ send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET_WITH_MORE); -+ else -+ send_packet.packet_type=(int16_t)htons(RESPONSE_PACKET); -+ - /* calculate the crc 32 value of the packet */ - send_packet.crc32_value=(u_int32_t)0L; - calculated_crc32=calculate_crc32((char *)&send_packet,sizeof(send_packet)); -@@ -1303,6 +1319,9 @@ void handle_connection(int sock){ - SSL_write(ssl,&send_packet,bytes_to_send); - #endif - -+ } while (strlen(pbuffer) > 0); -+ /* END MULTI_PACKET LOOP */ -+ - #ifdef HAVE_SSL - if(ssl){ - complete_SSL_shutdown( ssl); -- cgit v1.2.3