From 587028ddd4136637e3b94a877ecceae4217dfe72 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 19 Sep 2008 18:00:31 +0200 Subject: Improved code security. LOG_DEBUG statements are only compiled if DEBUG=1 is sent to make. Since several parts of the code where LOG_DEBUG was used with eurephia_log(...) contains security sensitive information (like logging password retrieved with get_env(...)), all debug logging is now done via the DEBUG macro. This macro will not produce any security relevant eurephia_log(...) statements unless the source is compiled with -DENABLE_DEBUG. This is activated via make by adding DEBUG=1 before the make targets. When not enabled, the binaries will not do any debug logging at all. --- database/sqlite/sqlite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'database/sqlite/sqlite.c') diff --git a/database/sqlite/sqlite.c b/database/sqlite/sqlite.c index c58aa01..1a97793 100644 --- a/database/sqlite/sqlite.c +++ b/database/sqlite/sqlite.c @@ -218,7 +218,7 @@ dbresult *sqlite_query(eurephiaCTX *ctx, char *fmt, ... ) { sql = sqlite3_vmprintf(fmt, ap); va_end(ap); - eurephia_log(ctx, LOG_DEBUG, 11, "Doing SQL Query: %s", sql); + DEBUG(ctx, 11, "Doing SQL Query: %s", sql); rc = sqlite3_exec( (sqlite3 *) dbc->dbhandle, sql, _cb_parse_result, 0, &errMsg ); if( rc != SQLITE_OK ) { eurephia_log(ctx, LOG_ERROR, 0, "SQL Error: %s", errMsg); -- cgit