[Nagios-devel] Patch for not allowing name changes in cmd.cgi

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] Patch for not allowing name changes in cmd.cgi

Post by Guest »

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C2B806.289CE280
Content-Type: text/plain

Hi!

Not sure what you will think about this patch. I've made a change to cmd.cgi
so that if you want to run a command that requests your name, eg, scheduling
an outage, it now doesn't allow you to change the name field. This should
raise confidence in who requested the command.

I've put a little if statement around the name setting so that if the name
is blank, then it will be an editable field, for people who do not use
authentication. Maybe this should also be the case if there is a generic
login (eg, guest).

Ton >


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


------_=_NextPart_000_01C2B806.289CE280
Content-Type: application/octet-stream;
name="cmd.c.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="cmd.c.patch"

*** cmd.c.original Thu Jan 9 15:06:23 2003=0A=
--- cmd.c Thu Jan 9 16:19:09 2003=0A=
***************=0A=
*** 795,802 ****=0A=
printf("Persistent:");=0A=
printf("");=0A=
printf("\n");=0A=
! printf("Author (Your =
Name):");=0A=
! printf("",comment_author);=0A=
printf("\n");=0A=
printf("Comment:");=0A=
printf("",comment_data);=0A=
--- 795,809 ----=0A=
printf("Persistent:");=0A=
printf("");=0A=
printf("\n");=0A=
! if (!strcmp(comment_author,"")) {=0A=
! printf("Author (Your =
Name):");=0A=
! printf("",comment_author);=0A=
! }=0A=
! else {=0A=
! printf("Author:");=0A=
! printf("",comment_author);=0A=
! printf("%s",comment_author);=0A=
! } =0A=
printf("\n");=0A=
printf("Comment:");=0A=
printf("",comment_data);=0A=
***************=0A=
*** 818,825 ****=0A=
printf("Persistent:");=0A=
printf("");=0A=
printf("\n");=0A=
! printf("Author (Your =
Name):");=0A=
! printf("",comment_author);=0A=
printf("\n");=0A=
printf("Comment:");=0A=
printf("",comment_data);=0A=
--- 825,839 ----=0A=
printf("Persistent:");=0A=
printf("");=0A=
printf("\n");=0A=
! if (!strcmp(comment_author,"")) {=0A=
! printf("Author (Your =
Name):");=0A=
! printf("<INPUT TYPE=3D'TEXT' NAME=3D'com

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: Ton.Voon@egg.com
Locked