summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/clamsmtpd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c
index 591db3a..f1d6e75 100644
--- a/src/clamsmtpd.c
+++ b/src/clamsmtpd.c
@@ -659,6 +659,9 @@ static int virus_action(clctx_t* ctx, const char* virus)
if(g_clstate.virusaction != NULL)
{
+
+ sp_messagex(sp, LOG_DEBUG, "executing virus action: %s", g_clstate.virusaction);
+
switch(pid = fork())
{
case -1:
@@ -688,13 +691,11 @@ static int virus_action(clctx_t* ctx, const char* virus)
if(virus)
setenv("VIRUS", virus, 1);
- sp_messagex(sp, LOG_DEBUG, "executing virus action: %s", g_clstate.virusaction);
-
/* And execute the program */
execl("/bin/sh", "sh", "-c", g_clstate.virusaction, NULL);
- /* If that returned then there was an error */
- sp_message(sp, LOG_ERR, "error executing the shell for virus action");
+ /* If that returned then there was an error, but there's
+ * not much we can do about it. */
exit(1);
break;
};