[Nagios-devel] Question,

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Question,

Post by Guest »

This is a multi-part message in MIME format.
--------------020407090702030308050905
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 08/31/2010 04:19 PM, Jochen Bern wrote:
> The whitespace detection is still not quite finished because I hit a
> snag in the existing code, namely, in cgi/cgiutils.c::url_encode() :

In the process of touching up 3.2.3 (CVS HEAD as of today) to include my
local patches, I had a look at the references to url_encode(); I don't
think that any reference *other* than the Command Expansion will ever
feed control characters into it. Thus, I fixed the "is a space"
comparison and removed the workaround in CE.

Also included in the attached patch:
-- corrected typo in "entry" hyperlink (thanks to Alexey Dvoryanchikov,
via Icinga / Michael Friedrich)
-- added hyperlinks to the CE of (active) check commands and event
handlers into the extinfo.cgi pages of hosts and services

-------

While I'm writing: I intend to streamline some more patches so that they
can be included into the authoritative source, but need to be activated
by explicit request. I'm thinking along the lines of
CFLAGS=3D"-DFEATURE_XY"
and optionally adding support into configure, pretty much like
--with-feature-xy
Or is there an established other syntax/format/... to do this?

Kind regards,
J. Bern
--=20
Jochen Bern, Systemingenieur --- LINworks GmbH
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=E4ftsf=FChrer Metin Dogan, Oliver Mic=
hel

--------------020407090702030308050905
Content-Type: text/plain;
name="nagios-3.2.3-CommandExpandFixes-patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="nagios-3.2.3-CommandExpandFixes-patch.txt"

diff -aur nagios-3.2.3-CVS-20101105/cgi/cgiutils.c nagios-3.2.3+Fixes/cgi/cgiutils.c
--- nagios-3.2.3-CVS-20101105/cgi/cgiutils.c 2010-10-23 11:57:45.000000000 +0200
+++ nagios-3.2.3+Fixes/cgi/cgiutils.c 2010-11-05 13:18:34.000000000 +0100
@@ -920,7 +920,7 @@
}

/* spaces are pluses */
- else if((char)input[x]dangling whitespace:\n",bg_class,bg_class);
printf("$ARG%u$=",bg_class,i);
for (c=command_args,j=0;c&&isspace(*c);c++,j++)
- /* TODO: As long as the hyperlinks change all whitespace into actual spaces,
- we'll output "[WS]" (whitespace) instead of "[SP]"(ace). */
- /* if ((*c)==' ') printf("[SP]"); */
- if ((*c)==' ') printf("[WS]");
+ if ((*c)==' ') printf("[SP]");
else if ((*c)=='\f') printf("[FF]");
else if ((*c)=='\n') printf("[LF]");
else if ((*c)=='\r') printf("[CR]");
@@ -2391,10 +2388,7 @@
for (;c&&((*c)!='\0')&&(j");
for (;c&&((*c)!='\0');c++)
- /* TODO: As long as the hyperlinks change all whitespace into actual spaces,
- we'll output "[WS]" (whitespace) instead of "[SP]"(ace). */
- /* if ((*c)==' ') printf("[SP]"); */
- if ((*c)==' ') printf("[WS]");
+ if ((*c)==' ') printf("[SP]");
else if ((*c)=='\f') printf("[FF]");
else if ((*c)=='\n') printf("[LF]");
else if ((*c)=='\r') printf("[CR]");
@@ -2456,7 +2450,7 @@
printf("Contact Groups\n",(display_type==DISPLAY_CONTACTGROUPS)?"SELECTED":"");
printf("Timeperiods\n",(display_type==DISPLAY_TIMEPERIODS)?"SELECTED":"");
printf("Co

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked