[Pkg-nagios-devel] nagios/patches 10000_no-password-disclosure.dpatch,NONE,1.1 00list,1.3,1.4

seanius@haydn.debian.org seanius@haydn.debian.org


Update of /cvsroot/pkg-nagios/nagios/patches
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv3695/patches

Modified Files:
	00list 
Added Files:
	10000_no-password-disclosure.dpatch 
Log Message:
don't disclose password, and updated debconf translation.


--- NEW FILE: 10000_no-password-disclosure.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 10000_no-password-disclosure.dpatch by  <seanius@debian.org>
##
## DP: don't disclose the password used to connect to the database

@DPATCH@
diff -urNad nagios-1.3/xdata/xcddb.c /home/seanius/tmp/dpep.9fOSG3/nagios-1.3/xdata/xcddb.c
--- nagios-1.3/xdata/xcddb.c	2005-01-16 13:26:59.000000000 -0500
+++ /home/seanius/tmp/dpep.9fOSG3/nagios-1.3/xdata/xcddb.c	2005-01-16 13:32:27.000000000 -0500
@@ -261,7 +261,7 @@
 		mysql_close(&xcddb_mysql);
 
 #ifdef NSCORE
-		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to MySQL database '%s' on host '%s' using username '%s' and password '%s' for comment data!\n",xcddb_database,xcddb_host,xcddb_username,xcddb_password);
+		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to MySQL database '%s' on host '%s' using username '%s' and password 'XXXXXX' for comment data!\n",xcddb_database,xcddb_host,xcddb_username);
 		buffer[sizeof(buffer)-1]='\x0';
 		write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE);
 #endif
@@ -282,7 +282,7 @@
 		PQfinish(xcddb_pgconn);
 
 #ifdef NSCORE
-		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to PostgreSQL database '%s' on host '%s' using username '%s' and password '%s' for comment data!\n",xcddb_database,xcddb_host,xcddb_username,xcddb_password);
+		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to PostgreSQL database '%s' on host '%s' using username '%s' and password 'XXXXXX' for comment data!\n",xcddb_database,xcddb_host,xcddb_username);
 		buffer[sizeof(buffer)-1]='\x0';
 		write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE);
 #endif
diff -urNad nagios-1.3/xdata/xdddb.c /home/seanius/tmp/dpep.9fOSG3/nagios-1.3/xdata/xdddb.c
--- nagios-1.3/xdata/xdddb.c	2005-01-16 13:26:59.000000000 -0500
+++ /home/seanius/tmp/dpep.9fOSG3/nagios-1.3/xdata/xdddb.c	2005-01-16 13:34:57.000000000 -0500
@@ -261,7 +261,7 @@
 		mysql_close(&xdddb_mysql);
 
 #ifdef NSCORE
-		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to MySQL database '%s' on host '%s' using username '%s' and password '%s' for downtime data!\n",xdddb_database,xdddb_host,xdddb_username,xdddb_password);
+		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to MySQL database '%s' on host '%s' using username '%s' and password 'XXXXXX' for downtime data!\n",xdddb_database,xdddb_host,xdddb_username);
 		buffer[sizeof(buffer)-1]='\x0';
 		write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE);
 #endif
@@ -282,7 +282,7 @@
 		PQfinish(xdddb_pgconn);
 
 #ifdef NSCORE
-		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to PostgreSQL database '%s' on host '%s' using username '%s' and password '%s' for downtime data!\n",xdddb_database,xdddb_host,xdddb_username,xdddb_password);
+		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to PostgreSQL database '%s' on host '%s' using username '%s' and password 'XXXXXX' for downtime data!\n",xdddb_database,xdddb_host,xdddb_username);
 		buffer[sizeof(buffer)-1]='\x0';
 		write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE);
 #endif
diff -urNad nagios-1.3/xdata/xrddb.c /home/seanius/tmp/dpep.9fOSG3/nagios-1.3/xdata/xrddb.c
--- nagios-1.3/xdata/xrddb.c	2005-01-16 13:26:58.000000000 -0500
+++ /home/seanius/tmp/dpep.9fOSG3/nagios-1.3/xdata/xrddb.c	2005-01-16 13:36:39.000000000 -0500
@@ -253,7 +253,7 @@
 
 		mysql_close(&xrddb_mysql);
 
-		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to MySQL database '%s' on host '%s' using username '%s' and password '%s'.  Retention data will not be processed or saved!\n",xrddb_database,xrddb_host,xrddb_username,xrddb_password);
+		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to MySQL database '%s' on host '%s' using username '%s' and password 'XXXXXX'.  Retention data will not be processed or saved!\n",xrddb_database,xrddb_host,xrddb_username);
 		buffer[sizeof(buffer)-1]='\x0';
 		write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE);
 
@@ -271,7 +271,7 @@
 
 		PQfinish(xrddb_pgconn);
 
-		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to PostgreSQL database '%s' on host '%s' using username '%s' 1and password '%s'.  Retention data will not be processed or saved!\n",xrddb_database,xrddb_host,xrddb_username,xrddb_password);
+		snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to PostgreSQL database '%s' on host '%s' using username '%s' and password 'XXXXXX'.  Retention data will not be processed or saved!\n",xrddb_database,xrddb_host,xrddb_username);
 		buffer[sizeof(buffer)-1]='\x0';
 		write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE);
 
diff -urNad nagios-1.3/xdata/xsddb.c /home/seanius/tmp/dpep.9fOSG3/nagios-1.3/xdata/xsddb.c
--- nagios-1.3/xdata/xsddb.c	2005-01-16 13:26:59.000000000 -0500
+++ /home/seanius/tmp/dpep.9fOSG3/nagios-1.3/xdata/xsddb.c	2005-01-16 13:37:40.000000000 -0500
@@ -290,7 +290,7 @@
 #ifdef NSCORE
 		/* complain if we don't already know theres a problem */
 		if(xsddb_connection_error==FALSE){
-			snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to MySQL database '%s' on host '%s' using username '%s' and password '%s'.  Status data will not be saved!\n",xsddb_database,xsddb_host,xsddb_username,xsddb_password);
+			snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to MySQL database '%s' on host '%s' using username '%s' and password 'XXXXXX'.  Status data will not be saved!\n",xsddb_database,xsddb_host,xsddb_username);
 			buffer[sizeof(buffer)-1]='\x0';
 			write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE);
 		        }
@@ -314,7 +314,7 @@
 #ifdef NSCORE
 		/* complain if we don't already know theres a problem */
 		if(xsddb_connection_error==FALSE){
-			snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to PostgreSQL database '%s' on host '%s' using username '%s' and password '%s'.  Status data will not be saved!\n",xsddb_database,xsddb_host,xsddb_username,xsddb_password);
+			snprintf(buffer,sizeof(buffer)-1,"Error: Could not connect to PostgreSQL database '%s' on host '%s' using username '%s' and password 'XXXXXX'.  Status data will not be saved!\n",xsddb_database,xsddb_host,xsddb_username);
 			buffer[sizeof(buffer)-1]='\x0';
 			write_to_logs_and_console(buffer,NSLOG_RUNTIME_ERROR,TRUE);
 		        }

Index: 00list
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/patches/00list,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- 00list	25 Nov 2004 17:01:03 -0000	1.3
+++ 00list	16 Jan 2005 18:58:37 -0000	1.4
@@ -8,3 +8,4 @@
 999_cvs_1x_bugfixes.dpatch
 999_fix_html_pathes.dpatch
 9999_nsca_pathfix.dpatch
+10000_no-password-disclosure.dpatch