summaryrefslogtreecommitdiffstats
path: root/database/sqlite/sqlite.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-09-19 18:00:31 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-09-19 18:00:31 +0200
commit587028ddd4136637e3b94a877ecceae4217dfe72 (patch)
tree4428ff1483f41a450363c0bb379014c58710d72d /database/sqlite/sqlite.c
parent8f883490ce6ddfa8fe8f883817353b51000f886f (diff)
downloadeurephia-587028ddd4136637e3b94a877ecceae4217dfe72.tar.gz
eurephia-587028ddd4136637e3b94a877ecceae4217dfe72.tar.xz
eurephia-587028ddd4136637e3b94a877ecceae4217dfe72.zip
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.
Diffstat (limited to 'database/sqlite/sqlite.c')
-rw-r--r--database/sqlite/sqlite.c2
1 files changed, 1 insertions, 1 deletions
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);