[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci/site/luci/Extensions LuciSyslog.py ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2006-10-20 18:41:58

Modified files:
	luci/site/luci/Extensions: LuciSyslog.py conga_constants.py 
	                           ricci_communicator.py 

Log message:
	add a debug mode variable. this'll control whether LuciSyslog.debug() is a noop or not. it ought to be a noop for production, as it could leak sensitive data (f.e., root passwords) to system logs whose permissions we don't control.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciSyslog.py.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/conga_constants.py.diff?cvsroot=cluster&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_communicator.py.diff?cvsroot=cluster&r1=1.11&r2=1.12

--- conga/luci/site/luci/Extensions/LuciSyslog.py	2006/10/18 21:59:47	1.3
+++ conga/luci/site/luci/Extensions/LuciSyslog.py	2006/10/20 18:41:58	1.4
@@ -1,3 +1,4 @@
+from conga_constants import LUCI_DEBUG_MODE
 from syslog import openlog, closelog, syslog, \
 		LOG_DAEMON, LOG_PID, LOG_NDELAY, LOG_INFO, \
 		LOG_WARNING, LOG_AUTH, LOG_DEBUG
@@ -44,7 +45,7 @@
 			raise LuciSyslogError, 'syslog private call failed'
 
 	def debug(self, msg):
-		if not self.__init:
+		if not LUCI_DEBUG_MODE or not self.__init:
 			return
 		try:
 			syslog(LOG_DEBUG, msg)
--- conga/luci/site/luci/Extensions/conga_constants.py	2006/10/16 20:46:46	1.19
+++ conga/luci/site/luci/Extensions/conga_constants.py	2006/10/20 18:41:58	1.20
@@ -113,3 +113,5 @@
 CLUSTER_NODE_ADDED = 0x04
 
 PLONE_ROOT='luci'
+
+LUCI_DEBUG_MODE = 1
--- conga/luci/site/luci/Extensions/ricci_communicator.py	2006/10/20 18:37:50	1.11
+++ conga/luci/site/luci/Extensions/ricci_communicator.py	2006/10/20 18:41:58	1.12
@@ -4,10 +4,8 @@
 import xml.dom
 from xml.dom import minidom
 from LuciSyslog import LuciSyslog
-
 from HelperFunctions import access_to_host_allowed
 
-
 CERTS_DIR_PATH = '/var/lib/luci/var/certs/'
 
 try:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]