[Nagios-devel] Small read status data patch
Posted: Fri Jun 22, 2007 2:41 pm
This is a multi-part message in MIME format.
--------------020208020503020406020909
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hello Ethan, hello list,
testing around with multiline plugin output Hendrik and I found that the
long
plugin output in extinfo.cgi was cut around 2000 bytes. The reason for that
restriction is a hardcoded buffer definition in function
xsddefault_read_status_data:
char input[2048]="";
I attached a small patch against xsddefault.c to replace '2048' with
MAX_PLUGIN_OUTPUT_LENGTH. I would prefer this setting instead of
MAX_INPUT_BUFFER because otherwise numerous buffer definitions will be
extended and IMO the plugin output length will be likely the longer part
in future.
Kind regards,
Matthias
--------------020208020503020406020909
Content-Type: text/x-patch;
name="xsddefault.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="xsddefault.c.patch"
--- xdata/xsddefault.c.old 2007-06-22 23:33:06.000000000 +0200
+++ xdata/xsddefault.c 2007-06-22 23:43:43.000000000 +0200
@@ -680,7 +680,7 @@
char *input=NULL;
mmapfile *thefile=NULL;
#else
- char input[2048]="";
+ char input[MAX_PLUGIN_OUTPUT_LENGTH]="";
FILE *fp=NULL;
#endif
int data_type=XSDDEFAULT_NO_DATA;
--------------020208020503020406020909--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
--------------020208020503020406020909
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hello Ethan, hello list,
testing around with multiline plugin output Hendrik and I found that the
long
plugin output in extinfo.cgi was cut around 2000 bytes. The reason for that
restriction is a hardcoded buffer definition in function
xsddefault_read_status_data:
char input[2048]="";
I attached a small patch against xsddefault.c to replace '2048' with
MAX_PLUGIN_OUTPUT_LENGTH. I would prefer this setting instead of
MAX_INPUT_BUFFER because otherwise numerous buffer definitions will be
extended and IMO the plugin output length will be likely the longer part
in future.
Kind regards,
Matthias
--------------020208020503020406020909
Content-Type: text/x-patch;
name="xsddefault.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="xsddefault.c.patch"
--- xdata/xsddefault.c.old 2007-06-22 23:33:06.000000000 +0200
+++ xdata/xsddefault.c 2007-06-22 23:43:43.000000000 +0200
@@ -680,7 +680,7 @@
char *input=NULL;
mmapfile *thefile=NULL;
#else
- char input[2048]="";
+ char input[MAX_PLUGIN_OUTPUT_LENGTH]="";
FILE *fp=NULL;
#endif
int data_type=XSDDEFAULT_NO_DATA;
--------------020208020503020406020909--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]