Content-Type: Text/Plain;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
Hallo again,
I realized that I send nonworking patches. (I should go back to bed..)
What do you think about the patch/functionality?=20
(I know, the "performance" on the list was poor..)
Regards,
Christian
On Monday, November 01, 2010 13:10:13 Christian Schneemann wrote:
> Hi,
> shame on me, send mail before adding text
>=20
> The patches send could make the env-variable used in the cgi to
> authenticate the user changeable.
>=20
> We had the "problem" at a customer, that he wanted to use a fancy
> SSO-Service with nagios.
>=20
> Therefore we needed to change the HTTP_USER in cgiauth.c to the new
> variable the SSO-Service gave us.
>=20
> Don't know how many different SSO-Services are available and what variabl=
es
> they use to submit the username to the services after the SSO. So we made
> it configurable in the cgi.cfg
>=20
> What do you think about this? Maybe the default value should be HTTP_USER,
> even if it is not configured in the configfile.
=2D-=20
Christian Schneemann =20
Linux Consultant & Developer
Tel.: +49-175-7250665
Mail: [email protected]
B1 Systems GmbH
Osterfeldstra=DFe 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
--Boundary-00=_Q1rzMGjbvHynlXR
Content-Type: text/x-patch;
charset="UTF-8";
name="cgiauth.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="cgiauth.c.patch"
--- cgi/cgiauth.c.orig 2010-10-30 16:43:36.000000000 +0200
+++ cgi/cgiauth.c 2010-11-01 13:58:22.000000000 +0100
@@ -36,7 +36,7 @@
extern int use_authentication;
extern int use_ssl_authentication;
-
+extern char cgi_user_env[MAX_FILENAME_LENGTH];
/* get current authentication information */
@@ -64,7 +64,7 @@
temp_ptr=getenv("SSL_CLIENT_S_DN_CN");
}
else{
- temp_ptr=getenv("REMOTE_USER");
+ temp_ptr=getenv(cgi_user_env);
}
if(temp_ptr==NULL){
authinfo->username="";
--Boundary-00=_Q1rzMGjbvHynlXR
Content-Type: text/x-patch;
charset="UTF-8";
name="cgiutils.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="cgiutils.c.patch"
--- cgi/cgiutils.c.orig 2010-11-01 10:56:28.000000000 +0100
+++ cgi/cgiutils.c 2010-11-01 14:07:57.000000000 +0100
@@ -110,6 +110,8 @@
int escape_html_tags=FALSE;
int use_ssl_authentication=FALSE;
+char cgi_user_env[MAX_FILENAME_LENGTH];
+
int default_statusmap_layout_method=0;
int default_statuswrl_layout_method=0;
@@ -427,6 +429,12 @@
else if(!strcmp(var,"use_ssl_authentication"))
use_ssl_authentication=(atoi(val)>0)?TRUE:FALSE;
+
+ else if (!strcmp(var, "cgi_user_env")) {
+ strncpy(cgi_user_env,val,sizeof(cgi_user_env));
+ cgi_user_env[sizeof(cgi_user_env)-1]='\x0';
+ strip(cgi_user_env);
+ }
}
/* free memory and close the file */
--Boundary-00=_Q1rzMGjbvHynlXR--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]