git-svn: trunk@4988
aCaB authored on 2009/03/27 21:23:17... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Fri Mar 27 13:19:05 CET 2009 (acab) |
|
2 |
+----------------------------------- |
|
3 |
+ * clamav-milter/clamfi.c: Make sure connect/gentemp is called even |
|
4 |
+ if the message has not got headers (bb#1499) |
|
5 |
+ |
|
1 | 6 |
Tue Mar 24 19:41:25 CET 2009 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* configure: don't define HAVE_ZLIB_H |
... | ... |
@@ -116,6 +116,12 @@ static sfsistat sendchunk(struct CLAMFI *cf, unsigned char *bodyp, size_t len, S |
116 | 116 |
if(cf->totsz >= maxfilesize) |
117 | 117 |
return SMFIS_CONTINUE; |
118 | 118 |
|
119 |
+ if(!cf->totsz && nc_connect_rand(&cf->main, &cf->alt, &cf->local)) { |
|
120 |
+ logg("!Failed to initiate streaming/fdpassing\n"); |
|
121 |
+ nullify(ctx, cf, CF_NONE); |
|
122 |
+ return FailAction; |
|
123 |
+ } |
|
124 |
+ |
|
119 | 125 |
if(cf->totsz + len > maxfilesize) |
120 | 126 |
len = maxfilesize - cf->totsz; |
121 | 127 |
|
... | ... |
@@ -181,11 +187,6 @@ sfsistat clamfi_header(SMFICTX *ctx, char *headerf, char *headerv) { |
181 | 181 |
nullify(ctx, cf, CF_NONE); |
182 | 182 |
return SMFIS_ACCEPT; |
183 | 183 |
} |
184 |
- if(nc_connect_rand(&cf->main, &cf->alt, &cf->local)) { |
|
185 |
- logg("!Failed to initiate streaming/fdpassing\n"); |
|
186 |
- nullify(ctx, cf, CF_NONE); |
|
187 |
- return FailAction; |
|
188 |
- } |
|
189 | 184 |
if((ret = sendchunk(cf, (unsigned char *)"From clamav-milter\n", 19, ctx)) != SMFIS_CONTINUE) |
190 | 185 |
return ret; |
191 | 186 |
} |