head 1.24; access; symbols OPENPKG_E1_MP_HEAD:1.21 OPENPKG_E1_MP:1.21 OPENPKG_E1_MP_2_STABLE:1.18.2.1 OPENPKG_E1_FP:1.18.2.1 OPENPKG_2_STABLE_MP:1.19 OPENPKG_2_STABLE_20061018:1.18.2.1 OPENPKG_2_STABLE_20060622:1.18 OPENPKG_2_STABLE:1.18.0.2 OPENPKG_2_STABLE_BP:1.18 OPENPKG_2_5_RELEASE:1.14 OPENPKG_2_5_SOLID:1.14.0.2 OPENPKG_2_5_SOLID_BP:1.14 OPENPKG_2_4_RELEASE:1.13 OPENPKG_2_4_SOLID:1.13.0.4 OPENPKG_2_4_SOLID_BP:1.13 OPENPKG_CW_FP:1.13 OPENPKG_2_3_RELEASE:1.13 OPENPKG_2_3_SOLID:1.13.0.2 OPENPKG_2_3_SOLID_BP:1.13 OPENPKG_2_2_RELEASE:1.11 OPENPKG_2_2_SOLID:1.11.0.4 OPENPKG_2_2_SOLID_BP:1.11 OPENPKG_2_1_RELEASE:1.11 OPENPKG_2_1_SOLID:1.11.0.2 OPENPKG_2_1_SOLID_BP:1.11 OPENPKG_2_0_RELEASE:1.8 OPENPKG_2_0_SOLID:1.8.0.2 OPENPKG_2_0_SOLID_BP:1.8 OPENPKG_1_3_RELEASE:1.4.2.1 OPENPKG_1_3_SOLID:1.4.2.1.0.2 OPENPKG_1_3_SOLID_BP:1.4.2.1 OPENPKG_1_STABLE:1.4.0.2 OPENPKG_1_STABLE_MP:1.4; locks; strict; comment @# @; expand @o@; 1.24 date 2009.03.26.17.57.06; author rse; state Exp; branches; next 1.23; commitid V8sODZFUnXnfnzHt; 1.23 date 2007.10.25.07.11.07; author rse; state Exp; branches; next 1.22; commitid 3LAwLPlvswfXrWCs; 1.22 date 2007.02.08.08.35.47; author rse; state Exp; branches; next 1.21; commitid VosKuB5d5xBafF5s; 1.21 date 2006.12.17.13.13.57; author rse; state Exp; branches; next 1.20; commitid azhGmN4UmFpduSYr; 1.20 date 2006.12.17.12.35.57; author rse; state Exp; branches; next 1.19; commitid mMGWxlemP1O0hSYr; 1.19 date 2006.09.29.06.52.17; author rse; state Exp; branches; next 1.18; commitid GAi8hE7exXGIUGOr; 1.18 date 2006.03.07.14.30.32; author rse; state Exp; branches 1.18.2.1; next 1.17; commitid K3oLgxryNjPs4gor; 1.17 date 2006.02.22.19.09.51; author rse; state Exp; branches; next 1.16; commitid LRseObw8cE7c2Cmr; 1.16 date 2006.02.22.18.43.47; author rse; state Exp; branches; next 1.15; commitid kRLBlHHS5NTfTBmr; 1.15 date 2006.01.10.12.48.37; author tho; state Exp; branches; next 1.14; commitid FQC9ZWrqhxY5j3hr; 1.14 date 2005.09.24.15.48.01; author rse; state Exp; branches; next 1.13; 1.13 date 2004.11.23.09.18.08; author tho; state Exp; branches; next 1.12; 1.12 date 2004.11.13.14.53.34; author rse; state Exp; branches; next 1.11; 1.11 date 2004.03.28.21.48.01; author thl; state Exp; branches 1.11.2.1 1.11.4.1; next 1.10; 1.10 date 2004.03.28.21.30.58; author thl; state Exp; branches; next 1.9; 1.9 date 2004.03.10.21.26.17; author thl; state Exp; branches; next 1.8; 1.8 date 2004.02.02.20.45.59; author rse; state Exp; branches; next 1.7; 1.7 date 2004.01.29.15.09.57; author ms; state Exp; branches; next 1.6; 1.6 date 2004.01.16.23.28.02; author ms; state Exp; branches; next 1.5; 1.5 date 2004.01.16.20.15.33; author ms; state Exp; branches; next 1.4; 1.4 date 2003.06.17.06.58.54; author mlelstv; state Exp; branches 1.4.2.1; next 1.3; 1.3 date 2002.05.08.11.56.01; author rse; state Exp; branches; next 1.2; 1.2 date 2002.03.08.11.32.28; author rse; state Exp; branches; next 1.1; 1.1 date 2002.02.06.16.34.19; author rse; state Exp; branches; next ; 1.18.2.1 date 2006.10.16.14.51.12; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; 1.11.2.1 date 2004.11.29.15.35.00; author thl; state Exp; branches; next ; 1.11.4.1 date 2004.11.29.15.34.41; author thl; state Exp; branches; next 1.11.4.2; 1.11.4.2 date 2005.03.04.16.11.59; author ms; state Exp; branches; next ; 1.4.2.1 date 2003.07.24.20.49.47; author rse; state Exp; branches; next ; desc @@ 1.24 log @upgrading package: imapd 2.3.13 -> 2.3.14 @ text @Index: com_err/et/com_err.c --- com_err/et/com_err.c.orig 2008-03-24 19:53:40 +0100 +++ com_err/et/com_err.c 2009-03-26 18:45:35 +0100 @@@@ -52,7 +52,7 @@@@ #include #include "mit-sipb-copyright.h" -#if defined(HAVE_STDARG_H) || defined(_WINDOWS) +#if defined(HAVE_STDARG_H) || defined(__STDC__) || defined(_WINDOWS) #include #else #include Index: com_err/et/com_err.h --- com_err/et/com_err.h.orig 2008-03-24 19:53:40 +0100 +++ com_err/et/com_err.h 2009-03-26 18:45:35 +0100 @@@@ -104,5 +104,7 @@@@ extern void (*reset_com_err_hook ()) (); #endif +struct et_list; + #define __COM_ERR_H #endif /* ! defined(__COM_ERR_H) */ Index: configure --- configure.orig 2009-03-25 12:37:47 +0100 +++ configure 2009-03-26 18:45:35 +0100 @@@@ -11907,7 +11907,7 @@@@ done if test "$ac_cv_header_pcreposix_h" == "yes"; then - LIBS="$LIBS -lpcre -lpcreposix"; + LIBS="$LIBS -lpcreposix -lpcre"; cat >>confdefs.h <<\_ACEOF #define ENABLE_REGEX /**/ Index: imap/fud.c --- imap/fud.c.orig 2009-02-09 06:01:56 +0100 +++ imap/fud.c 2009-03-26 18:46:21 +0100 @@@@ -104,23 +104,23 @@@@ char who[16]; -#define MAXLOGNAME 16 /* should find out for real */ -#define MAXDOMNAME 20 /* should find out for real */ +#define MY_MAXLOGNAME 16 /* should find out for real */ +#define MY_MAXDOMNAME 20 /* should find out for real */ int begin_handling(void) { struct sockaddr_storage sfrom; socklen_t sfromsiz = sizeof(sfrom); int r; - char buf[MAXLOGNAME + MAXDOMNAME + MAX_MAILBOX_BUFFER]; - char username[MAXLOGNAME + MAXDOMNAME]; + char buf[MY_MAXLOGNAME + MY_MAXDOMNAME + MAX_MAILBOX_BUFFER]; + char username[MY_MAXLOGNAME + MY_MAXDOMNAME]; char mbox[MAX_MAILBOX_BUFFER]; char *q; int off; - int maxuserlen = MAXLOGNAME; + int maxuserlen = MY_MAXLOGNAME; if (config_virtdomains) - maxuserlen += MAXDOMNAME + 1; /* @@ + DOM */ + maxuserlen += MY_MAXDOMNAME + 1; /* @@ + DOM */ while(1) { /* For safety */ Index: imap/idled.c --- imap/idled.c.orig 2008-03-24 18:09:16 +0100 +++ imap/idled.c 2009-03-26 18:45:35 +0100 @@@@ -52,6 +52,7 @@@@ #include #include #include +#include #include #ifdef HAVE_UNISTD_H #include Index: imap/mboxname.c --- imap/mboxname.c.orig 2009-02-09 06:01:58 +0100 +++ imap/mboxname.c 2009-03-26 18:45:35 +0100 @@@@ -131,7 +131,11 @@@@ sprintf(result, "%s!", cp); } } +#ifdef ATVDOM /* allow '@@' being a regular character in mboxname even when using virtual domains */ + else if ((cp = strrchr(name, '@@'))) { +#else if ((cp = strrchr(name, '@@'))) { +#endif /* ATVDOM */ /* mailbox specified as mbox@@domain */ namelen = cp - name; Index: imap/sync_log.c --- imap/sync_log.c.orig 2009-02-09 06:01:59 +0100 +++ imap/sync_log.c 2009-03-26 18:45:35 +0100 @@@@ -58,6 +58,7 @@@@ #include #endif #include +#include #include #include #include Index: imap/xversion.sh --- imap/xversion.sh.orig 2008-03-24 18:09:20 +0100 +++ imap/xversion.sh 2009-03-26 18:45:35 +0100 @@@@ -62,7 +62,7 @@@@ match ($0, pattern) { printf "\"%s\"\n", substr($0, RSTART, RLENGTH) }' pattern="$DATEPAT $TIMEPAT" | \ - sort | tail -1 >> $TMPF + sort | sed -n -e '$p' >> $TMPF if [ -f xversion.h ] && cmp -s $TMPF xversion.h then Index: lib/cyrusdb_berkeley.c --- lib/cyrusdb_berkeley.c.orig 2009-03-10 03:56:22 +0100 +++ lib/cyrusdb_berkeley.c 2009-03-26 18:45:35 +0100 @@@@ -173,6 +173,7 @@@@ dbenv->set_lk_detect(dbenv, CONFIG_DEADLOCK_DETECTION); +#if (DB_VERSION_MAJOR < 4) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 5) if ((opt = libcyrus_config_getint(CYRUSOPT_BERKELEY_LOCKS_MAX)) < 0) { syslog(LOG_WARNING, "DBERROR: invalid berkeley_locks_max value, using internal default"); @@@@ -192,6 +193,7 @@@@ abort(); } } +#endif if ((opt = libcyrus_config_getint(CYRUSOPT_BERKELEY_TXNS_MAX)) < 0) { syslog(LOG_WARNING, Index: lib/cyrusdb_skiplist.c --- lib/cyrusdb_skiplist.c.orig 2008-10-08 17:47:08 +0200 +++ lib/cyrusdb_skiplist.c 2009-03-26 18:45:35 +0100 @@@@ -75,6 +75,13 @@@@ #define PROB (0.5) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +/* #define fdatasync(fd) fsync(fd) */ +#ifndef O_DSYNC +#define O_DSYNC 0 +#endif +#endif + /* * * disk format; all numbers in network byte order Index: lib/prot.h --- lib/prot.h.orig 2008-03-24 18:43:09 +0100 +++ lib/prot.h 2009-03-26 18:45:35 +0100 @@@@ -49,6 +49,7 @@@@ #include #include #include +#include #include Index: perl/Makefile.in --- perl/Makefile.in.orig 2008-04-04 14:47:07 +0200 +++ perl/Makefile.in 2009-03-26 18:45:35 +0100 @@@@ -84,7 +84,8 @@@@ BDB_LIB="$(BDB_LIB)" BDB_INC="$(BDB_INC)" \ OPENSSL_LIB="$(OPENSSL_LIB)" OPENSSL_INC="$(OPENSSL_INC)" \ SASL_LIB="$(SASL_LIB)" SASL_INC="$(SASL_INC)" CC="$(CC)" \ - $(PERL) Makefile.PL PREFIX=$(prefix); \ + $(PERL) Makefile.PL PREFIX=$(prefix) \ + INSTALLDIRS="vendor" INSTALLMAN3DIR="none" INSTALLSITEMAN3DIR="none" INSTALLVENDORMAN3DIR="none"; \ fi; \ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all) || exit 1; \ done Index: perl/sieve/Makefile.in --- perl/sieve/Makefile.in.orig 2008-04-04 14:47:16 +0200 +++ perl/sieve/Makefile.in 2009-03-26 18:45:35 +0100 @@@@ -84,7 +84,8 @@@@ BDB_LIB="$(BDB_LIB)" BDB_INC="$(BDB_INC)" \ OPENSSL_LIB="$(OPENSSL_LIB)" OPENSSL_INC="$(OPENSSL_INC)" \ SASL_LIB="$(SASL_LIB)" SASL_INC="$(SASL_INC)" CC="$(CC)" \ - $(PERL) Makefile.PL PREFIX=$(prefix); \ + $(PERL) Makefile.PL PREFIX=$(prefix) \ + INSTALLDIRS="vendor" INSTALLMAN3DIR="none" INSTALLSITEMAN3DIR="none" INSTALLVENDORMAN3DIR="none"; \ fi; \ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all) || exit 1; \ done Index: perl/sieve/lib/isieve.c --- perl/sieve/lib/isieve.c.orig 2009-02-16 19:18:10 +0100 +++ perl/sieve/lib/isieve.c 2009-03-26 18:45:35 +0100 @@@@ -41,9 +41,7 @@@@ * $Id: isieve.c,v 1.36 2009/02/16 18:18:10 murch Exp $ */ -#ifdef HAVE_CONFIG_H -#include -#endif +#include "../../../config.h" #ifdef HAVE_UNISTD_H #include @ 1.23 log @upgrading package: imapd 2.3.9 -> 2.3.10 @ text @d2 3 a4 3 --- com_err/et/com_err.c.orig 2007-10-17 22:06:31 +0200 +++ com_err/et/com_err.c 2007-10-25 09:02:30 +0200 @@@@ -51,7 +51,7 @@@@ d14 3 a16 3 --- com_err/et/com_err.h.orig 2007-10-17 22:06:31 +0200 +++ com_err/et/com_err.h 2007-10-25 09:02:30 +0200 @@@@ -101,5 +101,7 @@@@ d25 3 a27 3 --- configure.orig 2007-10-24 20:12:43 +0200 +++ configure 2007-10-25 09:02:30 +0200 @@@@ -9481,7 +9481,7 @@@@ d35 1 a35 1 #define ENABLE_REGEX d37 3 a39 3 --- imap/fud.c.orig 2007-02-05 19:41:46 +0100 +++ imap/fud.c 2007-10-25 09:02:30 +0200 @@@@ -104,26 +104,26 @@@@ d53 1 a53 1 - char buf[MAXLOGNAME + MAXDOMNAME+ MAX_MAILBOX_NAME + 1]; d55 1 a55 1 + char buf[MY_MAXLOGNAME + MY_MAXDOMNAME+ MAX_MAILBOX_NAME + 1]; d57 1 a57 1 char mbox[MAX_MAILBOX_NAME+1]; d60 6 a65 2 - int maxuserlen = MAXLOGNAME + config_virtdomains ? MAXDOMNAME : 0; + int maxuserlen = MY_MAXLOGNAME + config_virtdomains ? MY_MAXDOMNAME : 0; a68 8 - memset(username,'\0',MAXLOGNAME + MAXDOMNAME); + memset(username,'\0',MY_MAXLOGNAME + MY_MAXDOMNAME); memset(mbox,'\0',MAX_MAILBOX_NAME+1); - memset(buf, '\0', MAXLOGNAME + MAX_MAILBOX_NAME + 1); + memset(buf, '\0', MY_MAXLOGNAME + MAX_MAILBOX_NAME + 1); if (signals_poll() == SIGHUP) { /* caught a SIGHUP, return */ d70 3 a72 3 --- imap/idled.c.orig 2007-02-05 19:41:46 +0100 +++ imap/idled.c 2007-10-25 09:02:30 +0200 @@@@ -50,6 +50,7 @@@@ d81 3 a83 3 --- imap/mboxname.c.orig 2007-10-23 18:53:07 +0200 +++ imap/mboxname.c 2007-10-25 09:02:30 +0200 @@@@ -128,7 +128,11 @@@@ d96 3 a98 3 --- imap/sync_log.c.orig 2007-02-05 19:41:48 +0100 +++ imap/sync_log.c 2007-10-25 09:02:30 +0200 @@@@ -57,6 +57,7 @@@@ d107 3 a109 3 --- imap/xversion.sh.orig 2007-10-17 20:45:48 +0200 +++ imap/xversion.sh 2007-10-25 09:02:30 +0200 @@@@ -23,7 +23,7 @@@@ d119 3 a121 3 --- lib/cyrusdb_berkeley.c.orig 2007-09-27 22:02:45 +0200 +++ lib/cyrusdb_berkeley.c 2007-10-25 09:02:30 +0200 @@@@ -172,6 +172,7 @@@@ d129 1 a129 1 @@@@ -191,6 +192,7 @@@@ d138 3 a140 3 --- lib/cyrusdb_skiplist.c.orig 2007-02-05 19:43:26 +0100 +++ lib/cyrusdb_skiplist.c 2007-10-25 09:02:30 +0200 @@@@ -74,6 +74,13 @@@@ d155 2 a156 2 --- lib/prot.h.orig 2007-10-16 18:22:01 +0200 +++ lib/prot.h 2007-10-25 09:02:30 +0200 d166 3 a168 3 --- perl/Makefile.in.orig 2007-04-23 15:40:27 +0200 +++ perl/Makefile.in 2007-10-25 09:02:30 +0200 @@@@ -82,7 +82,8 @@@@ d179 2 a180 2 --- perl/sieve/Makefile.in.orig 2007-04-23 15:40:27 +0200 +++ perl/sieve/Makefile.in 2007-10-25 09:02:30 +0200 d192 2 a193 2 --- perl/sieve/lib/isieve.c.orig 2007-03-27 21:29:56 +0200 +++ perl/sieve/lib/isieve.c 2007-10-25 09:02:30 +0200 d195 2 a196 2 /* $Id: isieve.c,v 1.32 2007/03/27 19:29:56 murch Exp $ */ @ 1.22 log @upgrade and package style cleanups @ text @d1 3 a3 3 Index: et/com_err.c --- et/com_err.c.orig 2004-05-22 05:45:47 +0200 +++ et/com_err.c 2007-02-08 09:24:55 +0100 d13 4 a16 4 Index: et/com_err.h --- et/com_err.h.orig 2003-02-13 21:15:21 +0100 +++ et/com_err.h 2007-02-08 09:24:55 +0100 @@@@ -99,5 +99,7 @@@@ d24 12 d38 1 a38 1 +++ imap/fud.c 2007-02-08 09:24:55 +0100 d75 1 a75 1 +++ imap/idled.c 2007-02-08 09:24:55 +0100 d85 2 a86 2 --- imap/mboxname.c.orig 2006-11-30 18:11:19 +0100 +++ imap/mboxname.c 2007-02-08 09:24:55 +0100 d101 1 a101 1 +++ imap/sync_log.c 2007-02-08 09:24:55 +0100 d111 3 a113 3 --- imap/xversion.sh.orig 2003-10-22 20:03:00 +0200 +++ imap/xversion.sh 2007-02-08 09:24:55 +0100 @@@@ -22,4 +22,4 @@@@ d117 5 a121 2 - sort | tail -1 >> xversion.h + sort | sed -n -e '$p' >> xversion.h d123 2 a124 2 --- lib/cyrusdb_berkeley.c.orig 2007-02-05 19:43:26 +0100 +++ lib/cyrusdb_berkeley.c 2007-02-08 09:24:55 +0100 d133 1 a133 1 @@@@ -183,6 +184,7 @@@@ d143 1 a143 1 +++ lib/cyrusdb_skiplist.c 2007-02-08 09:24:55 +0100 d159 2 a160 2 --- lib/prot.h.orig 2006-11-30 18:11:22 +0100 +++ lib/prot.h 2007-02-08 09:24:55 +0100 d170 2 a171 2 --- perl/Makefile.in.orig 2003-10-22 20:50:17 +0200 +++ perl/Makefile.in 2007-02-08 09:24:55 +0100 d183 2 a184 2 --- perl/sieve/Makefile.in.orig 2003-10-22 20:50:24 +0200 +++ perl/sieve/Makefile.in 2007-02-08 09:24:55 +0100 d196 2 a197 2 --- perl/sieve/lib/isieve.c.orig 2006-11-30 18:11:24 +0100 +++ perl/sieve/lib/isieve.c 2007-02-08 09:24:55 +0100 d200 1 a200 1 /* $Id: isieve.c,v 1.30 2006/11/30 17:11:24 murch Exp $ */ @ 1.21 log @fix a large bunch of compile warnings and cleanup more completely on deinstallation @ text @d2 2 a3 2 --- et/com_err.c.orig 2004-05-25 03:28:00 +0200 +++ et/com_err.c 2006-12-17 14:10:03 +0100 d15 1 a15 1 +++ et/com_err.h 2006-12-17 14:10:03 +0100 d25 3 a27 3 --- imap/fud.c.orig 2005-04-13 17:43:36 +0200 +++ imap/fud.c 2006-12-17 14:10:03 +0100 @@@@ -102,26 +102,26 @@@@ a60 11 Index: imap/idle.c --- imap/idle.c.orig 2005-12-12 22:23:58 +0100 +++ imap/idle.c 2006-12-17 14:10:03 +0100 @@@@ -53,6 +53,7 @@@@ #include #endif #include +#include #include "idle.h" #include "idled.h" d62 2 a63 2 --- imap/idled.c.orig 2005-12-12 22:23:58 +0100 +++ imap/idled.c 2006-12-17 14:10:03 +0100 d73 2 a74 2 --- imap/mboxname.c.orig 2005-02-14 07:43:17 +0100 +++ imap/mboxname.c 2006-12-17 14:10:03 +0100 d88 2 a89 2 --- imap/sync_log.c.orig 2005-05-12 21:56:17 +0200 +++ imap/sync_log.c 2006-12-17 14:10:03 +0100 d96 1 a97 1 #include d100 1 a100 1 +++ imap/xversion.sh 2006-12-17 14:10:03 +0100 d108 3 a110 3 --- lib/cyrusdb_berkeley.c.orig 2006-02-28 13:58:07 +0100 +++ lib/cyrusdb_berkeley.c 2006-12-17 14:10:03 +0100 @@@@ -169,6 +169,7 @@@@ d118 1 a118 1 @@@@ -180,6 +181,7 @@@@ d127 5 a131 5 --- lib/cyrusdb_skiplist.c.orig 2006-12-17 14:10:03 +0100 +++ lib/cyrusdb_skiplist.c 2006-12-17 14:10:03 +0100 @@@@ -76,6 +76,13 @@@@ #define O_DSYNC 0 #endif d144 2 a145 2 --- lib/prot.h.orig 2006-02-01 20:25:42 +0100 +++ lib/prot.h 2006-12-17 14:10:03 +0100 a153 24 Index: lib/xstrlcat.h --- lib/xstrlcat.h.orig 2006-03-22 22:38:48 +0100 +++ lib/xstrlcat.h 2006-12-17 14:10:03 +0100 @@@@ -48,6 +48,8 @@@@ #include /* for free() */ #include +/* for strlen() */ +#include #ifndef HAVE_STRLCAT extern size_t strlcat(char *dst, const char *src, size_t len); Index: lib/xstrlcpy.h --- lib/xstrlcpy.h.orig 2006-03-22 22:38:49 +0100 +++ lib/xstrlcpy.h 2006-12-17 14:10:03 +0100 @@@@ -48,6 +48,8 @@@@ #include /* for free() */ #include +/* for strlen() */ +#include /* handy string manipulation functions */ #ifndef HAVE_STRLCPY d156 1 a156 1 +++ perl/Makefile.in 2006-12-17 14:10:03 +0100 d169 1 a169 1 +++ perl/sieve/Makefile.in 2006-12-17 14:10:03 +0100 d181 2 a182 2 --- perl/sieve/lib/isieve.c.orig 2005-04-21 23:04:50 +0200 +++ perl/sieve/lib/isieve.c 2006-12-17 14:10:03 +0100 d185 1 a185 1 /* $Id: isieve.c,v 1.27.2.2 2005/04/21 21:04:50 shadow Exp $ */ @ 1.20 log @Complete overhaul of the Cyrus IMAP Daemon packaging: - cleanup style in default configuration - cleanup cyrus.conf default configuration - remove duplicate "pop3d" entry in fsl.imapd - recreate the imapd.patch with svs(1) - fix building under with_drac=yes by forcing rebuild of imapopts.[ch] - fix dependencies under with_drac=yes - fix substitution regex for imapd.conf-mkimap installation - from scratch assemble options and flags for configure step - use a loop for logfile rotation and add idled(8) - cleanup lots of packaging comments - add with_murder=yes for IMAP Murder support - add with_listext=yes for IMAP LISTEXT support - add with_nntp=yes for NNTP support - fix pidfile handling of [cyr]master @ text @d3 1 a3 1 +++ et/com_err.c 2006-12-16 21:28:26 +0100 d13 70 d85 1 a85 1 +++ imap/mboxname.c 2006-12-16 21:28:26 +0100 d98 11 d111 1 a111 1 +++ imap/xversion.sh 2006-12-16 21:28:26 +0100 d120 1 a120 1 +++ lib/cyrusdb_berkeley.c 2006-12-16 21:28:26 +0100 d138 5 a142 5 --- lib/cyrusdb_skiplist.c.orig 2004-06-09 21:42:47 +0200 +++ lib/cyrusdb_skiplist.c 2006-12-16 21:28:26 +0100 @@@@ -71,6 +71,11 @@@@ #define PROB (0.5) d146 1 d149 1 d156 1 a156 1 +++ lib/prot.h 2006-12-16 21:28:26 +0100 d165 24 d191 1 a191 1 +++ perl/Makefile.in 2006-12-16 21:28:26 +0100 d204 1 a204 1 +++ perl/sieve/Makefile.in 2006-12-16 21:28:26 +0100 d217 1 a217 1 +++ perl/sieve/lib/isieve.c 2006-12-16 21:28:26 +0100 @ 1.19 log @allow building against DB 4.5; adjust rc.imapd shebang (seems to be overlooked) @ text @d3 1 a3 1 +++ et/com_err.c 2006-02-22 19:10:03 +0100 d15 1 a15 1 +++ imap/mboxname.c 2006-02-22 19:10:03 +0100 d30 1 a30 1 +++ imap/xversion.sh 2006-02-22 19:10:35 +0100 d37 19 d58 1 a58 1 +++ lib/cyrusdb_skiplist.c 2006-02-22 19:10:03 +0100 d72 2 a73 2 --- lib/prot.h.orig 2005-05-04 21:25:44 +0200 +++ lib/prot.h 2006-02-22 19:10:03 +0100 d84 1 a84 1 +++ perl/Makefile.in 2006-02-22 19:10:03 +0100 d97 1 a97 1 +++ perl/sieve/Makefile.in 2006-02-22 19:10:03 +0100 d110 1 a110 1 +++ perl/sieve/lib/isieve.c 2006-02-22 19:10:03 +0100 a121 19 Index: lib/cyrusdb_berkeley.c --- lib/cyrusdb_berkeley.c.orig 2006-02-28 13:58:07 +0100 +++ lib/cyrusdb_berkeley.c 2006-09-29 08:46:51 +0200 @@@@ -169,6 +169,7 @@@@ dbenv->set_lk_detect(dbenv, CONFIG_DEADLOCK_DETECTION); +#if (DB_VERSION_MAJOR < 4) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 5) if ((opt = libcyrus_config_getint(CYRUSOPT_BERKELEY_LOCKS_MAX)) < 0) { syslog(LOG_WARNING, "DBERROR: invalid berkeley_locks_max value, using internal default"); @@@@ -180,6 +181,7 @@@@ abort(); } } +#endif if ((opt = libcyrus_config_getint(CYRUSOPT_BERKELEY_TXNS_MAX)) < 0) { syslog(LOG_WARNING, @ 1.18 log @improve portability even more (this time for Solaris) @ text @d103 19 @ 1.18.2.1 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a102 19 Index: lib/cyrusdb_berkeley.c --- lib/cyrusdb_berkeley.c.orig 2006-02-28 13:58:07 +0100 +++ lib/cyrusdb_berkeley.c 2006-09-29 08:46:51 +0200 @@@@ -169,6 +169,7 @@@@ dbenv->set_lk_detect(dbenv, CONFIG_DEADLOCK_DETECTION); +#if (DB_VERSION_MAJOR < 4) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 5) if ((opt = libcyrus_config_getint(CYRUSOPT_BERKELEY_LOCKS_MAX)) < 0) { syslog(LOG_WARNING, "DBERROR: invalid berkeley_locks_max value, using internal default"); @@@@ -180,6 +181,7 @@@@ abort(); } } +#endif if ((opt = libcyrus_config_getint(CYRUSOPT_BERKELEY_TXNS_MAX)) < 0) { syslog(LOG_WARNING, @ 1.17 log @add NetBSD support. Submitted by: anonymous @ text @d36 1 a36 1 + sort | tail -n 1 >> xversion.h @ 1.16 log @cleanup and improve packaging @ text @d44 1 a44 1 +#ifdef __FreeBSD__ @ 1.15 log @explicitly disabled gss-api as it will automaticly try to include krb5 support. krb5 includes are broken at least under FreeBSD 5/6 @ text @d2 3 a4 3 --- et/com_err.c.orig 2003-06-04 05:27:50.000000000 +0200 +++ et/com_err.c 2004-02-02 19:56:00.000000000 +0100 @@@@ -50,7 +50,7 @@@@ d13 24 d38 2 a39 2 --- lib/cyrusdb_skiplist.c.orig 2003-12-15 17:04:35.000000000 +0100 +++ lib/cyrusdb_skiplist.c 2004-02-02 19:56:00.000000000 +0100 d53 2 a54 2 --- lib/prot.h.orig 2003-10-22 20:50:12.000000000 +0200 +++ lib/prot.h 2004-02-02 19:58:47.000000000 +0100 a62 14 Index: perl/sieve/lib/isieve.c --- perl/sieve/lib/isieve.c.orig 2003-10-22 20:50:25.000000000 +0200 +++ perl/sieve/lib/isieve.c 2004-02-02 20:01:21.000000000 +0100 @@@@ -41,9 +41,7 @@@@ /* $Id: imapd.patch,v 1.12 2004/11/13 14:53:34 rse Exp $ */ -#ifdef HAVE_CONFIG_H -#include -#endif +#include "../../../config.h" #ifdef HAVE_UNISTD_H #include d64 2 a65 2 --- perl/Makefile.in.orig 2003-10-22 20:50:17.000000000 +0200 +++ perl/Makefile.in 2004-02-02 21:23:32.000000000 +0100 d77 2 a78 2 --- perl/sieve/Makefile.in.orig 2003-10-22 20:50:24.000000000 +0200 +++ perl/sieve/Makefile.in 2004-02-02 21:41:22.000000000 +0100 d89 11 a99 14 Index: imap/mboxname.c --- imap/mboxname.c.orig 2004-03-17 10:03:40.000000000 +0200 +++ imap/mboxname.c 2004-03-17 10:03:40.000000000 +0200 @@@@ -129,7 +129,11 @@@@ domainlen = strlen(result); } } +#ifdef ATVDOM /* allow '@@' being a regular character in mboxname even when using virtual domains */ + else if ((cp = strrchr(name, '@@'))) { +#else if ((cp = strrchr(name, '@@'))) { +#endif /* ATVDOM */ /* mailbox specified as mbox@@domain */ namelen = cp - name; d101 2 a102 1 @ 1.14 log @port to the new GCC 4.0 world order @ text @a94 31 Index: lib/cyrusdb_berkeley.c --- lib/cyrusdb_berkeley.c.orig 2004-03-11 19:36:44 +0100 +++ lib/cyrusdb_berkeley.c 2004-11-13 13:48:28 +0100 @@@@ -104,7 +104,7 @@@@ exit(EC_TEMPFAIL); } -static void db_err(const char *db_prfx, char *buffer) +static void db_err(const DB_ENV *dbenv, const char *db_prfx, const char *buffer) { syslog(LOG_WARNING, "DBERROR %s: %s", db_prfx, buffer); } Index: lib/imapopts.h --- lib/imapopts.h.orig 2005-02-14 18:59:46 +0100 +++ lib/imapopts.h 2005-09-24 17:44:27 +0200 @@@@ -178,7 +178,6 @@@@ }; -extern struct imapopt_s imapopts[]; @@@@ -236,5 +235,7 @@@@ }; +extern struct imapopt_s imapopts[]; + #endif /* INCLUDED_IMAPOPTIONS_H */ @ 1.13 log @upgrading package: imapd 2.2.8 -> 2.2.9 @ text @d107 19 @ 1.12 log @Upgrade from DB 4.2 to 4.3 @ text @d44 1 a44 1 /* $Id: imapd.patch,v 1.11 2004/03/28 21:48:01 thl Exp $ */ a106 10 @@@@ -143,9 +143,6 @@@@ dbenv->set_verbose(dbenv, DB_VERB_DEADLOCK, 1); dbenv->set_verbose(dbenv, DB_VERB_WAITSFOR, 1); } - if (CONFIG_DB_VERBOSE > 1) { - dbenv->set_verbose(dbenv, DB_VERB_CHKPOINT, 1); - } dbenv->set_errcall(dbenv, db_err); snprintf(errpfx, sizeof(errpfx), "db%d", DB_VERSION_MAJOR); @ 1.11 log @modifying package: imapd-2.2.3 20040317 -> 20040328 @ text @d44 1 a44 1 /* $Id: imapd.patch,v 1.10 2004/03/28 21:30:58 thl Exp $ */ d95 22 @ 1.11.2.1 log @SA-2004.051-imapd; CAN-2004-1011, CAN-2004-1012, CAN-2004-1013, CAN-2004-1015 and more @ text @d44 1 a44 1 /* $Id: imapd.patch,v 1.11 2004/03/28 21:48:01 thl Exp $ */ a94 139 Assembled from Pine.LNX.4.58.0411231531110.2382@@wotan.suse.de Discussion between Stefan Esser, Derrick J Brashear and Sebastian Krahmer http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1011 Cyrus IMAP Server - IMAPMAGICPLUS preauthentification overflow 2.2.4 - 2.2.8 --- imap/imapd.c.orig 2004-11-15 11:20:17.000000000 +0100 +++ imap/imapd.c 2004-11-23 15:18:22.000000000 +0100 @@@@ -286,6 +286,11 @@@@ if (!ulen) ulen = strlen(user); if (config_getswitch(IMAPOPT_IMAPMAGICPLUS)) { + if (ulen > MAX_MAILBOX_NAME) { + sasl_seterror(conn, 0, "buffer overflow while canonicalizing"); + return SASL_BUFOVER; + } + /* make a working copy of the auth[z]id */ memcpy(userbuf, user, ulen); userbuf[ulen] = '\0'; @@@@ -345,6 +350,11 @@@@ /* make a working copy of the authzid */ if (!rlen) rlen = strlen(requested_user); + if (rlen > MAX_MAILBOX_NAME) { + sasl_seterror(conn, 0, "buffer overflow while proxying"); + return SASL_BUFOVER; + } + memcpy(userbuf, requested_user, rlen); userbuf[rlen] = '\0'; requested_user = userbuf; http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1012 Cyrus IMAP Server - PARTIAL out of bounds memory corruption <= 2.2.6 ([thl: bug exists but] unexploitable in 2.2.7 + 2.2.8) --- imap/imapd.c.orig 2004-11-15 11:20:17.000000000 +0100 +++ imap/imapd.c 2004-11-23 15:18:22.000000000 +0100 @@@@ -3154,7 +3168,7 @@@@ else if (!strncmp(data, "body[", 5) || !strncmp(data, "body.peek[", 10)) { p = section = data + 5; - if (*p == 'p') { + if (!strncmp(p, "peek[", 5)) { p = section += 5; } else { http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1013 Cyrus IMAP Server - FETCH out of bounds memory corruption <= 2.2.8 --- imap/imapd.c.orig 2004-11-15 11:20:17.000000000 +0100 +++ imap/imapd.c 2004-11-23 15:18:22.000000000 +0100 @@@@ -2770,10 +2784,10 @@@@ int binsize = 0; p = section = fetchatt.s + 7; - if (*p == 'P') { + if (!strncmp(p, "PEEK[", 5)) { p = section += 5; } - else if (*p == 'S') { + else if (!strncmp(p, "SIZE[", 5)) { p = section += 5; binsize = 1; } @@@@ -2813,7 +2827,7 @@@@ else if (!strncmp(fetchatt.s, "BODY[", 5) || !strncmp(fetchatt.s, "BODY.PEEK[", 10)) { p = section = fetchatt.s + 5; - if (*p == 'P') { + if (!strncmp(p, "PEEK[", 5)) { p = section += 5; } else { http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1015 Proxyd.c contains a IMAPMAGICPLUS overflow in its proxyd_canon_user function <= 2.2.9 --- imap/proxyd.c.orig 2004-11-23 14:42:37.000000000 +0100 +++ imap/proxyd.c 2004-11-23 15:00:56.000000000 +0100 @@@@ -1032,6 +1032,10 @@@@ if (config_getswitch(IMAPOPT_IMAPMAGICPLUS)) { /* make a working copy of the auth[z]id */ + if (ulen > MAX_MAILBOX_NAME) { + sasl_seterror(conn, 0, "buffer overflow while canonicalizing"); + return SASL_BUFOVER; + } memcpy(userbuf, user, ulen); userbuf[ulen] = '\0'; user = userbuf; @@@@ -1090,6 +1094,11 @@@@ /* make a working copy of the authzid */ if (!rlen) rlen = strlen(requested_user); + + if (rlen > MAX_MAILBOX_NAME) { + sasl_seterror(conn, 0, "buffer overflow while proxying"); + return SASL_BUFOVER; + } memcpy(userbuf, requested_user, rlen); userbuf[rlen] = '\0'; requested_user = userbuf; missing 0-termination in global.c <= 2.2.10 --- imap/global.c.orig 2004-11-23 15:01:50.000000000 +0100 +++ imap/global.c 2004-11-23 15:23:53.000000000 +0100 @@@@ -427,12 +427,12 @@@@ return SASL_BADAUTH; } *out_ulen = strlen(canonuser); - if (*out_ulen > out_max) { + if (*out_ulen >= out_max) { sasl_seterror(conn, 0, "buffer overflow while canonicalizing"); return SASL_BUFOVER; } - strncpy(out, canonuser, out_max); + strcpy(out, canonuser); return SASL_OK; } intwrap in cmd_append() and post increment glitches --- imap/imapd.c.orig 2004-11-15 11:20:17.000000000 +0100 +++ imap/imapd.c 2004-11-23 15:18:22.000000000 +0100 @@@@ -3314,7 +3328,8 @@@@ flag = (char **)xrealloc((char *)flag, flagalloc*sizeof(char *)); } - flag[nflags++] = xstrdup(flagname.s); + flag[nflags] = xstrdup(flagname.s); + nflags++; } flagsparsed++; @ 1.11.4.1 log @SA-2004.051-imapd; CAN-2004-1011, CAN-2004-1012, CAN-2004-1013, CAN-2004-1015 and more @ text @d44 1 a44 1 /* $Id: imapd.patch,v 1.11 2004/03/28 21:48:01 thl Exp $ */ a94 164 Assembled from Pine.LNX.4.58.0411231531110.2382@@wotan.suse.de Discussion between Stefan Esser, Derrick J Brashear and Sebastian Krahmer http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1011 Cyrus IMAP Server - IMAPMAGICPLUS preauthentification overflow 2.2.4 - 2.2.8 --- imap/imapd.c.orig 2004-11-15 11:20:17.000000000 +0100 +++ imap/imapd.c 2004-11-23 15:18:22.000000000 +0100 @@@@ -286,6 +286,11 @@@@ if (!ulen) ulen = strlen(user); if (config_getswitch(IMAPOPT_IMAPMAGICPLUS)) { + if (ulen > MAX_MAILBOX_NAME) { + sasl_seterror(conn, 0, "buffer overflow while canonicalizing"); + return SASL_BUFOVER; + } + /* make a working copy of the auth[z]id */ memcpy(userbuf, user, ulen); userbuf[ulen] = '\0'; @@@@ -345,6 +350,11 @@@@ /* make a working copy of the authzid */ if (!rlen) rlen = strlen(requested_user); + if (rlen > MAX_MAILBOX_NAME) { + sasl_seterror(conn, 0, "buffer overflow while proxying"); + return SASL_BUFOVER; + } + memcpy(userbuf, requested_user, rlen); userbuf[rlen] = '\0'; requested_user = userbuf; http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1012 Cyrus IMAP Server - PARTIAL out of bounds memory corruption <= 2.2.6 ([thl: bug exists but] unexploitable in 2.2.7 + 2.2.8) --- imap/imapd.c.orig 2004-11-15 11:20:17.000000000 +0100 +++ imap/imapd.c 2004-11-23 15:18:22.000000000 +0100 @@@@ -3154,7 +3168,7 @@@@ else if (!strncmp(data, "body[", 5) || !strncmp(data, "body.peek[", 10)) { p = section = data + 5; - if (*p == 'p') { + if (!strncmp(p, "peek[", 5)) { p = section += 5; } else { http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1013 Cyrus IMAP Server - FETCH out of bounds memory corruption <= 2.2.8 --- imap/imapd.c.orig 2004-11-15 11:20:17.000000000 +0100 +++ imap/imapd.c 2004-11-23 15:18:22.000000000 +0100 @@@@ -2770,10 +2784,10 @@@@ int binsize = 0; p = section = fetchatt.s + 7; - if (*p == 'P') { + if (!strncmp(p, "PEEK[", 5)) { p = section += 5; } - else if (*p == 'S') { + else if (!strncmp(p, "SIZE[", 5)) { p = section += 5; binsize = 1; } @@@@ -2813,7 +2827,7 @@@@ else if (!strncmp(fetchatt.s, "BODY[", 5) || !strncmp(fetchatt.s, "BODY.PEEK[", 10)) { p = section = fetchatt.s + 5; - if (*p == 'P') { + if (!strncmp(p, "PEEK[", 5)) { p = section += 5; } else { http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-1015 Proxyd.c contains a IMAPMAGICPLUS overflow in its proxyd_canon_user function <= 2.2.9 --- imap/proxyd.c.orig 2004-11-23 14:42:37.000000000 +0100 +++ imap/proxyd.c 2004-11-23 15:00:56.000000000 +0100 @@@@ -1032,6 +1032,10 @@@@ if (config_getswitch(IMAPOPT_IMAPMAGICPLUS)) { /* make a working copy of the auth[z]id */ + if (ulen > MAX_MAILBOX_NAME) { + sasl_seterror(conn, 0, "buffer overflow while canonicalizing"); + return SASL_BUFOVER; + } memcpy(userbuf, user, ulen); userbuf[ulen] = '\0'; user = userbuf; @@@@ -1090,6 +1094,11 @@@@ /* make a working copy of the authzid */ if (!rlen) rlen = strlen(requested_user); + + if (rlen > MAX_MAILBOX_NAME) { + sasl_seterror(conn, 0, "buffer overflow while proxying"); + return SASL_BUFOVER; + } memcpy(userbuf, requested_user, rlen); userbuf[rlen] = '\0'; requested_user = userbuf; missing 0-termination in global.c <= 2.2.10 --- imap/global.c.orig 2004-11-23 15:01:50.000000000 +0100 +++ imap/global.c 2004-11-23 15:23:53.000000000 +0100 @@@@ -427,12 +427,12 @@@@ return SASL_BADAUTH; } *out_ulen = strlen(canonuser); - if (*out_ulen > out_max) { + if (*out_ulen >= out_max) { sasl_seterror(conn, 0, "buffer overflow while canonicalizing"); return SASL_BUFOVER; } - strncpy(out, canonuser, out_max); + strcpy(out, canonuser); return SASL_OK; } intwrap in cmd_append() and post increment glitches --- imap/imapd.c.orig 2004-11-15 11:20:17.000000000 +0100 +++ imap/imapd.c 2004-11-23 15:18:22.000000000 +0100 @@@@ -2349,10 +2359,13 @@@@ while (!r && c == ' ') { /* Grow the stage array, if necessary */ if (numstage == numalloc) { + if (numalloc > INT_MAX/(2*sizeof(struct appendstage *))) + goto done; numalloc *= 2; stage = xrealloc(stage, numalloc * sizeof(struct appendstage *)); } - curstage = stage[numstage++] = xzmalloc(sizeof(struct appendstage)); + curstage = stage[numstage] = xzmalloc(sizeof(struct appendstage)); + numstage++; /* Parse flags */ c = getword(imapd_in, &arg); @@@@ -2372,7 +2385,8 @@@@ (char **) xrealloc((char *) curstage->flag, curstage->flagalloc * sizeof(char *)); } - curstage->flag[curstage->nflags++] = xstrdup(arg.s); + curstage->flag[curstage->nflags] = xstrdup(arg.s); + curstage->nflags++; } while (c == ' '); if (c != ')') { parseerr = @@@@ -3314,7 +3328,8 @@@@ flag = (char **)xrealloc((char *)flag, flagalloc*sizeof(char *)); } - flag[nflags++] = xstrdup(flagname.s); + flag[nflags] = xstrdup(flagname.s); + nflags++; } flagsparsed++; @ 1.11.4.2 log @patch code to solve OpenPKG-SA-2005.005-imapd buffer overflows (no CAN yet) @ text @d44 1 a44 1 /* $Id: imapd.patch,v 1.11.4.1 2004/11/29 15:34:41 thl Exp $ */ d258 1 a258 373 Index: imap/annotate.c --- imap/annotate.c.orig 2004-06-23 04:55:23 +0200 +++ imap/annotate.c 2005-03-04 15:54:22 +0100 @@@@ -920,7 +920,7 @@@@ { struct fetchdata *fdata = (struct fetchdata *) rock; struct annotate_f_entry_list *entries_ptr; - static char lastname[MAX_MAILBOX_PATH]; + static char lastname[MAX_MAILBOX_PATH+1]; static int sawuser = 0; int c; char int_mboxname[MAX_MAILBOX_PATH+1], ext_mboxname[MAX_MAILBOX_PATH+1]; @@@@ -954,10 +954,10 @@@@ if (!strncasecmp(lastname, "INBOX", 5)) { (*fdata->namespace->mboxname_tointernal)(fdata->namespace, "INBOX", fdata->userid, int_mboxname); - strcat(int_mboxname, lastname+5); + strlcat(int_mboxname, lastname+5, sizeof(int_mboxname)); } else - strcpy(int_mboxname, lastname); + strlcpy(int_mboxname, lastname, sizeof(int_mboxname)); c = name[matchlen]; if (c) name[matchlen] = '\0'; @@@@ -1377,7 +1377,7 @@@@ { struct storedata *sdata = (struct storedata *) rock; struct annotate_st_entry_list *entries_ptr; - static char lastname[MAX_MAILBOX_PATH]; + static char lastname[MAX_MAILBOX_PATH+1]; static int sawuser = 0; char int_mboxname[MAX_MAILBOX_PATH+1]; struct mailbox_annotation_rock mbrock; @@@@ -1405,16 +1405,16 @@@@ sawuser = 1; } - strcpy(lastname, name); + strlcpy(lastname, name, sizeof(lastname)); lastname[matchlen] = '\0'; if (!strncasecmp(lastname, "INBOX", 5)) { (*sdata->namespace->mboxname_tointernal)(sdata->namespace, "INBOX", sdata->userid, int_mboxname); - strcat(int_mboxname, lastname+5); + strlcat(int_mboxname, lastname+5, sizeof(int_mboxname)); } else - strcpy(int_mboxname, lastname); + strlcpy(int_mboxname, lastname, sizeof(int_mboxname)); memset(&mbrock, 0, sizeof(struct mailbox_annotation_rock)); get_mb_data(int_mboxname, &mbrock); Index: imap/backend.c --- imap/backend.c.orig 2004-07-16 16:53:24 +0200 +++ imap/backend.c 2005-03-04 16:14:00 +0100 @@@@ -297,7 +297,7 @@@@ sunsock.sun_len = res0->ai_addrlen; #endif sunsock.sun_family = AF_UNIX; - strcpy(sunsock.sun_path, server); + strlcpy(sunsock.sun_path, server, sizeof(sunsock.sun_path)); /* XXX set that we are preauthed */ Index: imap/fetchnews.c --- imap/fetchnews.c.orig 2004-07-16 20:44:19 +0200 +++ imap/fetchnews.c 2005-03-04 16:15:51 +0100 @@@@ -247,6 +247,7 @@@@ } #define RESP_GROW 100 +#define BUFFERSIZE 4096 int main(int argc, char *argv[]) { @@@@ -257,7 +258,7 @@@@ char *authname = NULL, *password = NULL; int psock = -1, ssock = -1; struct protstream *pin, *pout, *sin, *sout; - char buf[4096]; + char buf[BUFFERSIZE]; char sfile[1024] = ""; int fd, i, n, offered, rejected, accepted, failed; time_t stamp; @@@@ -470,7 +471,7 @@@@ close(fd); } else { - char group[1024], msgid[1024], lastbuf[50]; + char group[BUFFERSIZE], msgid[BUFFERSIZE], lastbuf[50]; const char *data; unsigned long low, high, last, cur; int start; Index: imap/imapd.c --- imap/imapd.c.orig 2004-07-15 18:19:18 +0200 +++ imap/imapd.c 2005-03-04 16:21:31 +0100 @@@@ -3769,13 +3769,17 @@@@ /* take care of deleting ACLs, subscriptions, seen state and quotas */ *p = '\0'; /* clip off pattern */ + if ((!domainlen) || + (domainlen+1 < (sizeof(mailboxname) - mailboxname_len))) { if (domainlen) { /* fully qualify the userid */ - sprintf(p, "@@%.*s", domainlen-1, mailboxname); + snprintf(p, (sizeof(mailboxname) - mailboxname_len), "@@%.*s", + domainlen-1, mailboxname); } user_deletedata(mailboxname+domainlen+5, imapd_userid, imapd_authstate, 1); } + } if (imapd_mailbox) { index_check(imapd_mailbox, 0, 0); @@@@ -3806,8 +3810,8 @@@@ int maycreate __attribute__((unused)), void *rock) { - char oldextname[MAX_MAILBOX_NAME]; - char newextname[MAX_MAILBOX_NAME]; + char oldextname[MAX_MAILBOX_NAME+1]; + char newextname[MAX_MAILBOX_NAME+1]; struct renrock *text = (struct renrock *)rock; int r; Index: imap/mailbox.c --- imap/mailbox.c.orig 2004-05-22 05:45:51 +0200 +++ imap/mailbox.c 2005-03-04 16:35:53 +0100 @@@@ -187,7 +187,7 @@@@ /* Generate lower case copy of string */ /* xxx sometimes the caller has already generated this .. * maybe we can just require callers to do it? */ - for (i=0 ; *s && (i < MAX_CACHED_HEADER_SIZE) ; i++) + for (i=0 ; *s && (i < (MAX_CACHED_HEADER_SIZE - 1)) ; i++) hdr[i] = tolower(*s++); if (*s) return BIT32_MAX; /* Input too long for match */ @@@@ -205,7 +205,7 @@@@ int i; /* Scan for header */ - for (i=0; i < MAX_CACHED_HEADER_SIZE; i++) { + for (i=0; i < (MAX_CACHED_HEADER_SIZE - 1); i++) { if (!text[i] || text[i] == '\r' || text[i] == '\n') break; if (text[i] == ':') { Index: imap/mboxname.c --- imap/mboxname.c.orig 2004-07-13 17:02:08 +0200 +++ imap/mboxname.c 2005-03-04 16:41:11 +0100 @@@@ -122,8 +122,10 @@@@ userlen = cp++ - userid; /* don't prepend default domain */ if (!(config_defdomain && !strcasecmp(config_defdomain, cp))) { + domainlen = strlen(cp)+1; + if (domainlen > MAX_MAILBOX_NAME) + return IMAP_MAILBOX_BADNAME; sprintf(result, "%s!", cp); - domainlen = strlen(result); } } if ((cp = strrchr(name, '@@'))) { @@@@ -144,8 +146,10 @@@@ (except for global admin) */ return IMAP_MAILBOX_BADNAME; } + domainlen = strlen(cp+1)+1; + if (domainlen > MAX_MAILBOX_NAME) + return IMAP_MAILBOX_BADNAME; sprintf(result, "%s!", cp+1); - domainlen = strlen(result); } } @@@@ -194,6 +198,7 @@@@ char *cp; int userlen, domainlen = 0, namelen; int prefixlen; + size_t resultlen; /* Blank the result, just in case */ result[0] = '\0'; @@@@ -207,8 +212,10 @@@@ userlen = cp++ - userid; if (!(config_defdomain && !strcasecmp(config_defdomain, cp))) { /* don't prepend default domain */ + domainlen = strlen(cp)+1; + if (domainlen > MAX_MAILBOX_NAME) + return IMAP_MAILBOX_BADNAME; sprintf(result, "%s!", cp); - domainlen = strlen(result); } } if ((cp = strrchr(name, '@@'))) { @@@@ -229,8 +236,10 @@@@ (except for global admin) */ return IMAP_MAILBOX_BADNAME; } + domainlen = strlen(cp+1)+1; + if (domainlen > MAX_MAILBOX_NAME) + return IMAP_MAILBOX_BADNAME; sprintf(result, "%s!", cp+1); - domainlen = strlen(result); } } @@@@ -310,11 +319,14 @@@@ return 0; } + resultlen = strlen(result); + /* other personal folder */ - if (domainlen+strlen(result)+6+namelen > MAX_MAILBOX_NAME) { + if (domainlen+resultlen+6+namelen > MAX_MAILBOX_NAME) { return IMAP_MAILBOX_BADNAME; } - sprintf(result+strlen(result), ".%.*s", namelen, name); + snprintf(result+resultlen, MAX_MAILBOX_NAME+1-resultlen, ".%.*s", + namelen, name); /* Translate any separators in mailboxname */ mboxname_hiersep_tointernal(namespace, result+6+userlen, 0); @@@@ -333,7 +345,7 @@@@ const char *userid, char *result) { char *domain = NULL, *cp; - size_t domainlen = 0; + size_t domainlen = 0, resultlen; /* Blank the result, just in case */ result[0] = '\0'; @@@@ -356,9 +368,16 @@@@ /* Translate any separators in mailboxname */ mboxname_hiersep_toexternal(namespace, result, 0); + resultlen = strlen(result); + /* Append domain */ - if (domain) - sprintf(result+strlen(result), "@@%.*s", domainlen, domain); + if (domain) { + if(resultlen+domainlen+1 > MAX_MAILBOX_NAME) + return IMAP_MAILBOX_BADNAME; + + snprintf(result+resultlen, MAX_MAILBOX_NAME+1-resultlen, + "@@%.*s", domainlen, domain); + } return 0; } @@@@ -368,7 +387,7 @@@@ const char *userid, char *result) { char *domain; - size_t userlen; + size_t userlen, resultlen; /* Blank the result, just in case */ result[0] = '\0'; @@@@ -412,12 +431,18 @@@@ /* Other Users namespace */ else if (!strncmp(name, "user", 4) && (name[4] == '\0' || name[4] == '.')) { + size_t prefixlen = strlen(namespace->prefix[NAMESPACE_USER]); + + if ((prefixlen > MAX_MAILBOX_NAME) || + ((name[4] == '.') && + ((prefixlen+1+strlen(name+5)) > MAX_MAILBOX_NAME))) + return IMAP_MAILBOX_BADNAME; + sprintf(result, "%.*s", - (int) strlen(namespace->prefix[NAMESPACE_USER])-1, - namespace->prefix[NAMESPACE_USER]); + prefixlen-1, namespace->prefix[NAMESPACE_USER]); + resultlen = strlen(result); if (name[4] == '.') { - sprintf(result+strlen(result), "%c%s", - namespace->hier_sep, name+5); + sprintf(result+resultlen, "%c%s", namespace->hier_sep, name+5); } } Index: imap/seen_local.c --- imap/seen_local.c.orig 2004-01-22 22:17:10 +0100 +++ imap/seen_local.c 2005-03-04 16:49:14 +0100 @@@@ -145,8 +145,8 @@@@ unsigned long left; unsigned long length, namelen; - strcpy(fnamebuf, seendb->mailbox->path); - strcat(fnamebuf, FNAME_SEEN); + strlcpy(fnamebuf, seendb->mailbox->path, sizeof(fnamebuf)); + strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf)); /* Lock the database */ if (!seendb->mailbox->seen_lock_count) { @@@@ -279,10 +279,10 @@@@ num_iov = 0; if (replace) { - strcpy(fnamebuf, seendb->mailbox->path); - strcat(fnamebuf, FNAME_SEEN); - strcpy(newfnamebuf, fnamebuf); - strcat(newfnamebuf, ".NEW"); + strlcpy(fnamebuf, seendb->mailbox->path, sizeof(fnamebuf)); + strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf)); + strlcpy(newfnamebuf, fnamebuf, sizeof(newfnamebuf)); + strlcat(newfnamebuf, ".NEW", sizeof(newfnamebuf)); writefd = open(newfnamebuf, O_RDWR|O_TRUNC|O_CREAT, 0666); if (writefd == -1) { @@@@ -390,8 +390,8 @@@@ char fnamebuf[MAX_MAILBOX_PATH+1]; int fd; - strcpy(fnamebuf, mailbox->path); - strcat(fnamebuf, FNAME_SEEN); + strlcpy(fnamebuf, mailbox->path, sizeof(fnamebuf)); + strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf)); fd = open(fnamebuf, O_RDWR|O_TRUNC|O_CREAT, 0666); if (fd == -1) { @@@@ -412,8 +412,8 @@@@ int r; const char *lockfailaction; - strcpy(fnamebuf, mailbox->path); - strcat(fnamebuf, FNAME_SEEN); + strlcpy(fnamebuf, mailbox->path, sizeof(fnamebuf)); + strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf)); fd = open(fnamebuf, O_RDWR, 0666); if (fd == -1) { @@@@ -441,10 +441,10 @@@@ char oldfname[MAX_MAILBOX_PATH+1]; char newfname[MAX_MAILBOX_PATH+1]; - strcpy(oldfname, oldmailbox->path); - strcat(oldfname, FNAME_SEEN); - strcpy(newfname, newmailbox->path); - strcat(newfname, FNAME_SEEN); + strlcpy(oldfname, oldmailbox->path, sizeof(oldfname)); + strlcat(oldfname, FNAME_SEEN, sizeof(oldfname)); + strlcpy(newfname, newmailbox->path, sizeof(newfname)); + strlcat(newfname, FNAME_SEEN, sizeof(newfname)); return mailbox_copyfile(oldfname, newfname, 0); } @@@@ -567,8 +567,8 @@@@ time(&now); nowplus1day = now + 24*60*60; - strcpy(fnamebuf, mailbox->path); - strcat(fnamebuf, FNAME_SEEN); + strlcpy(fnamebuf, mailbox->path, sizeof(fnamebuf)); + strlcat(fnamebuf, FNAME_SEEN, sizeof(fnamebuf)); fd = open(fnamebuf, O_RDWR, 0666); if (fd == -1) { @@@@ -722,8 +722,8 @@@@ r = 0; if (newiov_dirty) { - strcpy(newfnamebuf, fnamebuf); - strcat(newfnamebuf, ".NEW"); + strlcpy(newfnamebuf, fnamebuf, sizeof(newfnamebuf)); + strlcat(newfnamebuf, ".NEW", sizeof(newfnamebuf)); writefd = open(newfnamebuf, O_RDWR|O_TRUNC|O_CREAT, 0666); if (writefd == -1) { @ 1.10 log @IGNMAD hack did not work so remove it @ text @d44 1 a44 1 /* $Id: imapd.patch,v 1.9 2004/03/10 21:26:17 thl Exp $ */ d79 16 @ 1.9 log @add experimental support for ignoring mailbox@@domain by means of option with_ignmad; suggestion from Stefan Buys for kolab-20040217-2.0.0 issue @ text @d44 1 a44 1 /* $Id: imapd.patch,v 1.8 2004/02/02 20:45:59 rse Exp $ */ a78 35 Index: imap/mboxname.c --- imap/mboxname.c.orig 2003-10-22 20:50:08.000000000 +0200 +++ imap/mboxname.c 2004-03-10 21:08:47.000000000 +0100 @@@@ -127,6 +127,7 @@@@ domainlen = strlen(result); } } +#ifndef IGNMAD /* ignore mailbox@@domain */ if ((cp = strrchr(name, '@@'))) { /* mailbox specified as mbox@@domain */ namelen = cp - name; @@@@ -149,6 +150,7 @@@@ domainlen = strlen(result); } } +#endif /* IGNMAD */ /* if no domain specified, we're in the default domain */ } @@@@ -212,6 +214,7 @@@@ domainlen = strlen(result); } } +#ifndef IGNMAD /* ignore mailbox@@domain */ if ((cp = strrchr(name, '@@'))) { /* mailbox specified as mbox@@domain */ namelen = cp - name; @@@@ -234,6 +237,7 @@@@ domainlen = strlen(result); } } +#endif /* IGNMAD */ /* if no domain specified, we're in the default domain */ } @ 1.8 log @fix Perl module installations @ text @d44 1 a44 1 /* $Id: isieve.c,v 1.27 2003/10/22 18:50:25 rjs3 Exp $ */ d79 35 @ 1.7 log @upgrading package: imapd 2.1.16 -> 2.2.3 @ text @d1 15 a15 2 --- lib/cyrusdb_skiplist.c.orig Tue Apr 23 20:25:48 2002 +++ lib/cyrusdb_skiplist.c Wed May 8 13:49:23 2002 d28 22 a49 5 --- et/com_err.c.dist Tue Jun 17 08:38:32 2003 +++ et/com_err.c Tue Jun 17 08:38:46 2003 @@@@ -50,7 +50,7 @@@@ #include #include "mit-sipb-copyright.h" d51 28 a78 5 -#if defined(HAVE_STDARG_H) || defined(_WINDOWS) +#if defined(HAVE_STDARG_H) || defined(__STDC__) || defined(_WINDOWS) #include #else #include @ 1.6 log @2.2.3 seems not too ready yet (process ***** exited, status 75), so back out upgrade from 2.1.16 @ text @d3 1 a3 1 @@@@ -69,6 +69,11 @@@@ d17 1 a17 1 @@@@ -48,7 +48,7 @@@@ @ 1.5 log @upgrading package: imapd 2.1.16 -> 2.2.3 @ text @d3 1 a3 1 @@@@ -71,6 +71,11 @@@@ d17 1 a17 1 @@@@ -50,7 +50,7 @@@@ @ 1.4 log @avoid using varargs. more perl administration stuff @ text @d3 1 a3 1 @@@@ -69,6 +69,11 @@@@ d17 1 a17 1 @@@@ -48,7 +48,7 @@@@ @ 1.4.2.1 log @mass Merge-From-CURRENT (MFC) in preparation for OpenPKG 1.3 [class PLUS only] @ text @@ 1.3 log @upgrading upstream version from 2.1.3 to 2.1.4 @ text @d15 11 @ 1.2 log @upgrade to imapd 2.1.3 (now can use db instead of db3\!) @ text @d1 3 a3 3 --- config.h.in.orig Wed Feb 6 17:29:06 2002 +++ config.h.in Wed Feb 6 17:29:16 2002 @@@@ -238,6 +238,7 @@@@ d5 1 a5 11 /* getaddrinfo things */ #include +#include #include #ifndef HAVE_GETADDRINFO --- lib/cyrusdb_skiplist.c.orig Thu Feb 28 20:50:36 2002 +++ lib/cyrusdb_skiplist.c Fri Mar 8 12:28:55 2002 @@@@ -170,6 +170,10 @@@@ be_paranoid = 0 }; d8 2 a9 1 +#define fdatasync(fd) fsync(fd) d12 3 a14 3 #define FSYNC(fd) (do_fsync && fsync(fd)) #define FDATASYNC(fd) ((do_fsync == 1 && fdatasync(fd)) || \ (do_fsync == 2 && fsync(fd))) @ 1.1 log @upgrade to imapd 2.1.1 @ text @d11 13 @