Broken in f2ed27cf5, missing an equals sign for specified-initialisers.
Broken also in d185889f4, with init system revamp.
+JH/17 Bug 2113: Fix conversation closedown with the Avast malware scanner.
+ Previously we abruptly closed the connection after reading a malware-
+ found indication; now we go on to read the "scan ok" response line,
+ and send a quit.
+
Exim version 4.90
-----------------
0, 0, ovector, nelem(ovector)) > 0)
break;
- if ((malware_name = m_pcre_exec(ava_re_virus, buf)))
+ if ( !malware_name
+ && (malware_name = m_pcre_exec(ava_re_virus, buf)))
{ /* remove backslash in front of [whitespace|backslash] */
uschar * p, * p0;
for (p = malware_name; *p; ++p)
if (*p == '\\' && (isspace(p[1]) || p[1] == '\\'))
for (p0 = p; *p0; ++p0) *p0 = p0[1];
- avast_stage = AVA_DONE;
- goto endloop;
+ DEBUG(D_acl)
+ debug_printf_indent("unescaped m-name: '%s'\n", malware_name);
+ break;
}
if (Ustrncmp(buf, "200 SCAN OK", 11) == 0)
"unable to send quit request to socket (%s): %s",
scanner_options, strerror(errno)),
sock);
- malware_name = NULL;
+
avast_stage = AVA_DONE;
- goto endloop;
}
- /* here for any unexpected response from the scanner */
+ /* here also for any unexpected response from the scanner */
goto endloop;
- case AVA_DONE: log_write(0, LOG_PANIC, "%s:%d:%s: should not happen",
+ default: log_write(0, LOG_PANIC, "%s:%d:%s: should not happen",
__FILE__, __LINE__, __FUNCTION__);
}
}
>LF>blah\x09[+]
>LF>200 SCAN OK
<QUIT
-Unexpected EOF read from client
+Expected EOF read from client
End of script
Listening on TESTSUITE/eximdir/avast_sock ...
Connection request
>LF>210 SCAN DATA
>LF>b\\ l\\ a\\ h\x09[L]9.9\x099 VNAME
>LF>200 SCAN OK
-Unexpected EOF read from client
+<QUIT
+Expected EOF read from client
+End of script
Listening on TESTSUITE/eximdir/avast_sock ...
Connection request
*sleep 3