Projects
Kolab:Winterfell
cyrus-imapd
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
cyrus-imapd.spec
Changed
@@ -21,7 +21,7 @@ %global _cyrexecdir %{_exec_prefix}/lib/%{_name} %global real_version 2.5.7 -#%%global snapshot_version 7 +%%global snapshot_version 8 %global dot_snapshot_version %{?snapshot_version:.%{snapshot_version}} ## @@ -748,6 +748,9 @@ %{_libdir}/*.la %changelog +* Thu Mar 10 2016 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 2.5.7.8-1 +- Check in 8 revisions ahead of upstream 2.5.7 release + * Wed Dec 16 2015 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 2.5.7-1 - Upstream release 2.5.7
View file
cyrus-imapd-2.5.7.tar.gz/configure.ac -> cyrus-imapd-2.5.7.8.tar.gz/configure.ac
Changed
@@ -89,14 +89,19 @@ AM_MAINTAINER_MODE +dnl Coverage (disabled by default) +COV_CFLAGS= +COV_LDFLAGS= + AC_ARG_ENABLE(coverage, - [AS_HELP_STRING([--enable-coverage],[enable C test coverage])], - [COV_CFLAGS="--coverage" - COV_LDFLAGS="--coverage" - ],[ - COV_CFLAGS= - COV_LDFLAGS= - ]) + AS_HELP_STRING([--enable-coverage],[enable C test coverage]) +) + +AS_IF([test "x$enable_coverage" = "xyes"], [ + COV_CFLAGS="--coverage" + COV_LDFLAGS="--coverage" +]) + AC_SUBST(COV_CFLAGS) AC_SUBST(COV_LDFLAGS)
View file
cyrus-imapd-2.5.7.tar.gz/imap/annotate.c -> cyrus-imapd-2.5.7.8.tar.gz/imap/annotate.c
Changed
@@ -2115,16 +2115,25 @@ int attribcount; /* - * TODO: this is bogus. The * and % wildcard characters applied - * to attributes in the early drafts of the ANNOTATEMORE - * extension, but not in later drafts where those characters are - * actually illegal in attribute names. + * Ensure this function can be called with '/private' and '/shared' as + * is used in the RFC, and 'value.priv' and 'value.shared' as + * implemented in the RFC's drafts -- without requiring changes to + * /etc/imapd.annotations.conf. */ - g = glob_init(s, GLOB_HIERARCHY); - + if (!strncmp(s, "/private", 8)) { + g = glob_init("value.priv", GLOB_HIERARCHY); + } + else if (!strncmp(s, "/shared", 7)) { + g = glob_init("value.shared", GLOB_HIERARCHY); + } + else { + g = glob_init(s, GLOB_HIERARCHY); + } + for (attribcount = 0; annotation_attributes[attribcount].name; attribcount++) { + if (GLOB_TEST(g, annotation_attributes[attribcount].name) != -1) { if (annotation_attributes[attribcount].entry & ATTRIB_DEPRECATED) { if (strcmp(s, "*")) @@ -2136,7 +2145,7 @@ state->attribs |= annotation_attributes[attribcount].entry; } } - + glob_free(&g); }
View file
cyrus-imapd-2.5.7.tar.gz/imap/ctl_cyrusdb.c -> cyrus-imapd-2.5.7.8.tar.gz/imap/ctl_cyrusdb.c
Changed
@@ -196,7 +196,30 @@ static const char *dbfname(struct cyrusdb *db) { static char buf[MAX_MAILBOX_PATH]; - snprintf(buf, MAX_MAILBOX_PATH, "%s%s", config_dir, db->name); + const char *fname = NULL; + + /* find absolute path to db files in configuration */ + if (!strcmp(db->name, FNAME_MBOXLIST)) + fname = config_getstring(IMAPOPT_MBOXLIST_DB_PATH); + else if (!strcmp(db->name, FNAME_QUOTADB)) + fname = config_getstring(IMAPOPT_QUOTA_DB_PATH); + else if (!strcmp(db->name, FNAME_GLOBALANNOTATIONS)) + fname = config_getstring(IMAPOPT_ANNOTATION_DB_PATH); + else if (!strcmp(db->name, FNAME_DELIVERDB)) + fname = config_getstring(IMAPOPT_DUPLICATE_DB_PATH); + else if (!strcmp(db->name, FNAME_TLSSESSIONS)) + fname = config_getstring(IMAPOPT_TLSCACHE_DB_PATH); + else if (!strcmp(db->name, FNAME_PTSDB)) + fname = config_getstring(IMAPOPT_PTSCACHE_DB_PATH); + else if (!strcmp(db->name, FNAME_STATUSCACHEDB)) + fname = config_getstring(IMAPOPT_STATUSCACHE_DB_PATH); + + /* use default if no special path was found */ + if (!fname) + snprintf(buf, MAX_MAILBOX_PATH, "%s%s", config_dir, db->name); + else + snprintf(buf, MAX_MAILBOX_PATH, "%s", fname); + return buf; }
View file
cyrus-imapd-2.5.7.tar.gz/imap/cyr_dbtool.c -> cyrus-imapd-2.5.7.8.tar.gz/imap/cyr_dbtool.c
Changed
@@ -248,11 +248,14 @@ struct txn *tid = NULL; struct txn **tidp = NULL; - while ((opt = getopt(argc, argv, "C:ntT")) != EOF) { + while ((opt = getopt(argc, argv, "C:MntT")) != EOF) { switch (opt) { case 'C': /* alt config file */ alt_config = optarg; break; + case 'M': /* use "improved_mboxlist_sort" */ + db_flags |= CYRUSDB_MBOXSORT; + break; case 'n': /* create new */ db_flags |= CYRUSDB_CREATE; break;
View file
cyrus-imapd-2.5.7.tar.gz/imap/imap_proxy.c -> cyrus-imapd-2.5.7.8.tar.gz/imap/imap_proxy.c
Changed
@@ -93,6 +93,7 @@ { "IDLE", CAPA_IDLE }, { "MUPDATE", CAPA_MUPDATE }, { "MULTIAPPEND", CAPA_MULTIAPPEND }, + { "METADATA", CAPA_METADATA }, { "RIGHTS=kxte", CAPA_ACLRIGHTS }, { "LIST-EXTENDED", CAPA_LISTEXTENDED }, { "SASL-IR", CAPA_SASL_IR }, @@ -1248,7 +1249,9 @@ const strarray_t *attribute_pat) { struct backend *be; - int i; + int x, y; + int use_metadata = 0; + char mytag[128]; assert(server && mbox_pat && entry_pat && attribute_pat); @@ -1256,17 +1259,60 @@ be = proxy_findserver(server, &imap_protocol, proxy_userid, &backend_cached, &backend_current, &backend_inbox, imapd_in); + if (!be) return IMAP_SERVER_UNAVAILABLE; + // See if we would want to use METADATA at all, by testing the 'attribute + // pattern' to be either the draft ANNOTATEMORE or the METADATA RFC. + for (x = 0 ; x < attribute_pat->count ; x++) { + if (!strncmp(attribute_pat->data[x], "/shared", 7)) { + use_metadata = 1; + } + + else if (!strncmp(attribute_pat->data[x], "/private", 8)) { + use_metadata = 1; + } + } + /* Send command to remote */ proxy_gentag(mytag, sizeof(mytag)); - prot_printf(be->out, "%s GETANNOTATION \"%s\" (", mytag, mbox_pat); - for (i = 0 ; i < entry_pat->count ; i++) { - prot_printf(be->out, "%s\"%s\"", i ? " " : "", entry_pat->data[i]); + + if (!CAPA(be, CAPA_METADATA) && use_metadata) { + syslog( + LOG_WARNING, + "METADATA requested, but '%s' does not have the capability" + ); + } + + if (CAPA(be, CAPA_METADATA) && use_metadata) { + prot_printf(be->out, "%s GETMETADATA (DEPTH infinity) ", mytag); + prot_printf(be->out, "\"%s\" (", mbox_pat); + + for (x = 0 ; x < attribute_pat->count ; x++) { + for (y = 0 ; y < entry_pat->count ; y++) { + prot_printf( + be->out, + "%s\"%s%s\"", + (x || y) ? " ": "", + attribute_pat->data[x], + entry_pat->data[y] + ); + } + } } - prot_printf(be->out, ") ("); - for (i = 0 ; i < attribute_pat->count ; i++) { - prot_printf(be->out, "%s\"%s\"", i ? " " : "", attribute_pat->data[i]); + + else { + prot_printf(be->out, "%s GETANNOTATION \"%s\" (", mytag, mbox_pat); + + for (y = 0 ; y < entry_pat->count ; y++) { + prot_printf(be->out, "%s\"%s\"", y ? " " : "", entry_pat->data[y]); + } + + prot_printf(be->out, ") ("); + + for (x = 0 ; x < attribute_pat->count ; x++) { + prot_printf(be->out, "%s\"%s\"", x ? " " : "", attribute_pat->data[x]); + } } prot_printf(be->out, ")\r\n"); prot_flush(be->out); @@ -1369,22 +1415,25 @@ if (be) { uint64_t server_available = 0; uint64_t server_total = 0; + const char *annot = + (part_list->mode == PART_SELECT_MODE_FREESPACE_MOST) ? + "freespace/total" : "freespace/percent/most"; + struct buf cmd = BUF_INITIALIZER; int c; /* fetch annotation from remote */ proxy_gentag(mytag, sizeof(mytag)); - if (part_list->mode == PART_SELECT_MODE_FREESPACE_MOST) { - prot_printf(be->out, - "%s GETANNOTATION \"\" " - "\"/vendor/cmu/cyrus-imapd/freespace/total\" " - "\"value.shared\"\r\n", mytag); + + if (CAPA(be, CAPA_METADATA)) { + buf_printf(&cmd, "METADATA \"\" (\"/shared/vendor/cmu/cyrus-imapd/%s\"", + annot); } else { - prot_printf(be->out, - "%s GETANNOTATION \"\" " - "\"/vendor/cmu/cyrus-imapd/freespace/percent/most\" " - "\"value.shared\"\r\n", mytag); + buf_printf(&cmd, "ANNOTATION \"\" \"/vendor/cmu/cyrus-imapd/%s\" " + "(\"value.shared\"", annot); } + + prot_printf(be->out, "%s GET%s)\r\n", mytag, buf_cstring(&cmd)); prot_flush(be->out); for (/* each annotation response */;;) { @@ -1394,17 +1443,8 @@ c = prot_getc(be->in); if (c != ' ') { /* protocol error */ c = EOF; break; } - if (part_list->mode == PART_SELECT_MODE_FREESPACE_MOST) { - c = chomp(be->in, - "ANNOTATION \"\" " - "\"/vendor/cmu/cyrus-imapd/freespace/total\" " - "(\"value.shared\" "); - } else { - c = chomp(be->in, - "ANNOTATION \"\" " - "\"/vendor/cmu/cyrus-imapd/freespace/percent/most\" " - "(\"value.shared\" "); - } + c = chomp(be->in, buf_cstring(&cmd)); + if (c == ' ') c = prot_getc(be->in); if ((c == EOF) || (c != '\"')) { /* we don't care about this response */ eatline(be->in, c); @@ -1420,6 +1460,7 @@ if (c != '\"') { c = EOF; break; } eatline(be->in, c); /* we don't care about the rest of the line */ } + buf_free(&cmd); if (c != EOF) { prot_ungetc(c, be->in);
View file
cyrus-imapd-2.5.7.tar.gz/imap/imap_proxy.h -> cyrus-imapd-2.5.7.8.tar.gz/imap/imap_proxy.h
Changed
@@ -62,7 +62,8 @@ CAPA_MULTIAPPEND = (1 << 5), CAPA_ACLRIGHTS = (1 << 6), CAPA_LISTEXTENDED = (1 << 7), - CAPA_SASL_IR = (1 << 8) + CAPA_SASL_IR = (1 << 8), + CAPA_METADATA = (1 << 9) }; extern struct protocol_t imap_protocol;
View file
cyrus-imapd-2.5.7.tar.gz/imap/imapd.c -> cyrus-imapd-2.5.7.8.tar.gz/imap/imapd.c
Changed
@@ -8136,9 +8136,9 @@ strarray_append(entries, arg.s); - // It is only not a list if there are wildcards, - // otherwise it's just a list of 1 item - if (strchr(arg.s, '*') || strchr(arg.s, '%')) { + // It is a list if there are wildcards + if (!strchr(arg.s, '*') || !strchr(arg.s, '%')) { + // No wildcards; Not a list *is_list = 0; } } @@ -8879,8 +8879,8 @@ } } - if (have_private) strarray_append(&newa, "value.priv"); - if (have_shared) strarray_append(&newa, "value.shared"); + if (have_private) strarray_append(&newa, "/private"); + if (have_shared) strarray_append(&newa, "/shared"); astate = annotate_state_new(); annotate_state_set_auth(astate,
View file
cyrus-imapd-2.5.7.tar.gz/imap/mboxlist.c -> cyrus-imapd-2.5.7.8.tar.gz/imap/mboxlist.c
Changed
@@ -1327,6 +1327,7 @@ int local_only, int forceuser, int ignorequota) { int r; + int mupdatecommiterror = 0; long myrights; int isusermbox = 0; /* Are we renaming someone's inbox */ int partitionmove = 0; @@ -1530,6 +1531,7 @@ syslog(LOG_ERR, "MUPDATE: can't commit mailbox entry for '%s'", newname); + mupdatecommiterror = r; } if (mupdate_h) mupdate_disconnect(&mupdate_h); free(loc); @@ -1540,7 +1542,37 @@ r = mailbox_commit(newmailbox); if (r) { - /* XXX - rollback DB changes if it was an mupdate failure */ + /* rollback DB changes if it was an mupdate failure */ + if (mupdatecommiterror) { + r = 0; + + /* recreate an old entry */ + if (!isusermbox) + r = cyrusdb_store(mbdb, oldname, strlen(oldname), + mboxent, strlen(mboxent), &tid); + + /* delete the new entry */ + if (!r) + r = cyrusdb_delete(mbdb, newname, strlen(newname), &tid, 0); + + /* Commit transaction */ + if (!r) + r = cyrusdb_commit(mbdb, tid); + + tid = NULL; + if (r) { + /* XXX HOWTO repair this mess! */ + syslog(LOG_ERR, "DBERROR: failed DB rollback on mailboxrename %s %s: %s", + oldname, newname, cyrusdb_strerror(r)); + syslog(LOG_ERR, "DBERROR: mailboxdb on mupdate and backend ARE NOT CONSISTENT"); + syslog(LOG_ERR, "DBERROR: mailboxdb on mupdate has entry for %s, mailboxdb on backend has entry for %s and files are on the old position", oldname, newname); + r = IMAP_IOERROR; + } else { + r = mupdatecommiterror; + } + + } + if (newmailbox) mailbox_delete(&newmailbox); if (partitionmove && newpartition) mailbox_delete_cleanup(newpartition, newname);
View file
cyrus-imapd-2.5.7.tar.gz/imap/mupdate.c -> cyrus-imapd-2.5.7.8.tar.gz/imap/mupdate.c
Changed
@@ -1606,28 +1606,51 @@ m = database_lookup(mailbox, NULL); if (m && t == SET_RESERVE) { + /* Check if we run in a discrete murder topology */ if (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_STANDARD) { - /* failed; mailbox already exists */ - msg = EXISTS; - goto done; + /* Replicated backends with the same server name issue + * reservations twice. Suppress bailing out on the second one + * (the replica). + */ + if (strcmp(m->location, location)) { + /* failed; mailbox already exists */ + msg = EXISTS; + goto done; + } } /* otherwise do nothing (local create on master) */ } if ((!m || m->t != SET_ACTIVE) && t == SET_DEACTIVATE) { - /* failed; mailbox not currently active */ - msg = NOTACTIVE; - goto done; + /* Check if we run in a discrete murder topology */ + if (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_STANDARD) { + /* Replicated backends with the same server name issue + * deactivation twice. Suppress bailing out on the second one + * (the replica). + */ + if (strcmp(m->location, location)) { + /* failed; mailbox not currently active */ + msg = NOTACTIVE; + goto done; + } + } } else if (t == SET_DEACTIVATE) { t = SET_RESERVE; } if (t == SET_DELETE) { if (!m) { + /* Check if we run in a discrete murder topology */ if (config_mupdate_config == IMAP_ENUM_MUPDATE_CONFIG_STANDARD) { - /* failed; mailbox doesn't exist */ - msg = DOESNTEXIST; - goto done; + /* Replicated backends with the same server name issue + * deletion twice. Suppress bailing out on the second one + * (the replica). + */ + if (strcmp(m->location, location)) { + /* failed; mailbox doesn't exist */ + msg = DOESNTEXIST; + goto done; + } } /* otherwise do nothing (local delete on master) */ } else {
View file
cyrus-imapd-2.5.7.tar.gz/imap/protocol.h -> cyrus-imapd-2.5.7.8.tar.gz/imap/protocol.h
Changed
@@ -54,7 +54,7 @@ struct stdprot_t; struct backend; -#define MAX_CAPA 9 +#define MAX_CAPA 10 enum { /* generic capabilities */
View file
cyrus-imapd-2.5.7.tar.gz/master/service.c -> cyrus-imapd-2.5.7.8.tar.gz/master/service.c
Changed
@@ -382,10 +382,13 @@ } id = atoi(p); - /* pick a random timeout between reuse_timeout -> 2*reuse_timeout - * to avoid massive IO overload if the network connection goes away */ srand(time(NULL) * getpid()); - reuse_timeout = reuse_timeout + (rand() % reuse_timeout); + + /* if timeout is enabled, pick a random timeout between reuse_timeout + * and 2*reuse_timeout to avoid massive IO overload if the network + * connection goes away */ + if (reuse_timeout) + reuse_timeout = reuse_timeout + (rand() % reuse_timeout); extern const int config_need_data; cyrus_init(alt_config, service, 0, config_need_data);
View file
cyrus-imapd-2.5.7.tar.gz/tools/config2header -> cyrus-imapd-2.5.7.8.tar.gz/tools/config2header
Changed
@@ -124,6 +124,18 @@ #include <string.h> #include "imapopts.h" +/* + * Sun C Compilers are more strict than GNU and won't allow type + * casting to a union + */ + +#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) +#define U_CFG_V +#else +#define U_CFG_V (union config_value) +#endif + + EXPORTED struct imapopt_s imapopts[] = { { IMAPOPT_ZERO, "", 0, OPT_NOTOPT, { NULL }, { NULL }, { { NULL, IMAP_ENUM_ZERO } } }, @@ -150,7 +162,7 @@ if ($3 eq "STRING") { $def = $use_gcc_extension - ? "(union config_value)((const char *) $2)" + ? "U_CFG_V((const char *) $2)" : "{(void *)($2)}"; } elsif ($3 eq "ENUM") { my @values = eval $4; @@ -163,7 +175,7 @@ $e = "IMAP_ENUM_" . uc($opt) . "_" . uc($def); $e =~ s/[^0-9A-Z_a-z]/_/g; $def = $use_gcc_extension - ? "(union config_value)((enum enum_value) $e)" + ? "U_CFG_V((enum enum_value) $e)" : "{(void *)($e)}"; # output the enum_options @@ -189,7 +201,7 @@ my $count = 0; $def = $use_gcc_extension - ? "(union config_value)((const char *) $2)" + ? "U_CFG_V((const char *) $2)" : "{(void*)($2)}"; # output the enum_options @@ -219,7 +231,7 @@ } $e .= "0"; $def = $use_gcc_extension - ? "(union config_value)((unsigned long) $e)" + ? "U_CFG_V((unsigned long) $e)" : "{(void *)($e)}"; # output the enum_options @@ -242,7 +254,7 @@ if ($count > $enum_size) { $enum_size = $count; } } else { $def = $use_gcc_extension - ? "(union config_value)((long) $2)" + ? "U_CFG_V((long) $2)" : "{(void*)$2}"; }
View file
cyrus-imapd-2.5.7.tar.gz/xversion.h -> cyrus-imapd-2.5.7.8.tar.gz/xversion.h
Changed
@@ -1,3 +1,3 @@ -/* cyrus-imapd 2.5.7 */ -#define _CYRUS_VERSION "2.5.7" -#define CYRUS_GITVERSION "ee1c6ef5 2015-12-01" +/* cyrus-imapd 2.5.7.8 */ +#define _CYRUS_VERSION "2.5.7.8" +#define CYRUS_GITVERSION "416a3d99 2016-03-10"
View file
cyrus-imapd.dsc
Changed
@@ -2,7 +2,7 @@ Source: cyrus-imapd Binary: cyrus-imapd Architecture: any -Version: 2.5.7-0~kolab1 +Version: 2.5.7-0~kolab8.1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.cyrusimap.org/
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +cyrus-imapd (2.5.7-0~kolab8.1) unstable; urgency=low + + * Check in a snapshot version 8 revisions ahead of the upstream 2.5.7 release + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Thu, 10 Mar 2016 11:30:13 +0100 + cyrus-imapd (2.5.7-0~kolab1) unstable; urgency=low * New upstream 2.5.7 release
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.