- update to latest upstream

- (temporarily) dropped the rmquota+deletemailbox patch (doesn't apply)
This commit is contained in:
Tomas Janousek 2008-03-25 10:20:30 +00:00
parent 26fefd3148
commit d4ef9ede28
7 changed files with 144 additions and 1134 deletions

View File

@ -1,6 +1,6 @@
diff -Naur cyrus-imapd-2.3.9/README.autocreate cyrus-imapd-2.3.9-autocreate.uncompiled/README.autocreate
--- cyrus-imapd-2.3.9/README.autocreate 1970-01-01 02:00:00.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/README.autocreate 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/README.autocreate cyrus-imapd-2.3.11-autocreate.uncompiled/README.autocreate
--- cyrus-imapd-2.3.11/README.autocreate 1970-01-01 02:00:00.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/README.autocreate 2007-12-12 13:29:49.000000000 +0200
@@ -0,0 +1,211 @@
+Cyrus IMAP autocreate Inbox patch
+----------------------------------
@ -213,20 +213,20 @@ diff -Naur cyrus-imapd-2.3.9/README.autocreate cyrus-imapd-2.3.9-autocreate.unco
+
+For more information and updates please visit http://email.uoa.gr/projects/cyrus/autocreate
+
diff -Naur cyrus-imapd-2.3.9/imap/Makefile.in cyrus-imapd-2.3.9-autocreate.uncompiled/imap/Makefile.in
--- cyrus-imapd-2.3.9/imap/Makefile.in 2007-01-09 19:41:35.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/imap/Makefile.in 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/imap/Makefile.in cyrus-imapd-2.3.11-autocreate.uncompiled/imap/Makefile.in
--- cyrus-imapd-2.3.11/imap/Makefile.in 2007-10-18 21:48:02.000000000 +0300
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/imap/Makefile.in 2007-12-12 13:29:49.000000000 +0200
@@ -101,7 +101,7 @@
convert_code.o duplicate.o saslclient.o saslserver.o signals.o \
annotate.o search_engines.o squat.o squat_internal.o mbdump.o \
imapparse.o telemetry.o user.o notify.o protocol.o idle.o quota_db.o \
- sync_log.o $(SEEN) mboxkey.o backend.o tls.o
+ sync_log.o autosieve.o $(SEEN) mboxkey.o backend.o tls.o
- sync_log.o $(SEEN) mboxkey.o backend.o tls.o message_guid.o
+ sync_log.o autosieve.o $(SEEN) mboxkey.o backend.o tls.o message_guid.o
IMAPDOBJS=pushstats.o imapd.o proxy.o imap_proxy.o index.o version.o
@@ -117,7 +117,7 @@
fud smmapd reconstruct quota mbpath ipurge cyr_dbtool \
fud smmapd reconstruct quota mbpath ipurge cyr_dbtool cyr_synclog \
cyrdump chk_cyrus cvt_cyrusdb deliver ctl_mboxlist \
ctl_deliver ctl_cyrusdb squatter mbexamine cyr_expire arbitron \
- unexpunge @IMAP_PROGS@
@ -234,7 +234,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/Makefile.in cyrus-imapd-2.3.9-autocreate.uncom
BUILTSOURCES = imap_err.c imap_err.h pushstats.c pushstats.h \
lmtpstats.c lmtpstats.h xversion.h mupdate_err.c mupdate_err.h \
@@ -183,9 +183,9 @@
@@ -182,9 +182,9 @@
mupdate_err.h: mupdate_err.c
### Services
@ -246,12 +246,12 @@ diff -Naur cyrus-imapd-2.3.9/imap/Makefile.in cyrus-imapd-2.3.9-autocreate.uncom
lmtpd: lmtpd.o proxy.o $(LMTPOBJS) $(SIEVE_OBJS) mutex_fake.o \
libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
@@ -199,151 +199,156 @@
@@ -198,158 +198,162 @@
$(SERVICE) lmtpd.o proxy.o $(LMTPOBJS) $(SIEVE_OBJS) \
mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP)
-imapd: xversion $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+imapd: xversion $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
-imapd: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+imapd: $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
$(CC) $(LDFLAGS) -o imapd \
$(SERVICE) $(IMAPDOBJS) mutex_fake.o \
- libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
@ -290,7 +290,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/Makefile.in cyrus-imapd-2.3.9-autocreate.uncom
pop3d: pop3d.o proxy.o backend.o tls.o mutex_fake.o libimap.a \
- $(DEPLIBS) $(SERVICE)
+ $(DEPLIBS) $(SIEVE_LIBS) $(SERVICE)
+ $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
$(CC) $(LDFLAGS) -o pop3d pop3d.o proxy.o backend.o tls.o $(SERVICE) \
- mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+ mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP)
@ -337,6 +337,12 @@ diff -Naur cyrus-imapd-2.3.9/imap/Makefile.in cyrus-imapd-2.3.9-autocreate.uncom
- libimap.a $(DEPLIBS) $(LIBS)
+ libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS)
-cyr_synclog: cyr_synclog.o mutex_fake.o libimap.a $(DEPLIBS)
+cyr_synclog: cyr_synclog.o mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS)
$(CC) $(LDFLAGS) -o cyr_synclog cyr_synclog.o $(CLIOBJS) \
- libimap.a $(DEPLIBS) $(LIBS)
+ libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS)
-cvt_cyrusdb: cvt_cyrusdb.o mutex_fake.o libimap.a $(DEPLIBS)
+cvt_cyrusdb: cvt_cyrusdb.o mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS)
$(CC) $(LDFLAGS) -o cvt_cyrusdb cvt_cyrusdb.o $(CLIOBJS) \
@ -444,6 +450,11 @@ diff -Naur cyrus-imapd-2.3.9/imap/Makefile.in cyrus-imapd-2.3.9-autocreate.uncom
+make_md5: make_md5.o libimap.a mutex_fake.o $(SIEVE_LIBS) $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o make_md5 make_md5.o libimap.a mutex_fake.o $(SIEVE_LIBS) $(DEPLIBS) $(LIBS)
-make_sha1: make_sha1.o libimap.a mutex_fake.o $(DEPLIBS)
- $(CC) $(LDFLAGS) -o make_sha1 make_sha1.o libimap.a mutex_fake.o $(DEPLIBS) $(LIBS)
+make_sha1: make_sha1.o libimap.a mutex_fake.o $(SIEVE_LIBS) $(DEPLIBS)
+ $(CC) $(LDFLAGS) -o make_sha1 make_sha1.o libimap.a mutex_fake.o $(SIEVE_LIBS) $(DEPLIBS) $(LIBS)
sync_client: sync_client.o sync_support.o \
- backend.o tls.o imapparse.o libimap.a mutex_fake.o $(DEPLIBS)
+ backend.o tls.o imapparse.o libimap.a mutex_fake.o $(SIEVE_LIBS) $(DEPLIBS)
@ -463,14 +474,13 @@ diff -Naur cyrus-imapd-2.3.9/imap/Makefile.in cyrus-imapd-2.3.9-autocreate.uncom
+compile_sieve: compile_sieve.o libimap.a $(DEPLIBS) $(SIEVE_LIBS)
+ $(CC) $(LDFLAGS) -o compile_sieve compile_sieve.o $(CLIOBJS) \
+ libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS)
+
### Other Misc Targets
diff -Naur cyrus-imapd-2.3.9/imap/autosieve.c cyrus-imapd-2.3.9-autocreate.uncompiled/imap/autosieve.c
--- cyrus-imapd-2.3.9/imap/autosieve.c 1970-01-01 02:00:00.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/imap/autosieve.c 2007-08-21 15:00:04.000000000 +0300
@@ -0,0 +1,587 @@
diff -Naur cyrus-imapd-2.3.11/imap/autosieve.c cyrus-imapd-2.3.11-autocreate.uncompiled/imap/autosieve.c
--- cyrus-imapd-2.3.11/imap/autosieve.c 1970-01-01 02:00:00.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/imap/autosieve.c 2007-12-12 13:29:49.000000000 +0200
@@ -0,0 +1,590 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
@ -492,6 +502,9 @@ diff -Naur cyrus-imapd-2.3.9/imap/autosieve.c cyrus-imapd-2.3.9-autocreate.uncom
+
+#include "global.h"
+#include "util.h"
+#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
+#include "mailbox.h"
+#include "imap_err.h"
+#include "sieve_interface.h"
@ -505,7 +518,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/autosieve.c cyrus-imapd-2.3.9-autocreate.uncom
+static int get_script_dir(char *sieve_script_dir, size_t buflen, char *userid, const char *sieve_dir);
+int autoadd_sieve(char *userid, const char *source_script);
+
+static void fatal(const char *s, int code);
+//static void fatal(const char *s, int code);
+static void foo(void);
+static int sieve_notify(void *ac __attribute__((unused)),
+ void *interp_context __attribute__((unused)),
@ -911,11 +924,11 @@ diff -Naur cyrus-imapd-2.3.9/imap/autosieve.c cyrus-imapd-2.3.9-autocreate.uncom
+ return 0;
+}
+
+static void fatal(const char *s, int code)
+/*static void fatal(const char *s, int code)
+{
+ printf("Fatal error: %s (%d)\r\n", s, code);
+ exit(1);
+}
+}*/
+
+/* to make larry's stupid functions happy :) */
+static void foo(void)
@ -1058,10 +1071,10 @@ diff -Naur cyrus-imapd-2.3.9/imap/autosieve.c cyrus-imapd-2.3.9-autocreate.uncom
+ * Pavlos. Author of cyrusmaster. So consider this patch as his birthday present
+ */
+
diff -Naur cyrus-imapd-2.3.9/imap/compile_sieve.c cyrus-imapd-2.3.9-autocreate.uncompiled/imap/compile_sieve.c
--- cyrus-imapd-2.3.9/imap/compile_sieve.c 1970-01-01 02:00:00.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/imap/compile_sieve.c 2007-08-21 14:59:22.000000000 +0300
@@ -0,0 +1,364 @@
diff -Naur cyrus-imapd-2.3.11/imap/compile_sieve.c cyrus-imapd-2.3.11-autocreate.uncompiled/imap/compile_sieve.c
--- cyrus-imapd-2.3.11/imap/compile_sieve.c 1970-01-01 02:00:00.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/imap/compile_sieve.c 2007-12-12 13:29:49.000000000 +0200
@@ -0,0 +1,365 @@
+/* This tool compiles the sieve script from a command
+line so that it can be used wby the autoadd patch */
+#include <stdio.h>
@ -1084,6 +1097,9 @@ diff -Naur cyrus-imapd-2.3.9/imap/compile_sieve.c cyrus-imapd-2.3.9-autocreate.u
+#include "global.h"
+
+#include "util.h"
+#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
+#include "mailbox.h"
+#include "imap_err.h"
+#include "sieve_interface.h"
@ -1100,12 +1116,12 @@ diff -Naur cyrus-imapd-2.3.9/imap/compile_sieve.c cyrus-imapd-2.3.9-autocreate.u
+
+static int is_script_parsable(FILE *stream, char **errstr, sieve_script_t **ret);
+
+static void fatal(const char *s, int code)
+/*static void fatal(const char *s, int code)
+{
+ printf("Fatal error: %s (%d)\r\n", s, code);
+
+ exit(1);
+}
+}*/
+
+void usage(void)
+{
@ -1122,11 +1138,9 @@ diff -Naur cyrus-imapd-2.3.9/imap/compile_sieve.c cyrus-imapd-2.3.9-autocreate.u
+ bytecode_info_t *bc = NULL;
+ char *err = NULL;
+ FILE *in_stream;
+ int out_fd,r, k, opt;
+ int out_fd, opt;
+ char *source_script = NULL;
+ char *compiled_source_script = NULL;
+ mode_t oldmask;
+ struct stat statbuf;
+ char *alt_config = NULL;
+ extern char *optarg;
+ char sieve_tmpname[MAX_MAILBOX_NAME+1];
@ -1203,7 +1217,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/compile_sieve.c cyrus-imapd-2.3.9-autocreate.u
+
+ if(!in_stream) {
+ fprintf(stderr,"Unable to open %s source sieve script\n",source_script);
+ return;
+ return 1;
+ }
+
+ /*
@ -1237,7 +1251,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/compile_sieve.c cyrus-imapd-2.3.9-autocreate.u
+ unlink(sieve_tmpname);
+ fclose(in_stream);
+ close(out_fd);
+ return;
+ return 1;
+ }
+
+
@ -1249,7 +1263,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/compile_sieve.c cyrus-imapd-2.3.9-autocreate.u
+ sieve_script_free(&s);
+ fclose(in_stream);
+ close(out_fd);
+ return;
+ return 1;
+ }
+ if(sieve_emit_bytecode(out_fd,bc) == TIMSIEVE_FAIL) {
+ fprintf(stderr, "Error occured while emitting sieve script\n");
@ -1258,7 +1272,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/compile_sieve.c cyrus-imapd-2.3.9-autocreate.u
+ sieve_script_free(&s);
+ fclose(in_stream);
+ close(out_fd);
+ return;
+ return 1;
+ }
+
+ /* clean up the memory */
@ -1426,10 +1440,10 @@ diff -Naur cyrus-imapd-2.3.9/imap/compile_sieve.c cyrus-imapd-2.3.9-autocreate.u
+
+
+
diff -Naur cyrus-imapd-2.3.9/imap/imapd.c cyrus-imapd-2.3.9-autocreate.uncompiled/imap/imapd.c
--- cyrus-imapd-2.3.9/imap/imapd.c 2007-08-02 17:18:51.000000000 +0300
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/imap/imapd.c 2007-08-21 14:59:22.000000000 +0300
@@ -204,6 +204,7 @@
diff -Naur cyrus-imapd-2.3.11/imap/imapd.c cyrus-imapd-2.3.11-autocreate.uncompiled/imap/imapd.c
--- cyrus-imapd-2.3.11/imap/imapd.c 2007-11-27 17:31:28.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/imap/imapd.c 2007-12-12 13:29:49.000000000 +0200
@@ -205,6 +205,7 @@
void motd_file(int fd);
void shut_down(int code);
void fatal(const char *s, int code);
@ -1437,7 +1451,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/imapd.c cyrus-imapd-2.3.9-autocreate.uncompile
void cmdloop(void);
void cmd_login(char *tag, char *user);
@@ -1909,6 +1910,43 @@
@@ -1907,6 +1908,43 @@
}
/*
@ -1481,7 +1495,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/imapd.c cyrus-imapd-2.3.9-autocreate.uncompile
* Perform a LOGIN command
*/
void cmd_login(char *tag, char *user)
@@ -2076,6 +2114,9 @@
@@ -2074,6 +2112,9 @@
strcspn(imapd_userid, "@") : 0);
freebuf(&passwdbuf);
@ -1500,9 +1514,9 @@ diff -Naur cyrus-imapd-2.3.9/imap/imapd.c cyrus-imapd-2.3.9-autocreate.uncompile
return;
}
diff -Naur cyrus-imapd-2.3.9/imap/lmtpd.c cyrus-imapd-2.3.9-autocreate.uncompiled/imap/lmtpd.c
--- cyrus-imapd-2.3.9/imap/lmtpd.c 2007-07-18 21:11:55.000000000 +0300
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/imap/lmtpd.c 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/imap/lmtpd.c cyrus-imapd-2.3.11-autocreate.uncompiled/imap/lmtpd.c
--- cyrus-imapd-2.3.11/imap/lmtpd.c 2007-10-12 15:54:23.000000000 +0300
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/imap/lmtpd.c 2007-12-12 13:29:49.000000000 +0200
@@ -117,6 +117,8 @@
static FILE *spoolfile(message_data_t *msgdata);
static void removespool(message_data_t *msgdata);
@ -1512,7 +1526,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/lmtpd.c cyrus-imapd-2.3.9-autocreate.uncompile
/* current namespace */
static struct namespace lmtpd_namespace;
@@ -950,6 +952,86 @@
@@ -956,6 +958,86 @@
exit(code);
}
@ -1599,7 +1613,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/lmtpd.c cyrus-imapd-2.3.9-autocreate.uncompile
static int verify_user(const char *user, const char *domain, char *mailbox,
long quotacheck, struct auth_state *authstate)
{
@@ -993,6 +1075,15 @@
@@ -999,6 +1081,15 @@
*/
r = mlookup(namebuf, &server, &acl, NULL);
@ -1615,7 +1629,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/lmtpd.c cyrus-imapd-2.3.9-autocreate.uncompile
if (r == IMAP_MAILBOX_NONEXISTENT && !user &&
config_getswitch(IMAPOPT_LMTP_FUZZY_MAILBOX_MATCH) &&
/* see if we have a mailbox whose name is close */
@@ -1019,6 +1110,7 @@
@@ -1025,6 +1116,7 @@
aclcheck, (quotacheck < 0)
|| config_getswitch(IMAPOPT_LMTP_STRICT_QUOTA) ?
quotacheck : 0);
@ -1623,12 +1637,12 @@ diff -Naur cyrus-imapd-2.3.9/imap/lmtpd.c cyrus-imapd-2.3.9-autocreate.uncompile
}
}
diff -Naur cyrus-imapd-2.3.9/imap/mboxlist.c cyrus-imapd-2.3.9-autocreate.uncompiled/imap/mboxlist.c
--- cyrus-imapd-2.3.9/imap/mboxlist.c 2007-08-15 20:20:55.000000000 +0300
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/imap/mboxlist.c 2007-08-21 14:59:22.000000000 +0300
@@ -83,6 +83,12 @@
#include "mboxlist.h"
diff -Naur cyrus-imapd-2.3.11/imap/mboxlist.c cyrus-imapd-2.3.11-autocreate.uncompiled/imap/mboxlist.c
--- cyrus-imapd-2.3.11/imap/mboxlist.c 2007-11-27 17:31:29.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/imap/mboxlist.c 2007-12-12 13:29:49.000000000 +0200
@@ -84,6 +84,12 @@
#include "quota.h"
#include "sync_log.h"
+#ifdef USE_SIEVE
+extern int autoadd_sieve(char *userid,
@ -1639,7 +1653,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/mboxlist.c cyrus-imapd-2.3.9-autocreate.uncomp
#define DB config_mboxlist_db
#define SUBDB config_subscription_db
@@ -100,11 +106,29 @@
@@ -101,11 +107,29 @@
static int mboxlist_changequota(const char *name, int matchlen, int maycreate,
void *rock);
@ -1669,9 +1683,9 @@ diff -Naur cyrus-imapd-2.3.9/imap/mboxlist.c cyrus-imapd-2.3.9-autocreate.uncomp
#define FNAME_SUBSSUFFIX ".sub"
/*
@@ -3261,3 +3285,349 @@
@@ -3380,3 +3404,349 @@
return DB->abort(mbdb, tid);
return(config_delete_mode == IMAP_ENUM_DELETE_MODE_DELAYED);
}
+
+/*
@ -2019,24 +2033,22 @@ diff -Naur cyrus-imapd-2.3.9/imap/mboxlist.c cyrus-imapd-2.3.9-autocreate.uncomp
+ return r;
+}
+
diff -Naur cyrus-imapd-2.3.9/imap/mboxlist.h cyrus-imapd-2.3.9-autocreate.uncompiled/imap/mboxlist.h
--- cyrus-imapd-2.3.9/imap/mboxlist.h 2006-11-30 19:11:19.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/imap/mboxlist.h 2007-08-21 14:59:22.000000000 +0300
@@ -204,4 +204,10 @@
int mboxlist_commit(struct txn *tid);
diff -Naur cyrus-imapd-2.3.11/imap/mboxlist.h cyrus-imapd-2.3.11-autocreate.uncompiled/imap/mboxlist.h
--- cyrus-imapd-2.3.11/imap/mboxlist.h 2007-11-27 17:31:29.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/imap/mboxlist.h 2007-12-12 13:30:27.000000000 +0200
@@ -211,4 +211,8 @@
int mboxlist_abort(struct txn *tid);
+int mboxlist_autocreateinbox(struct namespace *namespace,
+ char *userid,
+ struct auth_state *auth_state,
+ char *mailboxname, int autocreatequota);
+
int mboxlist_delayed_delete_isenabled(void);
+int mboxlist_autocreateinbox(struct namespace *namespace,char *userid,
+ struct auth_state *auth_state, char *mailboxname,
+ int autocreatequota);
+
#endif
diff -Naur cyrus-imapd-2.3.9/imap/pop3d.c cyrus-imapd-2.3.9-autocreate.uncompiled/imap/pop3d.c
--- cyrus-imapd-2.3.9/imap/pop3d.c 2007-03-30 21:51:01.000000000 +0300
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/imap/pop3d.c 2007-08-21 14:59:22.000000000 +0300
@@ -158,6 +158,8 @@
diff -Naur cyrus-imapd-2.3.11/imap/pop3d.c cyrus-imapd-2.3.11-autocreate.uncompiled/imap/pop3d.c
--- cyrus-imapd-2.3.11/imap/pop3d.c 2007-11-26 22:23:06.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/imap/pop3d.c 2007-12-12 13:29:49.000000000 +0200
@@ -159,6 +159,8 @@
static char popd_apop_chal[45 + MAXHOSTNAMELEN + 1]; /* <rand.time@hostname> */
static void cmd_apop(char *response);
@ -2045,7 +2057,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/pop3d.c cyrus-imapd-2.3.9-autocreate.uncompile
static void cmd_auth(char *arg);
static void cmd_capa(void);
static void cmd_pass(char *pass);
@@ -1226,6 +1228,7 @@
@@ -1227,6 +1229,7 @@
popd_userid = xstrdup(userbuf);
prot_printf(popd_out, "+OK Name is a valid mailbox\r\n");
}
@ -2053,7 +2065,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/pop3d.c cyrus-imapd-2.3.9-autocreate.uncompile
}
void cmd_pass(char *pass)
@@ -1500,6 +1503,43 @@
@@ -1525,6 +1528,43 @@
}
/*
@ -2097,7 +2109,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/pop3d.c cyrus-imapd-2.3.9-autocreate.uncompile
* Complete the login process by opening and locking the user's inbox
*/
int openinbox(void)
@@ -1528,6 +1568,12 @@
@@ -1553,6 +1593,12 @@
if (!r) r = mboxlist_detail(inboxname, &type, NULL, NULL,
&server, &acl, NULL);
@ -2110,9 +2122,9 @@ diff -Naur cyrus-imapd-2.3.9/imap/pop3d.c cyrus-imapd-2.3.9-autocreate.uncompile
if (!r && (config_popuseacl = config_getswitch(IMAPOPT_POPUSEACL)) &&
(!acl ||
!((myrights = cyrus_acl_myrights(popd_authstate, acl)) & ACL_READ))) {
diff -Naur cyrus-imapd-2.3.9/lib/auth.c cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth.c
--- cyrus-imapd-2.3.9/lib/auth.c 2006-11-30 19:11:22.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth.c 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/lib/auth.c cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth.c
--- cyrus-imapd-2.3.11/lib/auth.c 2006-11-30 19:11:22.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth.c 2007-12-12 13:29:49.000000000 +0200
@@ -117,3 +117,11 @@
auth->freestate(auth_state);
@ -2125,9 +2137,9 @@ diff -Naur cyrus-imapd-2.3.9/lib/auth.c cyrus-imapd-2.3.9-autocreate.uncompiled/
+ return auth->auth_canonuser(auth_state);
+}
+
diff -Naur cyrus-imapd-2.3.9/lib/auth.h cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth.h
--- cyrus-imapd-2.3.9/lib/auth.h 2006-11-30 19:11:22.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth.h 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/lib/auth.h cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth.h
--- cyrus-imapd-2.3.11/lib/auth.h 2006-11-30 19:11:22.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth.h 2007-12-12 13:29:49.000000000 +0200
@@ -54,6 +54,7 @@
const char *identifier);
struct auth_state *(*newstate)(const char *identifier);
@ -2143,9 +2155,9 @@ diff -Naur cyrus-imapd-2.3.9/lib/auth.h cyrus-imapd-2.3.9-autocreate.uncompiled/
+char *auth_canonuser(struct auth_state *auth_state);
#endif /* INCLUDED_AUTH_H */
diff -Naur cyrus-imapd-2.3.9/lib/auth_krb.c cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth_krb.c
--- cyrus-imapd-2.3.9/lib/auth_krb.c 2006-11-30 19:11:22.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth_krb.c 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/lib/auth_krb.c cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth_krb.c
--- cyrus-imapd-2.3.11/lib/auth_krb.c 2007-09-27 23:02:45.000000000 +0300
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth_krb.c 2007-12-12 13:29:49.000000000 +0200
@@ -338,6 +338,15 @@
free((char *)auth_state);
}
@ -2162,7 +2174,7 @@ diff -Naur cyrus-imapd-2.3.9/lib/auth_krb.c cyrus-imapd-2.3.9-autocreate.uncompi
#else /* HAVE_KRB */
static int mymemberof(
@@ -366,6 +375,13 @@
@@ -369,6 +378,13 @@
fatal("Authentication mechanism (krb) not compiled in", EC_CONFIG);
}
@ -2176,15 +2188,15 @@ diff -Naur cyrus-imapd-2.3.9/lib/auth_krb.c cyrus-imapd-2.3.9-autocreate.uncompi
#endif
struct auth_mech auth_krb =
@@ -376,4 +392,5 @@
@@ -379,4 +395,5 @@
&mymemberof,
&mynewstate,
&myfreestate,
+ &mycanonuser,
};
diff -Naur cyrus-imapd-2.3.9/lib/auth_krb5.c cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth_krb5.c
--- cyrus-imapd-2.3.9/lib/auth_krb5.c 2006-11-30 19:11:22.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth_krb5.c 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/lib/auth_krb5.c cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth_krb5.c
--- cyrus-imapd-2.3.11/lib/auth_krb5.c 2007-09-27 23:02:45.000000000 +0300
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth_krb5.c 2007-12-12 13:29:49.000000000 +0200
@@ -197,6 +197,14 @@
free(auth_state);
}
@ -2200,7 +2212,7 @@ diff -Naur cyrus-imapd-2.3.9/lib/auth_krb5.c cyrus-imapd-2.3.9-autocreate.uncomp
#else /* HAVE_GSSAPI_H */
static int mymemberof(
@@ -225,6 +233,12 @@
@@ -228,6 +236,12 @@
fatal("Authentication mechanism (krb5) not compiled in", EC_CONFIG);
}
@ -2213,15 +2225,15 @@ diff -Naur cyrus-imapd-2.3.9/lib/auth_krb5.c cyrus-imapd-2.3.9-autocreate.uncomp
#endif
struct auth_mech auth_krb5 =
@@ -235,4 +249,5 @@
@@ -238,4 +252,5 @@
&mymemberof,
&mynewstate,
&myfreestate,
+ &mycanonuser,
};
diff -Naur cyrus-imapd-2.3.9/lib/auth_pts.c cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth_pts.c
--- cyrus-imapd-2.3.9/lib/auth_pts.c 2007-08-15 20:20:57.000000000 +0300
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth_pts.c 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/lib/auth_pts.c cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth_pts.c
--- cyrus-imapd-2.3.11/lib/auth_pts.c 2007-09-27 23:02:45.000000000 +0300
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth_pts.c 2007-12-12 13:29:49.000000000 +0200
@@ -511,6 +511,14 @@
free(auth_state);
}
@ -2243,10 +2255,10 @@ diff -Naur cyrus-imapd-2.3.9/lib/auth_pts.c cyrus-imapd-2.3.9-autocreate.uncompi
&myfreestate,
+ &mycanonuser,
};
diff -Naur cyrus-imapd-2.3.9/lib/auth_unix.c cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth_unix.c
--- cyrus-imapd-2.3.9/lib/auth_unix.c 2007-02-13 18:42:49.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/lib/auth_unix.c 2007-08-21 14:59:22.000000000 +0300
@@ -269,6 +269,16 @@
diff -Naur cyrus-imapd-2.3.11/lib/auth_unix.c cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth_unix.c
--- cyrus-imapd-2.3.11/lib/auth_unix.c 2007-10-31 12:42:18.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/lib/auth_unix.c 2007-12-12 13:29:49.000000000 +0200
@@ -314,6 +314,16 @@
free((char *)auth_state);
}
@ -2263,15 +2275,15 @@ diff -Naur cyrus-imapd-2.3.9/lib/auth_unix.c cyrus-imapd-2.3.9-autocreate.uncomp
struct auth_mech auth_unix =
{
@@ -278,4 +288,5 @@
@@ -323,4 +333,5 @@
&mymemberof,
&mynewstate,
&myfreestate,
+ &mycanonuser,
};
diff -Naur cyrus-imapd-2.3.9/lib/imapoptions cyrus-imapd-2.3.9-autocreate.uncompiled/lib/imapoptions
--- cyrus-imapd-2.3.9/lib/imapoptions 2007-03-30 21:51:02.000000000 +0300
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/lib/imapoptions 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/lib/imapoptions cyrus-imapd-2.3.11-autocreate.uncompiled/lib/imapoptions
--- cyrus-imapd-2.3.11/lib/imapoptions 2007-10-18 21:14:48.000000000 +0300
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/lib/imapoptions 2007-12-12 13:29:49.000000000 +0200
@@ -177,6 +177,55 @@
/* Number of seconds to wait before returning a timeout failure when
performing a client connection (e.g. in a murder environment) */
@ -2328,9 +2340,9 @@ diff -Naur cyrus-imapd-2.3.9/lib/imapoptions cyrus-imapd-2.3.9-autocreate.uncomp
{ "configdirectory", NULL, STRING }
/* The pathname of the IMAP configuration directory. This field is
required. */
diff -Naur cyrus-imapd-2.3.9/notifyd/Makefile.in cyrus-imapd-2.3.9-autocreate.uncompiled/notifyd/Makefile.in
--- cyrus-imapd-2.3.9/notifyd/Makefile.in 2006-11-30 19:11:23.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/notifyd/Makefile.in 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/notifyd/Makefile.in cyrus-imapd-2.3.11-autocreate.uncompiled/notifyd/Makefile.in
--- cyrus-imapd-2.3.11/notifyd/Makefile.in 2006-11-30 19:11:23.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/notifyd/Makefile.in 2007-12-12 13:29:49.000000000 +0200
@@ -69,10 +69,11 @@
SERVICE=../master/service.o
@ -2344,9 +2356,9 @@ diff -Naur cyrus-imapd-2.3.9/notifyd/Makefile.in cyrus-imapd-2.3.9-autocreate.un
PURIFY=/usr/local/bin/purify
PUREOPT=-best-effort
diff -Naur cyrus-imapd-2.3.9/notifyd/notifyd.c cyrus-imapd-2.3.9-autocreate.uncompiled/notifyd/notifyd.c
--- cyrus-imapd-2.3.9/notifyd/notifyd.c 2006-11-30 19:11:23.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/notifyd/notifyd.c 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/notifyd/notifyd.c cyrus-imapd-2.3.11-autocreate.uncompiled/notifyd/notifyd.c
--- cyrus-imapd-2.3.11/notifyd/notifyd.c 2006-11-30 19:11:23.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/notifyd/notifyd.c 2007-12-12 13:29:49.000000000 +0200
@@ -97,7 +97,7 @@
#define NOTIFY_MAXSIZE 8192
@ -2356,9 +2368,9 @@ diff -Naur cyrus-imapd-2.3.9/notifyd/notifyd.c cyrus-imapd-2.3.9-autocreate.unco
{
struct sockaddr_un sun_data;
socklen_t sunlen = sizeof(sun_data);
diff -Naur cyrus-imapd-2.3.9/ptclient/Makefile.in cyrus-imapd-2.3.9-autocreate.uncompiled/ptclient/Makefile.in
--- cyrus-imapd-2.3.9/ptclient/Makefile.in 2006-11-30 19:11:24.000000000 +0200
+++ cyrus-imapd-2.3.9-autocreate.uncompiled/ptclient/Makefile.in 2007-08-21 14:59:22.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/ptclient/Makefile.in cyrus-imapd-2.3.11-autocreate.uncompiled/ptclient/Makefile.in
--- cyrus-imapd-2.3.11/ptclient/Makefile.in 2006-11-30 19:11:24.000000000 +0200
+++ cyrus-imapd-2.3.11-autocreate.uncompiled/ptclient/Makefile.in 2007-12-12 13:29:49.000000000 +0200
@@ -57,10 +57,11 @@
AFS_LDFLAGS = @AFS_LDFLAGS@ @COM_ERR_LDFLAGS@
AFS_LIBS = @AFS_LIBS@

View File

@ -1,6 +1,6 @@
diff -Naur cyrus-imapd-2.3.9/README.autosievefolder cyrus-imapd-2.3.9-autosieve.uncompiled/README.autosievefolder
--- cyrus-imapd-2.3.9/README.autosievefolder 1970-01-01 02:00:00.000000000 +0200
+++ cyrus-imapd-2.3.9-autosieve.uncompiled/README.autosievefolder 2007-08-21 16:04:08.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/README.autosievefolder cyrus-imapd-2.3.11-autosieve.uncompiled/README.autosievefolder
--- cyrus-imapd-2.3.11/README.autosievefolder 1970-01-01 02:00:00.000000000 +0200
+++ cyrus-imapd-2.3.11-autosieve.uncompiled/README.autosievefolder 2007-12-12 14:17:18.000000000 +0200
@@ -0,0 +1,42 @@
+Cyrus IMAP autosievefolder patch
+----------------------------------
@ -44,9 +44,9 @@ diff -Naur cyrus-imapd-2.3.9/README.autosievefolder cyrus-imapd-2.3.9-autosieve.
+
+For more information and updates please visit http://email.uoa.gr/projects/cyrus/autosievefolder
+
diff -Naur cyrus-imapd-2.3.9/imap/lmtp_sieve.c cyrus-imapd-2.3.9-autosieve.uncompiled/imap/lmtp_sieve.c
--- cyrus-imapd-2.3.9/imap/lmtp_sieve.c 2007-03-27 22:53:08.000000000 +0300
+++ cyrus-imapd-2.3.9-autosieve.uncompiled/imap/lmtp_sieve.c 2007-08-21 16:04:08.000000000 +0300
diff -Naur cyrus-imapd-2.3.11/imap/lmtp_sieve.c cyrus-imapd-2.3.11-autosieve.uncompiled/imap/lmtp_sieve.c
--- cyrus-imapd-2.3.11/imap/lmtp_sieve.c 2007-09-28 05:27:46.000000000 +0300
+++ cyrus-imapd-2.3.11-autosieve.uncompiled/imap/lmtp_sieve.c 2007-12-12 14:17:18.000000000 +0200
@@ -88,6 +88,9 @@
struct auth_state *authstate;
} script_data_t;
@ -79,7 +79,7 @@ diff -Naur cyrus-imapd-2.3.9/imap/lmtp_sieve.c cyrus-imapd-2.3.9-autosieve.uncom
if (!ret) {
snmp_increment(SIEVE_FILEINTO, 1);
return SIEVE_OK;
@@ -936,3 +952,80 @@
@@ -935,3 +951,80 @@
we'll do normal delivery */
return r;
}
@ -160,10 +160,10 @@ diff -Naur cyrus-imapd-2.3.9/imap/lmtp_sieve.c cyrus-imapd-2.3.9-autosieve.uncom
+ return IMAP_MAILBOX_NONEXISTENT;
+}
+
diff -Naur cyrus-imapd-2.3.9/lib/imapoptions cyrus-imapd-2.3.9-autosieve.uncompiled/lib/imapoptions
--- cyrus-imapd-2.3.9/lib/imapoptions 2007-03-30 21:51:02.000000000 +0300
+++ cyrus-imapd-2.3.9-autosieve.uncompiled/lib/imapoptions 2007-08-21 16:04:08.000000000 +0300
@@ -884,6 +884,15 @@
diff -Naur cyrus-imapd-2.3.11/lib/imapoptions cyrus-imapd-2.3.11-autosieve.uncompiled/lib/imapoptions
--- cyrus-imapd-2.3.11/lib/imapoptions 2007-10-18 21:14:48.000000000 +0300
+++ cyrus-imapd-2.3.11-autosieve.uncompiled/lib/imapoptions 2007-12-12 14:17:18.000000000 +0200
@@ -906,6 +906,15 @@
/* If enabled, lmtpd will look for Sieve scripts in user's home
directories: ~user/.sieve. */

View File

@ -1,81 +0,0 @@
--- cyrus/lib/auth_unix.c 2007/02/13 16:42:49 1.41
+++ cyrus/lib/auth_unix.c 2007/09/17 14:36:40 1.45
@@ -41,7 +41,7 @@
*/
/*
- * $Id: auth_unix.c,v 1.41 2007/02/13 16:42:49 murch Exp $
+ * $Id: auth_unix.c,v 1.45 2007/09/17 14:36:40 murch Exp $
*/
#include <config.h>
@@ -224,6 +224,10 @@ static struct auth_state *mynewstate(con
struct passwd *pwd;
struct group *grp;
char **mem;
+#ifdef HAVE_GETGROUPLIST
+ gid_t gid, *groupids = NULL;
+ int ret, ngroups = 0;
+#endif
identifier = mycanonifyid(identifier, 0);
if (!identifier) return 0;
@@ -239,7 +243,48 @@ static struct auth_state *mynewstate(con
return newstate;
pwd = getpwnam(identifier);
-
+
+#ifdef HAVE_GETGROUPLIST
+ gid = pwd ? pwd->pw_gid : (gid_t) -1;
+
+ /* get number of groups user is member of into ngroups */
+ getgrouplist(identifier, gid, NULL, &ngroups);
+
+ /* get the actual group ids */
+ do {
+ groupids = (gid_t *)xrealloc((gid_t *)groupids,
+ ngroups * sizeof(gid_t));
+
+ newstate->ngroups = ngroups; /* copy of ngroups for comparision */
+ ret = getgrouplist(identifier, gid, groupids, &ngroups);
+ /*
+ * This is tricky. We do this as long as getgrouplist tells us to
+ * realloc _and_ the number of groups changes. It tells us to realloc
+ * also in the case of failure...
+ */
+ } while (ret != -1 && ngroups != newstate->ngroups);
+
+ if (ret == -1) {
+ newstate->ngroups = 0;
+ newstate->group = NULL;
+ goto err;
+ }
+
+ newstate->ngroups = 0;
+ newstate->group = (char **)xmalloc(ngroups * sizeof(char *));
+ while (ngroups--) {
+ if (pwd || groupids[ngroups] != gid) {
+ if ((grp = getgrgid(groupids[ngroups]))) {
+ newstate->ngroups++;
+ newstate->group[newstate->ngroups-1] = xstrdup(grp->gr_name);
+ }
+ }
+ }
+
+err:
+ if (groupids) free(groupids);
+
+#else /* !HAVE_GETGROUPLIST */
setgrent();
while ((grp = getgrent())) {
for (mem = grp->gr_mem; *mem; mem++) {
@@ -254,6 +299,8 @@ static struct auth_state *mynewstate(con
}
}
endgrent();
+#endif /* HAVE_GETGROUPLIST */
+
return newstate;
}

View File

@ -1,282 +0,0 @@
--- cyrus-imapd-2.3.9/imap/tls_prune.c.implicitdecl 2007-09-18 15:47:55.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/tls_prune.c 2007-09-18 15:48:46.000000000 +0200
@@ -49,6 +49,7 @@
#include "exitcodes.h"
#include "global.h"
+#include "util.h"
#include "tls.h"
#include "xmalloc.h"
--- cyrus-imapd-2.3.9/imap/sync_client.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/sync_client.c 2007-09-18 15:39:44.000000000 +0200
@@ -69,6 +69,8 @@
#include "mailbox.h"
#include "quota.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
#include "acl.h"
#include "seen.h"
#include "mboxname.h"
--- cyrus-imapd-2.3.9/imap/protocol.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/protocol.c 2007-09-18 15:39:09.000000000 +0200
@@ -49,6 +49,8 @@
#include "protocol.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
static char *imap_parsemechlist(const char *str, struct protocol_t *prot)
{
--- cyrus-imapd-2.3.9/imap/ipurge.c.implicitdecl 2007-09-18 15:47:55.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/ipurge.c 2007-09-18 15:48:26.000000000 +0200
@@ -61,6 +61,7 @@
/* cyrus includes */
#include "global.h"
+#include "util.h"
#include "sysexits.h"
#include "exitcodes.h"
#include "imap_err.h"
--- cyrus-imapd-2.3.9/imap/cyrdump.c.implicitdecl 2007-09-18 15:47:55.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/cyrdump.c 2007-09-18 15:48:30.000000000 +0200
@@ -54,6 +54,7 @@
#include "assert.h"
#include "exitcodes.h"
#include "global.h"
+#include "util.h"
#include "imapd.h"
#include "imap_err.h"
#include "imapurl.h"
--- cyrus-imapd-2.3.9/imap/fetchnews.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/fetchnews.c 2007-09-18 15:48:50.000000000 +0200
@@ -60,10 +60,13 @@
#include "cyrusdb.h"
#include "exitcodes.h"
#include "global.h"
+#include "util.h"
#include "gmtoff.h"
#include "lock.h"
#include "prot.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
/* global state */
const int config_need_data = 0;
--- cyrus-imapd-2.3.9/imap/sync_server.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/sync_server.c 2007-09-18 15:40:02.000000000 +0200
@@ -94,6 +94,8 @@
#include "util.h"
#include "version.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
#include "sync_support.h"
#include "sync_commit.h"
--- cyrus-imapd-2.3.9/imap/ctl_mboxlist.c.implicitdecl 2007-09-18 15:47:55.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/ctl_mboxlist.c 2007-09-18 15:48:35.000000000 +0200
@@ -77,6 +77,7 @@
#include "exitcodes.h"
#include "imap_err.h"
#include "global.h"
+#include "util.h"
#include "libcyr_cfg.h"
#include "mboxlist.h"
#include "mupdate.h"
--- cyrus-imapd-2.3.9/imap/sync_support.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/sync_support.c 2007-09-18 15:39:55.000000000 +0200
@@ -71,6 +71,8 @@
#include "mailbox.h"
#include "quota.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
#include "acl.h"
#include "seen.h"
#include "mboxname.h"
--- cyrus-imapd-2.3.9/imap/squatter.c.implicitdecl 2007-09-18 15:47:55.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/squatter.c 2007-09-18 15:48:39.000000000 +0200
@@ -84,6 +84,7 @@
#include "assert.h"
#include "mboxlist.h"
#include "global.h"
+#include "util.h"
#include "exitcodes.h"
#include "imap_err.h"
#include "mailbox.h"
--- cyrus-imapd-2.3.9/imap/autosieve.c.implicitdecl 2007-09-18 15:42:01.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/autosieve.c 2007-09-18 15:39:14.000000000 +0200
@@ -19,6 +19,9 @@
#include "global.h"
#include "util.h"
+#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
#include "mailbox.h"
#include "imap_err.h"
#include "sieve_interface.h"
--- cyrus-imapd-2.3.9/imap/arbitron.c.implicitdecl 2007-09-18 15:47:55.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/arbitron.c 2007-09-18 15:48:43.000000000 +0200
@@ -59,6 +59,7 @@
#include "assert.h"
#include "global.h"
+#include "util.h"
#include "exitcodes.h"
#include "hash.h"
#include "imap_err.h"
--- cyrus-imapd-2.3.9/imap/mupdate.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/mupdate.c 2007-09-18 15:39:34.000000000 +0200
@@ -87,6 +87,8 @@
#include "util.h"
#include "version.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
/* Sent to clients that we can't accept a connection for. */
static const char SERVER_UNABLE_STRING[] = "* BYE \"Server Unable\"\r\n";
--- cyrus-imapd-2.3.9/imap/make_md5.c.implicitdecl 2007-09-18 15:47:55.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/make_md5.c 2007-09-18 15:48:54.000000000 +0200
@@ -16,6 +16,7 @@
#include <signal.h>
#include "global.h"
+#include "util.h"
#include "assert.h"
#include "mboxlist.h"
#include "exitcodes.h"
--- cyrus-imapd-2.3.9/imap/sync_commit.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/sync_commit.c 2007-09-18 15:40:08.000000000 +0200
@@ -69,6 +69,8 @@
#include "mailbox.h"
#include "quota.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
#include "acl.h"
#include "seen.h"
#include "mboxname.h"
--- cyrus-imapd-2.3.9/imap/compile_sieve.c.implicitdecl 2007-09-18 15:27:37.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/compile_sieve.c 2007-09-18 15:27:48.000000000 +0200
@@ -20,6 +20,7 @@
#include "global.h"
#include "util.h"
+#include "xmalloc.h"
#include "mailbox.h"
#include "imap_err.h"
#include "sieve_interface.h"
--- cyrus-imapd-2.3.9/timsieved/timsieved.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/timsieved/timsieved.c 2007-09-18 15:40:35.000000000 +0200
@@ -73,6 +73,8 @@
#include "prot.h"
#include "libconfig.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
#include "exitcodes.h"
#include "iptostring.h"
#include "global.h"
--- cyrus-imapd-2.3.9/timsieved/actions.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/timsieved/actions.c 2007-09-18 15:40:25.000000000 +0200
@@ -69,6 +69,8 @@
#include "global.h"
#include "libconfig.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
#include "sieve_interface.h"
#include "codes.h"
--- cyrus-imapd-2.3.9/timsieved/parser.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/timsieved/parser.c 2007-09-18 15:40:41.000000000 +0200
@@ -64,6 +64,8 @@
#include "mboxname.h"
#include "mboxlist.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
#include "prot.h"
#include "tls.h"
#include "lex.h"
--- cyrus-imapd-2.3.9/master/cyrusMasterMIB.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/master/cyrusMasterMIB.c 2007-09-18 15:39:06.000000000 +0200
@@ -52,6 +52,8 @@
#include "master.h"
#include "../imap/version.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
/*
* cyrusMasterMIB_variables_oid:
--- cyrus-imapd-2.3.9/sieve/interp.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/sieve/interp.c 2007-09-18 15:38:40.000000000 +0200
@@ -33,6 +33,8 @@
#include <string.h>
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
#include "sieve_interface.h"
#include "interp.h"
--- cyrus-imapd-2.3.9/sieve/addr.y.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/sieve/addr.y 2007-09-18 15:38:45.000000000 +0200
@@ -37,6 +37,8 @@
#include "addr.h"
#include "script.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
int yyerror(char *msg);
extern int yylex(void);
--- cyrus-imapd-2.3.9/imtest/imtest.c.implicitdecl 2007-09-18 15:36:52.000000000 +0200
+++ cyrus-imapd-2.3.9/imtest/imtest.c 2007-09-18 15:40:14.000000000 +0200
@@ -82,6 +82,8 @@
#include "imparse.h"
#include "iptostring.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
#ifdef HAVE_SSL
#include <openssl/ssl.h>
--- cyrus-imapd-2.3.9/ptclient/ptexpire.c.implicitdecl 2007-09-18 15:47:55.000000000 +0200
+++ cyrus-imapd-2.3.9/ptclient/ptexpire.c 2007-09-18 15:48:57.000000000 +0200
@@ -65,6 +65,7 @@
#include "cyrusdb.h"
#include "exitcodes.h"
#include "global.h"
+#include "util.h"
#include "libconfig.h"
#include "lock.h"
#include "xmalloc.h"
--- cyrus-imapd-2.3.9/ptclient/ldap.c.implicitdecl 2007-09-18 15:49:48.000000000 +0200
+++ cyrus-imapd-2.3.9/ptclient/ldap.c 2007-09-18 15:40:19.000000000 +0200
@@ -61,6 +61,9 @@
#include <sys/un.h>
#include <sys/uio.h>
+/* Functions like ldap_bind() have been deprecated in OpenLDAP 2.3 */
+#define LDAP_DEPRECATED 1
+
#include <ldap.h>
#include <lber.h>
@@ -74,6 +77,8 @@
#include "auth_pts.h"
#include "strhash.h"
#include "xmalloc.h"
+#include "xstrlcpy.h"
+#include "xstrlcat.h"
/* xxx this just uses the UNIX canonicalization semantics, which is
* most likely wrong */

View File

@ -1,76 +0,0 @@
--- cyrus-imapd-2.3.9/imap/compile_sieve.c.myfatal 2007-09-23 16:13:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/compile_sieve.c 2007-09-23 16:54:54.000000000 +0200
@@ -37,7 +37,7 @@
static int is_script_parsable(FILE *stream, char **errstr, sieve_script_t **ret);
-static void fatal(const char *s, int code)
+static void my_fatal(const char *s, int code)
{
printf("Fatal error: %s (%d)\r\n", s, code);
@@ -68,7 +68,7 @@
extern char *optarg;
char sieve_tmpname[MAX_MAILBOX_NAME+1];
- if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE);
+ if (geteuid() == 0) my_fatal("must run as the Cyrus user", EC_USAGE);
while((opt = getopt(argc, argv, "C:i:o:")) != EOF) {
switch (opt) {
@@ -218,7 +218,7 @@
/* to make larry's stupid functions happy :) */
static void foo(void)
{
- fatal("stub function called", 0);
+ my_fatal("stub function called", 0);
}
extern sieve_vacation_t vacation2;/* = {
@@ -234,7 +234,7 @@
void *message_context __attribute__((unused)),
const char **errmsg __attribute__((unused)))
{
- fatal("stub function called", 0);
+ my_fatal("stub function called", 0);
return SIEVE_FAIL;
}
--- cyrus-imapd-2.3.9/imap/autosieve.c.myfatal 2007-09-23 16:13:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/autosieve.c 2007-09-23 16:37:27.000000000 +0200
@@ -35,7 +35,7 @@
static int get_script_dir(char *sieve_script_dir, size_t buflen, char *userid, const char *sieve_dir);
int autoadd_sieve(char *userid, const char *source_script);
-static void fatal(const char *s, int code);
+static void my_fatal(const char *s, int code);
static void foo(void);
static int sieve_notify(void *ac __attribute__((unused)),
void *interp_context __attribute__((unused)),
@@ -441,7 +441,7 @@
return 0;
}
-static void fatal(const char *s, int code)
+static void my_fatal(const char *s, int code)
{
printf("Fatal error: %s (%d)\r\n", s, code);
exit(1);
@@ -450,7 +450,7 @@
/* to make larry's stupid functions happy :) */
static void foo(void)
{
- fatal("stub function called", 0);
+ my_fatal("stub function called", 0);
}
static int sieve_notify(void *ac __attribute__((unused)),
@@ -459,7 +459,7 @@
void *message_context __attribute__((unused)),
const char **errmsg __attribute__((unused)))
{
- fatal("stub function called", 0);
+ my_fatal("stub function called", 0);
return SIEVE_FAIL;
}

View File

@ -1,563 +0,0 @@
--- cyrus-imapd-2.3.9/imap/quota_db.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/quota_db.c 2007-08-14 16:31:48.000000000 +0200
@@ -251,7 +251,7 @@
strlcat(fname, FNAME_QUOTADB, fname_len);
}
- ret = QDB->open(fname, CYRUSDB_CREATE, &qdb);
+ ret = (QDB->open)(fname, CYRUSDB_CREATE, &qdb);
if (ret != 0) {
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
cyrusdb_strerror(ret));
@@ -270,7 +270,7 @@
int r;
if (quota_dbopen) {
- r = QDB->close(qdb);
+ r = (QDB->close)(qdb);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing quotas: %s",
cyrusdb_strerror(r));
--- cyrus-imapd-2.3.9/imap/seen_bigdb.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/seen_bigdb.c 2007-08-14 16:32:03.000000000 +0200
@@ -104,7 +104,7 @@
strcpy(fname, config_dir);
strcat(fname, FNAME_SEENDB);
- r = DB->open(fname, CYRUSDB_CREATE, &bigdb);
+ r = (DB->open)(fname, CYRUSDB_CREATE, &bigdb);
if (r != 0) {
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
cyrusdb_strerror(r));
@@ -385,7 +385,7 @@
int r;
if (seen_inited) {
- r = DB->close(bigdb);
+ r = (DB->close)(bigdb);
if (r != 0) {
syslog(LOG_ERR, "DBERROR: closing seen database: %s",
cyrusdb_strerror(r));
--- cyrus-imapd-2.3.9/imap/mboxkey.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/mboxkey.c 2007-08-14 16:31:01.000000000 +0200
@@ -150,7 +150,7 @@
/* otherwise, close the existing database */
if (mboxkeydb) {
abortcurrent(mboxkeydb);
- r = DB->close(mboxkeydb->db);
+ r = (DB->close)(mboxkeydb->db);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing mboxkeydb: %s",
cyrusdb_strerror(r));
@@ -164,7 +164,7 @@
/* open the mboxkeydb corresponding to user */
fname = mboxkey_getpath(user);
- r = DB->open(fname, (flags & MBOXKEY_CREATE) ? CYRUSDB_CREATE : 0,
+ r = (DB->open)(fname, (flags & MBOXKEY_CREATE) ? CYRUSDB_CREATE : 0,
&mboxkeydb->db);
if (r != 0) {
int level = (flags & MBOXKEY_CREATE) ? LOG_ERR : LOG_DEBUG;
@@ -325,7 +325,7 @@
/* free the old database hanging around */
abortcurrent(lastmboxkey);
- r = DB->close(lastmboxkey->db);
+ r = (DB->close)(lastmboxkey->db);
if (r != CYRUSDB_OK) {
syslog(LOG_ERR, "DBERROR: error closing lastmboxkey: %s",
cyrusdb_strerror(r));
@@ -409,7 +409,7 @@
if (lastmboxkey) {
abortcurrent(lastmboxkey);
- r = DB->close(lastmboxkey->db);
+ r = (DB->close)(lastmboxkey->db);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing lastmboxkey: %s",
cyrusdb_strerror(r));
@@ -482,10 +482,10 @@
struct mboxkey_merge_rock rock;
/* xxx does this need to be CYRUSDB_CREATE? */
- r = DB->open(tmpfile, CYRUSDB_CREATE, &tmp);
+ r = (DB->open)(tmpfile, CYRUSDB_CREATE, &tmp);
if(r) goto done;
- r = DB->open(tgtfile, CYRUSDB_CREATE, &tgt);
+ r = (DB->open)(tgtfile, CYRUSDB_CREATE, &tgt);
if(r) goto done;
rock.db = tgt;
@@ -498,8 +498,8 @@
done:
- if(tgt) DB->close(tgt);
- if(tmp) DB->close(tmp);
+ if(tgt) (DB->close)(tgt);
+ if(tmp) (DB->close)(tmp);
return r;
}
--- cyrus-imapd-2.3.9/imap/tls.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/tls.c 2007-08-14 16:33:15.000000000 +0200
@@ -650,7 +650,7 @@
strlcpy(dbdir, config_dir, sizeof(dbdir));
strlcat(dbdir, FNAME_TLSSESSIONS, sizeof(dbdir));
- r = DB->open(dbdir, CYRUSDB_CREATE, &sessdb);
+ r = (DB->open)(dbdir, CYRUSDB_CREATE, &sessdb);
if (r != 0) {
syslog(LOG_ERR, "DBERROR: opening %s: %s",
dbdir, cyrusdb_strerror(ret));
@@ -931,7 +931,7 @@
int r;
if (tls_serverengine && sess_dbopen) {
- r = DB->close(sessdb);
+ r = (DB->close)(sessdb);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing tlsdb: %s",
cyrusdb_strerror(r));
@@ -1008,7 +1008,7 @@
strlcpy(dbdir, config_dir, sizeof(dbdir));
strlcat(dbdir, FNAME_TLSSESSIONS, sizeof(dbdir));
- ret = DB->open(dbdir, CYRUSDB_CREATE, &sessdb);
+ ret = (DB->open)(dbdir, CYRUSDB_CREATE, &sessdb);
if (ret != CYRUSDB_OK) {
syslog(LOG_ERR, "DBERROR: opening %s: %s",
dbdir, cyrusdb_strerror(ret));
@@ -1019,7 +1019,7 @@
sess_dbopen = 1;
prock.count = prock.deletions = 0;
DB->foreach(sessdb, "", 0, &prune_p, &prune_cb, &prock, NULL);
- DB->close(sessdb);
+ (DB->close)(sessdb);
sessdb = NULL;
sess_dbopen = 0;
--- cyrus-imapd-2.3.9/imap/duplicate.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/duplicate.c 2007-08-14 16:30:03.000000000 +0200
@@ -105,7 +105,7 @@
strcat(fname, FNAME_DELIVERDB);
}
- r = DB->open(fname, CYRUSDB_CREATE, &dupdb);
+ r = (DB->open)(fname, CYRUSDB_CREATE, &dupdb);
if (r != 0)
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
cyrusdb_strerror(r));
@@ -395,7 +395,7 @@
int r = 0;
if (duplicate_dbopen) {
- r = DB->close(dupdb);
+ r = (DB->close)(dupdb);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing deliverdb: %s",
cyrusdb_strerror(r));
--- cyrus-imapd-2.3.9/imap/cvt_cyrusdb.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/cvt_cyrusdb.c 2007-08-14 16:29:32.000000000 +0200
@@ -157,10 +157,10 @@
printf("Converting from %s (%s) to %s (%s)\n", old_db, DB_OLD->name,
new_db, DB_NEW->name);
- r = DB_OLD->open(old_db, 0, &odb);
+ r = (DB_OLD->open)(old_db, 0, &odb);
if(r != CYRUSDB_OK)
fatal("can't open old database", EC_TEMPFAIL);
- r = DB_NEW->open(new_db, CYRUSDB_CREATE, &ndb);
+ r = (DB_NEW->open)(new_db, CYRUSDB_CREATE, &ndb);
if(r != CYRUSDB_OK)
fatal("can't open new database", EC_TEMPFAIL);
@@ -173,8 +173,8 @@
fprintf(stderr, "Warning: apparently empty database converted.\n");
- DB_OLD->close(odb);
- DB_NEW->close(ndb);
+ (DB_OLD->close)(odb);
+ (DB_NEW->close)(ndb);
cyrus_done();
--- cyrus-imapd-2.3.9/imap/annotate.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/annotate.c 2007-08-14 16:28:42.000000000 +0200
@@ -253,7 +253,7 @@
strcat(fname, FNAME_ANNOTATIONS);
}
- ret = DB->open(fname, CYRUSDB_CREATE, &anndb);
+ ret = (DB->open)(fname, CYRUSDB_CREATE, &anndb);
if (ret != 0) {
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
cyrusdb_strerror(ret));
@@ -270,7 +270,7 @@
int r;
if (annotate_dbopen) {
- r = DB->close(anndb);
+ r = (DB->close)(anndb);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing annotations: %s",
cyrusdb_strerror(r));
--- cyrus-imapd-2.3.9/imap/arbitron.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/arbitron.c 2007-08-14 16:29:11.000000000 +0200
@@ -419,14 +419,14 @@
int r;
struct db *tmp = NULL;
- r = DB->open(path, 0, &tmp);
+ r = (DB->open)(path, 0, &tmp);
if(r) goto done;
DB->foreach(tmp, "", 0, process_user_p, process_user_cb,
(void *) user, NULL);
done:
- if(tmp) DB->close(tmp);
+ if(tmp) (DB->close)(tmp);
}
static int process_subs_cb(void *rockp __attribute__((unused)),
@@ -475,14 +475,14 @@
int r;
struct db *tmp = NULL;
- r = SUBDB->open(path, 0, &tmp);
+ r = (SUBDB->open)(path, 0, &tmp);
if(r) goto done;
SUBDB->foreach(tmp, "", 0, process_subs_p, process_subs_cb,
(void *) user, NULL);
done:
- if(tmp) SUBDB->close(tmp);
+ if(tmp) (SUBDB->close)(tmp);
}
void report_users(struct user_list *u)
--- cyrus-imapd-2.3.9/imap/mboxlist.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/mboxlist.c 2007-08-14 16:31:28.000000000 +0200
@@ -2746,7 +2746,7 @@
flags |= CYRUSDB_MBOXSORT;
}
- ret = DB->open(fname, flags, &mbdb);
+ ret = (DB->open)(fname, flags, &mbdb);
if (ret != 0) {
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
cyrusdb_strerror(ret));
@@ -2765,7 +2765,7 @@
int r;
if (mboxlist_dbopen) {
- r = DB->close(mbdb);
+ r = (DB->close)(mbdb);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing mailboxes: %s",
cyrusdb_strerror(r));
@@ -2825,7 +2825,7 @@
flags |= CYRUSDB_MBOXSORT;
}
- r = SUBDB->open(subsfname, flags, ret);
+ r = (SUBDB->open)(subsfname, flags, ret);
if (r != CYRUSDB_OK) {
r = IMAP_IOERROR;
}
@@ -2839,7 +2839,7 @@
*/
static void mboxlist_closesubs(struct db *sub)
{
- SUBDB->close(sub);
+ (SUBDB->close)(sub);
}
/*
--- cyrus-imapd-2.3.9/imap/cyr_dbtool.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/cyr_dbtool.c 2007-08-14 16:29:52.000000000 +0200
@@ -203,7 +203,7 @@
cyrus_init(alt_config, "cyr_dbtool", 0);
- r = DB_OLD->open(old_db, db_flags, &odb);
+ r = (DB_OLD->open)(old_db, db_flags, &odb);
if(r != CYRUSDB_OK)
fatal("can't open database", EC_TEMPFAIL);
@@ -250,7 +250,7 @@
printf("Unknown action %s\n", action);
}
- DB_OLD->close(odb);
+ (DB_OLD->close)(odb);
cyrus_done();
--- cyrus-imapd-2.3.9/imap/seen_db.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/seen_db.c 2007-08-14 16:32:46.000000000 +0200
@@ -157,7 +157,7 @@
/* otherwise, close the existing database */
if (seendb) {
abortcurrent(seendb);
- r = DB->close(seendb->db);
+ r = (DB->close)(seendb->db);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing seendb: %s",
cyrusdb_strerror(r));
@@ -170,7 +170,7 @@
/* open the seendb corresponding to user */
fname = seen_getpath(user);
- r = DB->open(fname, (flags & SEEN_CREATE) ? CYRUSDB_CREATE : 0,
+ r = (DB->open)(fname, (flags & SEEN_CREATE) ? CYRUSDB_CREATE : 0,
&seendb->db);
if (r != 0) {
int level = (flags & SEEN_CREATE) ? LOG_ERR : LOG_DEBUG;
@@ -416,7 +416,7 @@
/* free the old database hanging around */
abortcurrent(lastseen);
- r = DB->close(lastseen->db);
+ r = (DB->close)(lastseen->db);
if (r != CYRUSDB_OK) {
syslog(LOG_ERR, "DBERROR: error closing lastseen: %s",
cyrusdb_strerror(r));
@@ -555,7 +555,7 @@
if (lastseen) {
abortcurrent(lastseen);
- r = DB->close(lastseen->db);
+ r = (DB->close)(lastseen->db);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing lastseen: %s",
cyrusdb_strerror(r));
@@ -653,10 +653,10 @@
struct seen_merge_rock rock;
/* xxx does this need to be CYRUSDB_CREATE? */
- r = DB->open(tmpfile, CYRUSDB_CREATE, &tmp);
+ r = (DB->open)(tmpfile, CYRUSDB_CREATE, &tmp);
if(r) goto done;
- r = DB->open(tgtfile, CYRUSDB_CREATE, &tgt);
+ r = (DB->open)(tgtfile, CYRUSDB_CREATE, &tgt);
if(r) goto done;
rock.db = tgt;
@@ -669,8 +669,8 @@
done:
- if(tgt) DB->close(tgt);
- if(tmp) DB->close(tmp);
+ if(tgt) (DB->close)(tgt);
+ if(tmp) (DB->close)(tmp);
return r;
}
--- cyrus-imapd-2.3.9/imap/fetchnews.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/imap/fetchnews.c 2007-08-14 16:30:14.000000000 +0200
@@ -94,7 +94,7 @@
strcat(fname, FNAME_NEWSRCDB);
}
- r = DB->open(fname, CYRUSDB_CREATE, &newsrc_db);
+ r = (DB->open)(fname, CYRUSDB_CREATE, &newsrc_db);
if (r != 0)
syslog(LOG_ERR, "DBERROR: opening %s: %s", fname,
cyrusdb_strerror(r));
@@ -112,7 +112,7 @@
int r = 0;
if (newsrc_dbopen) {
- r = DB->close(newsrc_db);
+ r = (DB->close)(newsrc_db);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing fetchnews.db: %s",
cyrusdb_strerror(r));
--- cyrus-imapd-2.3.9/lib/auth_pts.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/lib/auth_pts.c 2007-08-14 16:33:28.000000000 +0200
@@ -359,7 +359,7 @@
strcpy(fnamebuf, config_dir);
strcat(fnamebuf, PTS_DBFIL);
- r = the_ptscache_db->open(fnamebuf, CYRUSDB_CREATE, &ptdb);
+ r = (the_ptscache_db->open)(fnamebuf, CYRUSDB_CREATE, &ptdb);
if (r != 0) {
syslog(LOG_ERR, "DBERROR: opening %s: %s", fnamebuf,
cyrusdb_strerror(ret));
@@ -501,7 +501,7 @@
}
/* close and unlock the database */
- the_ptscache_db->close(ptdb);
+ (the_ptscache_db->close)(ptdb);
return rc;
}
--- cyrus-imapd-2.3.9/lib/test/rnddb.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/lib/test/rnddb.c 2007-08-14 16:34:50.000000000 +0200
@@ -133,7 +133,7 @@
srand(atoi(argv[2]));
}
- TRY(DB->open("scratch", &db));
+ TRY((DB->open)("scratch", &db));
if (DB->consistent) {
TRY(DB->consistent(db));
@@ -291,7 +291,7 @@
#endif
}
- TRY(DB->close(db));
+ TRY((DB->close)(db));
TRY(DB->done());
do_report();
--- cyrus-imapd-2.3.9/lib/test/cyrusdb.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/lib/test/cyrusdb.c 2007-08-14 16:34:37.000000000 +0200
@@ -70,15 +70,15 @@
char *fname = buf + 5;
if (db) { /* close it */
- TRY(DB->close(db));
+ TRY((DB->close)(db));
}
- TRY(DB->open(fname, 1, &db));
+ TRY((DB->open)(fname, 1, &db));
printf("ok\n");
} else if (!db) {
TRY(db == NULL);
} else if (!strncasecmp(buf, "close", 5)) {
- TRY(DB->close(db));
+ TRY((DB->close)(db));
db = NULL;
printf("ok\n");
} else if (!strncasecmp(buf, "put ", 4)) {
--- cyrus-imapd-2.3.9/lib/cyrusdb_berkeley.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/lib/cyrusdb_berkeley.c 2007-08-14 16:34:19.000000000 +0200
@@ -212,7 +212,7 @@
r = dbenv->set_cachesize(dbenv, 0, opt * 1024, 0);
if (r) {
dbenv->err(dbenv, r, "set_cachesize");
- dbenv->close(dbenv, 0);
+ (dbenv->close)(dbenv, 0);
syslog(LOG_ERR, "DBERROR: set_cachesize(): %s", db_strerror(r));
return CYRUSDB_IOERROR;
}
@@ -223,9 +223,9 @@
flags |= DB_INIT_LOCK | DB_INIT_MPOOL |
DB_INIT_LOG | DB_INIT_TXN;
#if (DB_VERSION_MAJOR > 3) || ((DB_VERSION_MAJOR == 3) && (DB_VERSION_MINOR > 0))
- r = dbenv->open(dbenv, dbdir, flags, 0644);
+ r = (dbenv->open)(dbenv, dbdir, flags, 0644);
#else
- r = dbenv->open(dbenv, dbdir, NULL, flags, 0644);
+ r = (dbenv->open)(dbenv, dbdir, NULL, flags, 0644);
#endif
if (r) {
if (do_retry && (r == ENOENT)) {
@@ -264,7 +264,7 @@
if (--dbinit) return 0;
- r = dbenv->close(dbenv, 0);
+ r = (dbenv->close)(dbenv, 0);
dbinit = 0;
if (r) {
syslog(LOG_ERR, "DBERROR: error exiting application: %s",
@@ -412,15 +412,15 @@
if (flags & CYRUSDB_MBOXSORT) db->set_bt_compare(db, mbox_compar);
#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
- r = db->open(db, NULL, fname, NULL, type, dbflags | DB_AUTO_COMMIT, 0664);
+ r = (db->open)(db, NULL, fname, NULL, type, dbflags | DB_AUTO_COMMIT, 0664);
#else
- r = db->open(db, fname, NULL, type, dbflags, 0664);
+ r = (db->open)(db, fname, NULL, type, dbflags, 0664);
#endif
if (r != 0) {
int level = (flags & CYRUSDB_CREATE) ? LOG_ERR : LOG_DEBUG;
syslog(level, "DBERROR: opening %s: %s", fname, db_strerror(r));
- r = db->close(db, DB_NOSYNC);
+ r = (db->close)(db, DB_NOSYNC);
if (r != 0) {
syslog(level, "DBERROR: closing %s: %s", fname, db_strerror(r));
}
@@ -450,7 +450,7 @@
assert(dbinit && db);
/* since we're using txns, we can supply DB_NOSYNC */
- r = a->close(a, DB_NOSYNC);
+ r = (a->close)(a, DB_NOSYNC);
if (r != 0) {
syslog(LOG_ERR, "DBERROR: error closing: %s", db_strerror(r));
r = CYRUSDB_IOERROR;
--- cyrus-imapd-2.3.9/ptclient/ptloader.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/ptclient/ptloader.c 2007-08-14 16:35:25.000000000 +0200
@@ -167,7 +167,7 @@
strcpy(fnamebuf, config_dir);
strcat(fnamebuf, PTS_DBFIL);
- r = DB->open(fnamebuf, CYRUSDB_CREATE, &ptsdb);
+ r = (DB->open)(fnamebuf, CYRUSDB_CREATE, &ptsdb);
if (r != 0) {
syslog(LOG_ERR, "DBERROR: opening %s: %s", fnamebuf,
cyrusdb_strerror(ret));
@@ -184,7 +184,7 @@
{
int r;
- r = DB->close(ptsdb);
+ r = (DB->close)(ptsdb);
if (r) {
syslog(LOG_ERR, "DBERROR: error closing ptsdb: %s",
cyrusdb_strerror(r));
--- cyrus-imapd-2.3.9/ptclient/ptdump.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/ptclient/ptdump.c 2007-08-14 16:35:02.000000000 +0200
@@ -100,7 +100,7 @@
/* open database */
strcpy(fnamebuf, config_dir);
strcat(fnamebuf, PTS_DBFIL);
- r = config_ptscache_db->open(fnamebuf, CYRUSDB_CREATE, &ptdb);
+ r = (config_ptscache_db->open)(fnamebuf, CYRUSDB_CREATE, &ptdb);
if(r != CYRUSDB_OK) {
fprintf(stderr,"error opening %s (%s)", fnamebuf,
cyrusdb_strerror(r));
@@ -110,7 +110,7 @@
/* iterate through db, wiping expired entries */
config_ptscache_db->foreach(ptdb, "", 0, NULL, dump_cb, ptdb, NULL);
- config_ptscache_db->close(ptdb);
+ (config_ptscache_db->close)(ptdb);
cyrus_done();
--- cyrus-imapd-2.3.9/ptclient/ptexpire.c.openmacro 2007-08-14 16:21:29.000000000 +0200
+++ cyrus-imapd-2.3.9/ptclient/ptexpire.c 2007-08-14 16:35:14.000000000 +0200
@@ -148,7 +148,7 @@
/* open database */
strcpy(fnamebuf, config_dir);
strcat(fnamebuf, PTS_DBFIL);
- r = config_ptscache_db->open(fnamebuf, CYRUSDB_CREATE, &ptdb);
+ r = (config_ptscache_db->open)(fnamebuf, CYRUSDB_CREATE, &ptdb);
if(r != CYRUSDB_OK) {
syslog(LOG_ERR, "error opening %s (%s)", fnamebuf,
cyrusdb_strerror(r));
@@ -158,7 +158,7 @@
/* iterate through db, wiping expired entries */
config_ptscache_db->foreach(ptdb, "", 0, expire_p, expire_cb, ptdb, NULL);
- config_ptscache_db->close(ptdb);
+ (config_ptscache_db->close)(ptdb);
cyrus_done();

View File

@ -1,7 +1,7 @@
%define upstream_ver 2.3.9
%define upstream_ver 2.3.11
Name: cyrus-imapd
Version: 2.3.9
Release: 12%{?dist}
Version: 2.3.11
Release: 1%{?dist}
# ********************** BUILD TIME OPTIONS START **********************
@ -130,9 +130,9 @@ Source29: cyrus-imapd-sendmail-8.12.9-cyrusv2.m4
Source30: cyrus-imapd-README.contrib
Source33: cyrus-imapd-README.skiplist_recovery
Patch0: cyrus-imapd-2.2.12-no_transfig.patch
Patch1: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.9/cyrus-imapd-2.3.9-autocreate-0.10-0.diff
Patch2: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.9/cyrus-imapd-2.3.9-autosieve-0.6.0.diff
Patch3: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.9/cyrus-imapd-2.3.9-rmquota+deletemailbox-0.2-1.diff
Patch1: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.9/cyrus-imapd-2.3.11-autocreate-0.10-0.diff
Patch2: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.9/cyrus-imapd-2.3.11-autosieve-0.6.0.diff
#Patch3: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.9/cyrus-imapd-2.3.9-rmquota+deletemailbox-0.2-1.diff
Patch4: http://servercc.oakton.edu/~jwade/cyrus/cyrus-imapd-2.1.3/cyrus-imapd-2.1.3-flock.patch
Patch5: cyrus-imapd-2.2.12-munge8bit.patch
Patch6: cyrus-imapd-2.1.16-getrlimit.patch
@ -147,13 +147,10 @@ Patch15: cyrus-imapd-2.3.1-make_md5_defaults.patch
Patch16: cyrus-imapd-2.3.7-db4.5.patch
Patch17: cyrus-imapd-2.3.7-makeinstallfix.patch
Patch18: cyrus-imapd-2.3.7-krb4.patch
Patch19: cyrus-imapd-2.3.9-implicitdecl.patch
Patch20: cyrus-imapd-2.3.9-myfatal.patch
# Patches >= 100 are / will be fixed in CVS
Patch100: cyrus-imapd-2.3.1-make_md5.patch
Patch101: cyrus-imapd-2.3.1-backend_sigsegv.patch
Patch102: cyrus-imapd-2.3.1-replication_policycheck.patch
Patch103: cyrus-imapd-2.3.9-getgrouplist.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: autoconf >= 2.59
BuildRequires: cyrus-sasl-devel >= 2.1.15-1, perl, perl-devel, tcp_wrappers
@ -239,7 +236,7 @@ one running the server.
%if %{AUTOCREATE}
%patch1 -p1 -b .autocreate
%patch2 -p1 -b .autosieve
%patch3 -p1 -b .rmquota
#%patch3 -p1 -b .rmquota
%endif
%patch4 -p1 -b .flock
# superseded by upstream munge8bit support
@ -259,9 +256,6 @@ one running the server.
#%patch16 -p1 -b .db4.5
#%patch17 -p1 -b .makeinstallfix
%patch18 -p1 -b .krb4
%patch19 -p1 -b .implicitdecl
%patch20 -p1 -b .myfatal
%patch103 -p1 -b .getgrouplist
# fixed upstream
#%patch100 -p1 -b .make_md5
# fixed upstream
@ -706,6 +700,7 @@ fi
%attr(0755,root,root) %{_cyrexecdir}/cvt_cyrusdb
%attr(0755,root,root) %{_cyrexecdir}/cyr_dbtool
%attr(0755,root,root) %{_cyrexecdir}/cyr_expire
%attr(0755,root,root) %{_cyrexecdir}/cyr_synclog
%attr(0755,root,root) %{_cyrexecdir}/cyrdump
%attr(0755,root,root) %{_cyrexecdir}/cyrus-master
%attr(0755,root,root) %{_cyrexecdir}/deliver
@ -715,6 +710,7 @@ fi
%attr(0755,root,root) %{_cyrexecdir}/ipurge
%attr(0755,root,root) %{_cyrexecdir}/lmtpd
%attr(0755,root,root) %{_cyrexecdir}/lmtpproxyd
%attr(0755,root,root) %{_cyrexecdir}/make_sha1
%attr(0755,root,root) %{_cyrexecdir}/masssievec
%attr(0755,root,root) %{_cyrexecdir}/mbexamine
%attr(0755,root,root) %{_cyrexecdir}/mbpath
@ -808,6 +804,10 @@ fi
%{_mandir}/man1/*
%changelog
* Tue Mar 25 2008 Tomas Janousek <tjanouse@redhat.com> - 2.3.11-1
- update to latest upstream
- (temporarily) dropped the rmquota+deletemailbox patch (doesn't apply)
* Wed Mar 19 2008 Rex Dieter <rdieter@fedoraproject.org> - 2.3.9-12
- cyrus-imapd conflicts with uw-imap (#222506)