conga/luci/site/luci/Extensions LuciSyslog.py ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at 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
luci/site/luci/Extensions/LuciSyslog.py +2 -1
@@ -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)
luci/site/luci/Extensions/conga_constants.py +2 -0
@@ -113,3 +113,5 @@ CLUSTER_NODE_ADDED = 0x04 PLONE_ROOT='luci' + +LUCI_DEBUG_MODE = 1
luci/site/luci/Extensions/ricci_communicator.py +0 -2
@@ -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: