ph10 2005/07/01 11:49:02 BST
Modified files:
exim-doc/doc-txt ChangeLog
exim-src/src demime.c malware.c mime.c receive.c
regex.c spool_mbox.c
Log:
Add "b" to calls to fopen() that lack it (for Cygwin's benefit).
Revision Changes Path
1.181 +3 -0 exim/exim-doc/doc-txt/ChangeLog
1.7 +1 -1 exim/exim-src/src/demime.c
1.11 +2 -2 exim/exim-src/src/malware.c
1.9 +3 -3 exim/exim-src/src/mime.c
1.21 +1 -1 exim/exim-src/src/receive.c
1.7 +1 -1 exim/exim-src/src/regex.c
1.8 +3 -3 exim/exim-src/src/spool_mbox.c
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -r1.180 -r1.181
--- ChangeLog 30 Jun 2005 10:01:01 -0000 1.180
+++ ChangeLog 1 Jul 2005 10:49:01 -0000 1.181
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.180 2005/06/30 10:01:01 steve Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.181 2005/07/01 10:49:01 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -245,6 +245,9 @@
by Marc Sherman.
SC/11 Eximstats: v1.43 - bugfix for pattern histograms with -h0 specified.
+
+PH/33 Patch from the Cygwin maintainer to add "b" to all occurences of
+ fopen() in the content-scanning modules that did not already have it.
Exim version 4.51
Index: demime.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/demime.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- demime.c 27 Jun 2005 14:29:43 -0000 1.6
+++ demime.c 1 Jul 2005 10:49:02 -0000 1.7
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/demime.c,v 1.6 2005/06/27 14:29:43 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/demime.c,v 1.7 2005/07/01 10:49:02 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -256,7 +256,7 @@
}
while(result != -1);
- *f = fopen(CS file_name,"w+");
+ *f = fopen(CS file_name,"wb+");
if (*f == NULL) {
/* cannot open new dump file, disk full ? -> soft error */
snprintf(CS info, 1024,"unable to open dump file");
Index: malware.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/malware.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- malware.c 27 Jun 2005 14:29:43 -0000 1.10
+++ malware.c 1 Jul 2005 10:49:02 -0000 1.11
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/malware.c,v 1.10 2005/06/27 14:29:43 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/malware.c,v 1.11 2005/07/01 10:49:02 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -873,7 +873,7 @@
};
snprintf(CS file_name,1024,"%s/scan/%s/%s_scanner_output", spool_directory, message_id, message_id);
- scanner_record = fopen(CS file_name,"w");
+ scanner_record = fopen(CS file_name,"wb");
if (scanner_record == NULL) {
log_write(0, LOG_MAIN|LOG_PANIC,
@@ -911,7 +911,7 @@
malware_name = malware_name_buffer;
/* re-open the scanner output file, look for name match */
- scanner_record = fopen(CS file_name,"r");
+ scanner_record = fopen(CS file_name,"rb");
while(fgets(CS linebuffer,32767,scanner_record) != NULL) {
/* try match */
result = pcre_exec(cmdline_regex_re, NULL, CS linebuffer, Ustrlen(linebuffer), 0, 0, ovector, 30);
Index: mime.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/mime.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- mime.c 27 Jun 2005 14:29:43 -0000 1.8
+++ mime.c 1 Jul 2005 10:49:02 -0000 1.9
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/mime.c,v 1.8 2005/06/27 14:29:43 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/mime.c,v 1.9 2005/07/01 10:49:02 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -244,10 +244,10 @@
if ((pname != NULL) && (fname != NULL)) {
snprintf(CS filename, 2048, "%s/%s", pname, fname);
- f = fopen(CS filename,"w+");
+ f = fopen(CS filename,"wb+");
}
else if (pname == NULL) {
- f = fopen(CS fname,"w+");
+ f = fopen(CS fname,"wb+");
}
else if (fname == NULL) {
int file_nr = 0;
@@ -264,7 +264,7 @@
result = stat(CS filename,&mystat);
}
while(result != -1);
- f = fopen(CS filename,"w+");
+ f = fopen(CS filename,"wb+");
};
/* set expansion variable */
Index: receive.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/receive.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- receive.c 27 Jun 2005 14:29:43 -0000 1.20
+++ receive.c 1 Jul 2005 10:49:02 -0000 1.21
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/receive.c,v 1.20 2005/06/27 14:29:43 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/receive.c,v 1.21 2005/07/01 10:49:02 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1113,7 +1113,7 @@
closedir(tempdir);
if (entry != NULL) {
- mbox_file = Ufopen(rfc822_file_path,"r");
+ mbox_file = Ufopen(rfc822_file_path,"rb");
if (mbox_file == NULL) {
log_write(0, LOG_PANIC,
"acl_smtp_mime: can't open RFC822 spool file, skipping.");
Index: regex.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/regex.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- regex.c 27 Jun 2005 14:29:43 -0000 1.6
+++ regex.c 1 Jul 2005 10:49:02 -0000 1.7
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/regex.c,v 1.6 2005/06/27 14:29:43 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/regex.c,v 1.7 2005/07/01 10:49:02 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -210,7 +210,7 @@
/* open file */
- f = fopen(CS mime_decoded_filename, "r");
+ f = fopen(CS mime_decoded_filename, "rb");
if (f == NULL) {
/* open failed */
log_write(0, LOG_MAIN,
Index: spool_mbox.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/spool_mbox.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- spool_mbox.c 27 Jun 2005 14:29:44 -0000 1.7
+++ spool_mbox.c 1 Jul 2005 10:49:02 -0000 1.8
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/spool_mbox.c,v 1.7 2005/06/27 14:29:44 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/spool_mbox.c,v 1.8 2005/07/01 10:49:02 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -56,7 +56,7 @@
/* open [message_id].eml file for writing */
snprintf(CS mbox_path, 1024, "%s/scan/%s/%s.eml", spool_directory, message_id, message_id);
- mbox_file = Ufopen(mbox_path,"w");
+ mbox_file = Ufopen(mbox_path,"wb");
if (mbox_file == NULL) {
debug_printf("unable to open file for writing: %s\n", mbox_path);
@@ -129,7 +129,7 @@
for (i = 0; i < 2; i++) {
message_subdir[0] = (split_spool_directory == (i == 0))? message_id[5] : 0;
sprintf(CS mbox_path, "%s/input/%s/%s-D", spool_directory, message_subdir, message_id);
- data_file = Ufopen(mbox_path,"r");
+ data_file = Ufopen(mbox_path,"rb");
if (data_file != NULL)
break;
};
@@ -162,7 +162,7 @@
*mbox_file_size = statbuf.st_size;
/* open [message_id].eml file for reading */
- mbox_file = Ufopen(mbox_path,"r");
+ mbox_file = Ufopen(mbox_path,"rb");
return mbox_file;
}