[SVN] r455 - /trunk/cyrus-imapd-2.2.13/debian/patches/

debian at incase.de debian at incase.de
Fri May 12 10:33:02 UTC 2006


Author: sven
Date: Fri May 12 12:33:01 2006
New Revision: 455

URL: https://mail.incase.de/viewcvs?rev=455&root=cyrus22&view=rev
Log:
Integrate four mor upstream fixes/updates from upstream CVS

Added:
    trunk/cyrus-imapd-2.2.13/debian/patches/0006-upstream-free-backend-fix.dpatch   (with props)
    trunk/cyrus-imapd-2.2.13/debian/patches/0007-upstream-remove-undump-size-limit.dpatch   (with props)
    trunk/cyrus-imapd-2.2.13/debian/patches/0008-upstream-better-message-track-logging.dpatch   (with props)
    trunk/cyrus-imapd-2.2.13/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch   (with props)
Modified:
    trunk/cyrus-imapd-2.2.13/debian/patches/00list
    trunk/cyrus-imapd-2.2.13/debian/patches/08-clean_socket_closes.dpatch

Added: trunk/cyrus-imapd-2.2.13/debian/patches/0006-upstream-free-backend-fix.dpatch
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/patches/0006-upstream-free-backend-fix.dpatch?rev=455&root=cyrus22&view=auto
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/patches/0006-upstream-free-backend-fix.dpatch (added)
+++ trunk/cyrus-imapd-2.2.13/debian/patches/0006-upstream-free-backend-fix.dpatch Fri May 12 12:33:01 2006
@@ -1,0 +1,93 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0006-upstream-free-backend-fix.dpatch by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream fix: only free() the backend struct if we allocated it
+## DP: (don't free cached connections)
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/backend.c /tmp/dpep.78gN6M/cyrus-imapd-2.2.13/imap/backend.c
+--- cyrus-imapd-2.2.13/imap/backend.c	2006-05-12 12:01:09.000000000 +0200
++++ /tmp/dpep.78gN6M/cyrus-imapd-2.2.13/imap/backend.c	2006-05-12 12:14:12.909137753 +0200
+@@ -39,7 +39,7 @@
+  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+  */
+ 
+-/* $Id: backend.c,v 1.39 2006/02/07 20:57:27 murch Exp $ */
++/* $Id: backend.c,v 1.41 2006/05/11 18:05:29 murch Exp $ */
+ 
+ #include <config.h>
+ 
+@@ -264,7 +264,7 @@
+     }
+ }
+ 
+-struct backend *backend_connect(struct backend *ret, const char *server,
++struct backend *backend_connect(struct backend *ret_backend, const char *server,
+ 				struct protocol_t *prot, const char *userid,
+ 				const char **auth_status)
+ {
+@@ -276,13 +276,16 @@
+     struct sockaddr_un sunsock;
+     char buf[2048], *mechlist = NULL;
+     struct sigaction action;
++    struct backend *ret;
+ 
+-    if (!ret) {
++    if (!ret_backend) {
+ 	ret = xmalloc(sizeof(struct backend));
+ 	memset(ret, 0, sizeof(struct backend));
+ 	strlcpy(ret->hostname, server, sizeof(ret->hostname));
+ 	ret->timeout = NULL;
+     }
++    else
++	ret = ret_backend;
+ 
+     if (server[0] == '/') { /* unix socket */
+ 	res0 = &hints;
+@@ -312,7 +315,7 @@
+ 	if (err) {
+ 	    syslog(LOG_ERR, "getaddrinfo(%s) failed: %s",
+ 		   server, gai_strerror(err));
+-	    free(ret);
++	    if (!ret_backend) free(ret);
+ 	    return NULL;
+ 	}
+         /* Get addrinfo struct for local interface. */
+@@ -363,7 +366,7 @@
+ 	if (res0 != &hints)
+ 	    freeaddrinfo(res0);
+ 	syslog(LOG_ERR, "connect(%s) failed: %m", server);
+-	free(ret);
++	if (!ret_backend) free(ret);
+ 	return NULL;
+     }
+     memcpy(&ret->addr, res->ai_addr, res->ai_addrlen);
+@@ -381,7 +384,7 @@
+ 	    syslog(LOG_ERR,
+ 		   "backend_connect(): couldn't read initial greeting: %s",
+ 		   ret->in->error ? ret->in->error : "(null)");
+-	    free(ret);
++	    if (!ret_backend) free(ret);
+ 	    close(sock);
+ 	    return NULL;
+ 	}
+@@ -396,14 +399,16 @@
+ 	if ((r = backend_authenticate(ret, prot, &mechlist, userid, auth_status))) {
+ 	    syslog(LOG_ERR, "couldn't authenticate to backend server: %s",
+ 		   sasl_errstring(r, NULL, NULL));
+-	    free(ret);
++	    if (!ret_backend) free(ret);
+ 	    close(sock);
+ 	    ret = NULL;
+ 	}
+     }
+ 
+     if (mechlist) free(mechlist);
+-    
++
++    if (!ret_backend) ret_backend = ret;
++	    
+     return ret;
+ }
+ 

Propchange: trunk/cyrus-imapd-2.2.13/debian/patches/0006-upstream-free-backend-fix.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/cyrus-imapd-2.2.13/debian/patches/0007-upstream-remove-undump-size-limit.dpatch
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/patches/0007-upstream-remove-undump-size-limit.dpatch?rev=455&root=cyrus22&view=auto
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/patches/0007-upstream-remove-undump-size-limit.dpatch (added)
+++ trunk/cyrus-imapd-2.2.13/debian/patches/0007-upstream-remove-undump-size-limit.dpatch Fri May 12 12:33:01 2006
@@ -1,0 +1,128 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0007-upstream-remove-undump-size-limit by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: remove limit on the size of mailbox files that can be received by UNDUMP
+## DP: (write file directly to disk rather than reading the literal into memory)
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/mbdump.c /tmp/dpep.ttpH40/cyrus-imapd-2.2.13/imap/mbdump.c
+--- cyrus-imapd-2.2.13/imap/mbdump.c	2006-05-12 12:15:44.000000000 +0200
++++ /tmp/dpep.ttpH40/cyrus-imapd-2.2.13/imap/mbdump.c	2006-05-12 12:17:32.871354378 +0200
+@@ -1,5 +1,5 @@
+ /* mbdump.c -- Mailbox dump routines
+- * $Id: mbdump.c,v 1.30 2004/05/22 03:45:51 rjs3 Exp $
++ * $Id: mbdump.c,v 1.31 2006/05/11 17:43:18 murch Exp $
+  * Copyright (c) 1998-2003 Carnegie Mellon University.  All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+@@ -585,6 +585,10 @@
+     while(1) {
+ 	char fnamebuf[MAX_MAILBOX_PATH + 1024];
+ 	char *seen_file = NULL;
++	int isnowait, sawdigit;
++	unsigned long size;
++	unsigned long cutoff = ULONG_MAX / 10;
++	unsigned digit, cutlim = ULONG_MAX % 10;
+ 	
+       	c = getastring(pin, pout, &file);
+ 	if(c != ' ') {
+@@ -676,13 +680,43 @@
+ 
+ 	    continue;
+ 	}
+-	    
+-	c = getbastring(pin, pout, &data);
+-	if(c != ' ' && c != ')') {
++
++	/* read size of literal */
++	c = prot_getc(pin);
++	if (c != '{') {
+ 	    r = IMAP_PROTOCOL_ERROR;
+ 	    goto done;
+ 	}
+ 
++	size = isnowait = sawdigit = 0;
++	while ((c = prot_getc(pin)) != EOF && isdigit(c)) {
++	    sawdigit = 1;
++	    digit = c - '0';
++	    /* check for overflow */
++	    if (size > cutoff || (size == cutoff && digit > cutlim)) {
++                fatal("literal too big", EC_IOERR);
++            }
++	    size = size*10 + digit;
++	}
++	if (c == '+') {
++	    isnowait++;
++	    c = prot_getc(pin);
++	}
++	if (c == '}') {
++	    c = prot_getc(pin);
++	    if (c == '\r') c = prot_getc(pin);
++	}
++	if (!sawdigit || c != '\n') {
++	    r = IMAP_PROTOCOL_ERROR;
++	    goto done;
++	}
++
++	if (!isnowait) {
++	    /* Tell client to send the message */
++	    prot_printf(pout, "+ go ahead\r\n");
++	    prot_flush(pout);
++	}
++
+ 	if(userid && !strcmp(file.s, "SUBS")) {
+ 	    /* overwriting this outright is absolutely what we want to do */
+ 	    char *s = mboxlist_hash_usersubs(userid);
+@@ -742,7 +776,7 @@
+ 	    if(strncmp(file.s, "cyrus.", 6)) {
+ 		/* it doesn't match cyrus.*, so its a message file.
+ 		 * charge it against the quota */
+-		quotaused += data.len;
++		quotaused += size;
+ 	    }
+ 	}	
+ 
+@@ -760,10 +794,24 @@
+ 	    goto done;
+ 	}
+ 
+-	if(write(curfile,data.s,data.len) == -1) {
+-	    syslog(LOG_ERR, "IOERROR: writing %s: %m", fnamebuf);
+-	    r = IMAP_IOERROR;
+-	    goto done;
++	/* write data to file */
++	while (size) {
++	    char buf[4096+1];
++	    int n = prot_read(pin, buf, size > 4096 ? 4096 : size);
++	    if (!n) {
++		syslog(LOG_ERR,
++		       "IOERROR: reading message: unexpected end of file");
++		r = IMAP_IOERROR;
++		goto done;
++	    }
++
++	    size -= n;
++
++	    if (write(curfile, buf, n) != n) {
++		syslog(LOG_ERR, "IOERROR: writing %s: %m", fnamebuf);
++		r = IMAP_IOERROR;
++		goto done;
++	    }
+ 	}
+ 
+ 	close(curfile);
+@@ -777,7 +825,12 @@
+ 	    unlink(fnamebuf);
+ 	}
+ 	
+-	if(c == ')') break;
++	c = prot_getc(pin);
++	if (c == ')') break;
++	if (c != ' ') {
++	    r = IMAP_PROTOCOL_ERROR;
++	    goto done;
++	}
+     }
+     
+     if(!r && quotaused) {

Propchange: trunk/cyrus-imapd-2.2.13/debian/patches/0007-upstream-remove-undump-size-limit.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/cyrus-imapd-2.2.13/debian/patches/0008-upstream-better-message-track-logging.dpatch
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/patches/0008-upstream-better-message-track-logging.dpatch?rev=455&root=cyrus22&view=auto
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/patches/0008-upstream-better-message-track-logging.dpatch (added)
+++ trunk/cyrus-imapd-2.2.13/debian/patches/0008-upstream-better-message-track-logging.dpatch Fri May 12 12:33:01 2006
@@ -1,0 +1,114 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0008-upstream-better-message-track-logging by Sven Mueller <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: better logging to facilitate message tracking (Wes Craig <wes at umich.edu>)
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/lmtp_sieve.c /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/lmtp_sieve.c
+--- cyrus-imapd-2.2.13/imap/lmtp_sieve.c	2006-03-31 20:18:13.000000000 +0200
++++ /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/lmtp_sieve.c	2006-05-12 12:17:52.579503152 +0200
+@@ -1,6 +1,6 @@
+ /* lmtp_sieve.c -- Sieve implementation for lmtpd
+  *
+- * $Id: lmtp_sieve.c,v 1.11 2005/11/21 16:26:16 murch Exp $
++ * $Id: lmtp_sieve.c,v 1.12 2006/05/10 16:27:17 murch Exp $
+  * Copyright (c) 1998-2003 Carnegie Mellon University.  All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+@@ -327,6 +327,8 @@
+ 				    sievedb, strlen(sievedb), time(NULL), 0);
+ 
+ 	snmp_increment(SIEVE_REDIRECT, 1);
++	syslog(LOG_INFO, "sieve redirected: %s to: %s",
++	       m->id ? m->id : "<nomsgid>", rc->addr);
+ 	return SIEVE_OK;
+     } else {
+ 	if (res == -1) {
+@@ -349,17 +351,8 @@
+     snmp_increment(SIEVE_DISCARD, 1);
+ 
+     /* ok, we won't file it, but log it */
+-    if (md->id && strlen(md->id) < 80) {
+-	char pretty[160];
+-
+-	beautify_copy(pretty, md->id);
+-	syslog(LOG_INFO, "sieve: discarded message to %s id %s",
+-	       sd->username, pretty);
+-    }
+-    else {
+-	syslog(LOG_INFO, "sieve: discarded message to %s",
+-	       sd->username);
+-    }	
++    syslog(LOG_INFO, "sieve discarded: %s",
++	   md->id ? md->id : "<nomsgid>");
+ 
+     return SIEVE_OK;
+ }
+@@ -383,7 +376,7 @@
+ 
+     if (strlen(md->return_path) == 0) {
+ 	syslog(LOG_INFO, "sieve: discarded reject to <> for %s id %s",
+-	       sd->username, md->id);
++	       sd->username, md->id ? md->id : "<nomsgid>");
+         return SIEVE_OK;
+     }
+ 
+@@ -393,6 +386,8 @@
+ 			      origreceip, sd->username,
+ 			      rc->msg, md->data)) == 0) {
+ 	snmp_increment(SIEVE_REJECT, 1);
++	syslog(LOG_INFO, "sieve rejected: %s to: %s",
++	       md->id ? md->id : "<nomsgid>", md->return_path);
+ 	return SIEVE_OK;
+     } else {
+ 	if (res == -1) {
+diff -urNad cyrus-imapd-2.2.13/imap/lmtpd.c /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/lmtpd.c
+--- cyrus-imapd-2.2.13/imap/lmtpd.c	2006-05-06 10:34:48.000000000 +0200
++++ /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/lmtpd.c	2006-05-12 12:17:52.578503246 +0200
+@@ -1,6 +1,6 @@
+ /* lmtpd.c -- Program to deliver mail to a mailbox
+  *
+- * $Id: lmtpd.c,v 1.143 2006/01/20 20:29:33 jeaton Exp $
++ * $Id: lmtpd.c,v 1.144 2006/05/10 16:27:17 murch Exp $
+  * Copyright (c) 1998-2003 Carnegie Mellon University.  All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+@@ -321,6 +321,7 @@
+ 			       strlen(mailboxname), now, uid);
+ 
+ 	    append_commit(&as, quotaoverride ? -1 : 0, NULL, &uid, NULL);
++	    syslog(LOG_INFO, "Delivered: %s to mailbox: %s", id, mailboxname);
+ 	}
+     }
+ 
+diff -urNad cyrus-imapd-2.2.13/imap/mailbox.c /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/mailbox.c
+--- cyrus-imapd-2.2.13/imap/mailbox.c	2006-05-06 10:34:48.000000000 +0200
++++ /tmp/dpep.Onc5tY/cyrus-imapd-2.2.13/imap/mailbox.c	2006-05-12 12:17:52.581502964 +0200
+@@ -1,5 +1,5 @@
+ /* mailbox.c -- Mailbox manipulation routines
+- * $Id: mailbox.c,v 1.159 2005/04/07 00:25:52 shadow Exp $
++ * $Id: mailbox.c,v 1.160 2006/05/10 16:27:18 murch Exp $
+  * Copyright (c) 1998-2003 Carnegie Mellon University.  All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+@@ -1931,6 +1931,11 @@
+ 	}
+     }
+ 
++    if (numdeleted > 0) {
++	syslog(LOG_NOTICE, "Expunged %d messages from %s",
++	       numdeleted, mailbox->name); 
++    }
++
+     free(buf);
+     if (deleted) free(deleted);
+ 
+@@ -2187,6 +2192,7 @@
+ 	*tail = '\0';
+     } while (rmdir(buf) == 0 && (tail = strrchr(buf, '/')));
+ 
++    syslog(LOG_NOTICE, "Deleted mailbox %s", mailbox->name); 
+     mailbox_close(mailbox);
+     return 0;
+ }

Propchange: trunk/cyrus-imapd-2.2.13/debian/patches/0008-upstream-better-message-track-logging.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/cyrus-imapd-2.2.13/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch?rev=455&root=cyrus22&view=auto
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch (added)
+++ trunk/cyrus-imapd-2.2.13/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch Fri May 12 12:33:01 2006
@@ -1,0 +1,56 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 0009-upstream-remove-redundant-wildcard-check by Sven Mueller
+##                                            <debian at incase.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: remove redundant check for wildcards in mailbox names
+## DP: (Wes Craig <wes at umich.edu>)
+
+ at DPATCH@
+diff -urNad cyrus-imapd-2.2.13/imap/imapd.c /tmp/dpep.3mRazZ/cyrus-imapd-2.2.13/imap/imapd.c
+--- cyrus-imapd-2.2.13/imap/imapd.c	2006-05-12 12:18:02.000000000 +0200
++++ /tmp/dpep.3mRazZ/cyrus-imapd-2.2.13/imap/imapd.c	2006-05-12 12:18:43.442725508 +0200
+@@ -38,7 +38,7 @@
+  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+  */
+ 
+-/* $Id: imapd.c,v 1.498 2006/01/13 22:06:28 murch Exp $ */
++/* $Id: imapd.c,v 1.500 2006/05/10 15:41:44 murch Exp $ */
+ 
+ #include <config.h>
+ 
+@@ -3952,11 +3952,6 @@
+ 	}
+     }
+ 
+-    /* verify that the mailbox doesn't have a wildcard in it */
+-    for (p = oldmailboxname; !r && *p; p++) {
+-	if (*p == '*' || *p == '%') r = IMAP_MAILBOX_BADNAME;
+-    }
+-
+     /* attempt to rename the base mailbox */
+     if (!r) {
+ 	r = mboxlist_renamemailbox(oldmailboxname, newmailboxname, partition,
+diff -urNad cyrus-imapd-2.2.13/imap/mboxlist.c /tmp/dpep.3mRazZ/cyrus-imapd-2.2.13/imap/mboxlist.c
+--- cyrus-imapd-2.2.13/imap/mboxlist.c	2006-05-06 10:34:48.000000000 +0200
++++ /tmp/dpep.3mRazZ/cyrus-imapd-2.2.13/imap/mboxlist.c	2006-05-12 12:18:12.192660857 +0200
+@@ -40,7 +40,7 @@
+  *
+  */
+ /*
+- * $Id: mboxlist.c,v 1.241 2005/11/22 18:20:51 murch Exp $
++ * $Id: mboxlist.c,v 1.242 2006/05/10 15:41:52 murch Exp $
+  */
+ 
+ #include <config.h>
+@@ -476,10 +476,6 @@
+ 		free(acl);
+ 		return IMAP_PERMISSION_DENIED;
+ 	    }
+-	    /* disallow wildcards in userids with inboxes. */	     
+-	    if (strchr(mbox, '*') || strchr(mbox, '%') || strchr(mbox, '?')) {
+-		return IMAP_MAILBOX_BADNAME;
+-	    }
+ 
+ 	    /*
+ 	     * Users by default have all access to their personal mailbox(es),

Propchange: trunk/cyrus-imapd-2.2.13/debian/patches/0009-upstream-remove-redundant-wildcard-check.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Modified: trunk/cyrus-imapd-2.2.13/debian/patches/00list
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/patches/00list?rev=455&root=cyrus22&r1=454&r2=455&view=diff
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/patches/00list (original)
+++ trunk/cyrus-imapd-2.2.13/debian/patches/00list Fri May 12 12:33:01 2006
@@ -3,6 +3,10 @@
 0003-upstream_disallow_userprobes.dpatch
 0004-upstream-fetchnews-timezone-dst-fix.dpatch
 0005-upstream-fix-ctl_mboxlist-dump-undump.dpatch
+0006-upstream-free-backend-fix.dpatch
+0007-upstream-remove-undump-size-limit.dpatch
+0008-upstream-better-message-track-logging.dpatch
+0009-upstream-remove-redundant-wildcard-check.dpatch
 01-fix_Makefile.in.dpatch
 02-add_mkinstalldirs.dpatch
 03-fix_docs.dpatch

Modified: trunk/cyrus-imapd-2.2.13/debian/patches/08-clean_socket_closes.dpatch
URL: https://mail.incase.de/viewcvs/trunk/cyrus-imapd-2.2.13/debian/patches/08-clean_socket_closes.dpatch?rev=455&root=cyrus22&r1=454&r2=455&view=diff
==============================================================================
--- trunk/cyrus-imapd-2.2.13/debian/patches/08-clean_socket_closes.dpatch (original)
+++ trunk/cyrus-imapd-2.2.13/debian/patches/08-clean_socket_closes.dpatch Fri May 12 12:33:01 2006
@@ -5,14 +5,14 @@
 ## DP: Cleanly close sockets
 
 @DPATCH@
-diff -urNad complete.dpatch/imap/backend.c /tmp/dpep.FbBq2t/complete.dpatch/imap/backend.c
---- complete.dpatch/imap/backend.c	2005-02-14 07:39:55.000000000 +0100
-+++ /tmp/dpep.FbBq2t/complete.dpatch/imap/backend.c	2005-11-11 00:01:15.843304837 +0100
-@@ -382,6 +382,7 @@
+diff -urNad cyrus-imapd-2.2.13/imap/backend.c /tmp/dpep.L25TQ6/cyrus-imapd-2.2.13/imap/backend.c
+--- cyrus-imapd-2.2.13/imap/backend.c	2006-05-12 12:20:40.000000000 +0200
++++ /tmp/dpep.L25TQ6/cyrus-imapd-2.2.13/imap/backend.c	2006-05-12 12:22:01.565116257 +0200
+@@ -400,6 +400,7 @@
  	    syslog(LOG_ERR, "couldn't authenticate to backend server: %s",
  		   sasl_errstring(r, NULL, NULL));
- 	    free(ret);
-+	    shutdown(sock, SHUT_RDWR);
+ 	    if (!ret_backend) free(ret);
++ 	    shutdown(sock, SHUT_RDWR);
  	    close(sock);
  	    ret = NULL;
  	}
@@ -38,7 +38,7 @@
 diff -urNad complete.dpatch/imap/imapd.c /tmp/dpep.FbBq2t/complete.dpatch/imap/imapd.c
 --- complete.dpatch/imap/imapd.c	2005-11-10 21:12:04.000000000 +0100
 +++ /tmp/dpep.FbBq2t/complete.dpatch/imap/imapd.c	2005-11-11 00:04:47.146591300 +0100
-@@ -765,6 +765,10 @@
+@@ -767,6 +767,10 @@
  #ifdef HAVE_SSL
      tls_shutdown_serverengine();
  #endif
@@ -52,7 +52,7 @@
 diff -urNad complete.dpatch/imap/lmtpd.c /tmp/dpep.FbBq2t/complete.dpatch/imap/lmtpd.c
 --- complete.dpatch/imap/lmtpd.c	2004-12-17 17:32:15.000000000 +0100
 +++ /tmp/dpep.FbBq2t/complete.dpatch/imap/lmtpd.c	2005-11-11 00:02:48.172254190 +0100
-@@ -501,6 +501,9 @@
+@@ -553,6 +553,9 @@
  
      cyrus_done();
  
@@ -78,7 +78,7 @@
 diff -urNad complete.dpatch/imap/proxyd.c /tmp/dpep.FbBq2t/complete.dpatch/imap/proxyd.c
 --- complete.dpatch/imap/proxyd.c	2005-11-10 21:12:04.000000000 +0100
 +++ /tmp/dpep.FbBq2t/complete.dpatch/imap/proxyd.c	2005-11-11 00:04:04.761746266 +0100
-@@ -1443,6 +1443,9 @@
+@@ -1382,6 +1382,9 @@
  #endif
  
      cyrus_done();



More information about the Pkg-Cyrus-imapd-Debian-devel mailing list