summaryrefslogtreecommitdiffstats
path: root/eurephiafw.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 /eurephiafw.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 'eurephiafw.c')
-rw-r--r--eurephiafw.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/eurephiafw.c b/eurephiafw.c
index f879d2d..a84770c 100644
--- a/eurephiafw.c
+++ b/eurephiafw.c
@@ -44,7 +44,7 @@ int eFW_unload(eurephiaCTX *ctx) {
}
if( ctx->eurephia_fw_intf != NULL ) {
- eurephia_log(ctx, LOG_DEBUG, 2, "Unloading eurephia firewall interface");
+ DEBUG(ctx, 2, "Unloading eurephia firewall interface");
dlclose(ctx->eurephia_fw_intf);
ctx->eurephia_fw_intf = NULL;
return 0;
@@ -179,8 +179,7 @@ void eFW_StartFirewall(eurephiaCTX *ctx) {
"Error while emptying messages from queue: %s",
strerror(errno));
} else {
- eurephia_log(ctx, LOG_DEBUG, 22,
- "Removed message on queue: %s", buf);
+ DEBUG(ctx, 22, "Removed message on queue: %s", buf);
}
}
}
@@ -194,7 +193,7 @@ void eFW_StartFirewall(eurephiaCTX *ctx) {
sem_post(ctx->fwcfg->thrdata.semp_master);
// Waiting for the FW module to get ready
- eurephia_log(ctx, LOG_DEBUG, 20, "eFW master is ready, waiting for the eFW worker to get ready");
+ DEBUG(ctx, 20, "eFW master is ready, waiting for the eFW worker to get ready");
sem_wait(ctx->fwcfg->thrdata.semp_worker);
eurephia_log(ctx, LOG_INFO, 2, "eFW interface initialised.");