git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Call initgroups() when dropping privilege, in order that Exim runs with
[exim.git]
/
src
/
src
/
malware.c
diff --git
a/src/src/malware.c
b/src/src/malware.c
index ca9c3dfebd5390d46fa112e3155a35f531c03781..7e3c587c971d1d4a7a329b6d4712072c4fb13845 100644
(file)
--- a/
src/src/malware.c
+++ b/
src/src/malware.c
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/malware.c,v 1.1
2 2005/08/01 14:41:25
ph10 Exp $ */
+/* $Cambridge: exim/src/src/malware.c,v 1.1
4 2006/02/22 14:46:44
ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-873,7
+873,7
@@
int malware(uschar **listptr) {
};
(void)string_format(file_name,1024,"%s/scan/%s/%s_scanner_output", spool_directory, message_id, message_id);
};
(void)string_format(file_name,1024,"%s/scan/%s/%s_scanner_output", spool_directory, message_id, message_id);
- scanner_record =
fopen(CS file_name,"wb"
);
+ scanner_record =
modefopen(file_name,"wb",SPOOL_MODE
);
if (scanner_record == NULL) {
log_write(0, LOG_MAIN|LOG_PANIC,
if (scanner_record == NULL) {
log_write(0, LOG_MAIN|LOG_PANIC,
@@
-1265,6
+1265,10
@@
int malware(uschar **listptr) {
return DEFER;
}
return DEFER;
}
+ /* strip newline at the end */
+ p = av_buffer + Ustrlen(av_buffer) - 1;
+ if( *p == '\n' ) *p = '\0';
+
/* colon in returned output? */
if((p = Ustrrchr(av_buffer,':')) == NULL) {
log_write(0, LOG_MAIN|LOG_PANIC,
/* colon in returned output? */
if((p = Ustrrchr(av_buffer,':')) == NULL) {
log_write(0, LOG_MAIN|LOG_PANIC,
@@
-1273,13
+1277,10
@@
int malware(uschar **listptr) {
return DEFER;
}
return DEFER;
}
- /* strip filename
strip CR at the end
*/
+ /* strip filename */
++p;
while (*p == ' ') ++p;
vname = p;
++p;
while (*p == ' ') ++p;
vname = p;
- p = vname + Ustrlen(vname) - 1;
- if( *p == '\n' ) *p = '\0';
-
if ((p = Ustrstr(vname, "FOUND"))!=NULL) {
*p=0;
for (--p;p>vname && *p<=32;p--) *p=0;
if ((p = Ustrstr(vname, "FOUND"))!=NULL) {
*p=0;
for (--p;p>vname && *p<=32;p--) *p=0;