summaryrefslogtreecommitdiff
path: root/mail/vpopmail/files/patch-vpopmail.c
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2007-12-25 06:00:00 +0000
committerPeter Pentchev <roam@FreeBSD.org>2007-12-25 06:00:00 +0000
commitdf8f43848da2ae178086307933faadbd40ade716 (patch)
treecfed3b29eda7b4f19deeb29ee4bb469e5d237479 /mail/vpopmail/files/patch-vpopmail.c
parent- Update to 0.06 (diff)
Update the vpopmail port to version 5.4.26 with a lot of changes and fixes:
- add the WITH_SPAMFOLDER knob from Alex Dupre's PR; - fix lots of bugs in the new vlist code; - fix a couple of bugs in MySQL's "valias -n" implementation; - actually implement "valias -n" for PostgreSQL; - fix a couple of directory descriptor leaks and other buglets. PR: 117321 (the WITH_SPAMFOLDER knob) Submitted by: ale
Notes
Notes: svn path=/head/; revision=204487
Diffstat (limited to 'mail/vpopmail/files/patch-vpopmail.c')
-rw-r--r--mail/vpopmail/files/patch-vpopmail.c48
1 files changed, 42 insertions, 6 deletions
diff --git a/mail/vpopmail/files/patch-vpopmail.c b/mail/vpopmail/files/patch-vpopmail.c
index 3f73d3a831a5..1ab4ec597f8a 100644
--- a/mail/vpopmail/files/patch-vpopmail.c
+++ b/mail/vpopmail/files/patch-vpopmail.c
@@ -1,7 +1,15 @@
diff -urN -x .svn ../../vendor/vpopmail/vpopmail.c ./vpopmail.c
---- ../../vendor/vpopmail/vpopmail.c 2007-10-07 23:44:14.000000000 +0300
-+++ ./vpopmail.c 2007-10-08 11:53:36.000000000 +0300
-@@ -1559,7 +1559,7 @@
+--- ../../vendor/vpopmail/vpopmail.c 2007-12-25 05:03:25.000000000 +0200
++++ ./vpopmail.c 2007-12-25 07:31:16.000000000 +0200
+@@ -945,6 +945,7 @@
+
+ /* print error message and return and error */
+ fprintf (stderr, "Failed to delete directory %s", mydirent->d_name);
++ closedir(mydir);
+ return(-1);
+ }
+ }
+@@ -1562,7 +1563,7 @@
i++;
}
@@ -10,16 +18,44 @@ diff -urN -x .svn ../../vendor/vpopmail/vpopmail.c ./vpopmail.c
if( i>0 ) {
for( j=0; j<k; j++ ) {
-@@ -1571,7 +1571,7 @@
+@@ -1574,7 +1575,7 @@
// trim spaces and tabs from end
i = strlen(s) - 1;
-while(( s[i] == ' ' ) || ( s[i] == '\t' )) {
-+while(i >= 0 && ( s[i] == ' ' ) || ( s[i] == '\t' )) {
++while(i >= 0 && ( s[i] == ' ' || s[i] == '\t' )) {
i--;
}
-@@ -4127,11 +4127,19 @@
+@@ -2345,7 +2346,12 @@
+ char calling_dir[MAX_BUFF];
+ char domain_dir[MAX_BUFF];
+ const char *dirnames[] = {"Maildir", "Maildir/new", "Maildir/cur",
+- "Maildir/tmp"};
++ "Maildir/tmp",
++#ifdef SPAM_JUNKFOLDER
++ "Maildir/.Junk", "Maildir/.Junk/new", "Maildir/.Junk/cur",
++ "Maildir/.Junk/tmp",
++#endif
++ };
+ int i;
+
+ verrori = 0;
+@@ -3107,6 +3113,13 @@
+ if (mkdir("cur",VPOPMAIL_DIR_MODE) == -1) { chdir(calling_dir); return(-1); }
+ if (mkdir("new",VPOPMAIL_DIR_MODE) == -1) { chdir(calling_dir); return(-1); }
+ if (mkdir("tmp",VPOPMAIL_DIR_MODE) == -1) { chdir(calling_dir); return(-1); }
++#ifdef SPAM_JUNKFOLDER
++ if (mkdir(".Junk",VPOPMAIL_DIR_MODE) == -1) { chdir(calling_dir); return(-1); }
++ if (chdir(".Junk") == -1) { chdir(calling_dir); return(-1); }
++ if (mkdir("cur",VPOPMAIL_DIR_MODE) == -1) { chdir(calling_dir); return(-1); }
++ if (mkdir("new",VPOPMAIL_DIR_MODE) == -1) { chdir(calling_dir); return(-1); }
++ if (mkdir("tmp",VPOPMAIL_DIR_MODE) == -1) { chdir(calling_dir); return(-1); }
++#endif
+
+ /* set permissions on the user's dir */
+ chdir(dir);
+@@ -4139,11 +4152,19 @@
}
else if ( pid > 0 )
{