Projects
Kolab:3.4
cyrus-imapd
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 60
View file
cyrus-imapd-2.5-apt-concat.patch
Added
@@ -0,0 +1,497 @@ +diff -ur cyrus-imapd-2.5.orig/configure.ac cyrus-imapd-2.5/configure.ac +--- cyrus-imapd-2.5.orig/configure.ac 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/configure.ac 2014-06-24 23:03:32.949098756 +0200 +@@ -127,7 +127,6 @@ + #define HIDDEN + #endif]) + +-LT_PREREQ([2.2.6]) + LT_INIT([disable-static]) + AC_SUBST([LIBTOOL_DEPS]) + +diff -ur cyrus-imapd-2.5.orig/imap/mailbox.c cyrus-imapd-2.5/imap/mailbox.c +--- cyrus-imapd-2.5.orig/imap/mailbox.c 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/imap/mailbox.c 2014-06-24 23:03:50.529016587 +0200 +@@ -51,7 +51,9 @@ + #elif defined(HAVE_STDINT_H) + # include <stdint.h> + #endif ++#ifdef WITH_DAV + #include <libical/vcc.h> ++#endif + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +@@ -81,8 +83,10 @@ + + #include "annotate.h" + #include "assert.h" ++#ifdef WITH_DAV + #include "caldav_db.h" + #include "carddav_db.h" ++#endif + #include "crc32.h" + #include "md5.h" + #include "exitcodes.h" +@@ -2660,6 +2664,7 @@ + return r; + } + ++#ifdef WITH_DAV + static int mailbox_update_carddav(struct mailbox *mailbox, + struct index_record *old, + struct index_record *new) +@@ -2880,6 +2885,7 @@ + return mailbox_update_caldav(mailbox, old, new); + return 0; + } ++#endif //WITH_DAV + + EXPORTED int mailbox_update_conversations(struct mailbox *mailbox, + struct index_record *old, +@@ -3106,8 +3112,10 @@ + { + int r = 0; + ++#ifdef WITH_DAV + r = mailbox_update_dav(mailbox, old, new); + if (r) return r; ++#endif + + r = mailbox_update_conversations(mailbox, old, new); + if (r) return r; +@@ -4231,6 +4239,7 @@ + return r; + } + ++#ifdef WITH_DAV + EXPORTED int mailbox_add_dav(struct mailbox *mailbox) + { + struct index_record record; +@@ -4250,6 +4259,7 @@ + + return 0; + } ++#endif + + EXPORTED int mailbox_add_conversations(struct mailbox *mailbox) + { +diff -ur cyrus-imapd-2.5.orig/imap/mailbox.h cyrus-imapd-2.5/imap/mailbox.h +--- cyrus-imapd-2.5.orig/imap/mailbox.h 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/imap/mailbox.h 2014-06-24 23:03:50.529016587 +0200 +@@ -577,7 +577,9 @@ + uint32_t mailbox_sync_crc(struct mailbox *mailbox, unsigned vers, int recalc); + unsigned mailbox_best_crcvers(unsigned minvers, unsigned maxvers); + ++#ifdef WITH_DAV + extern int mailbox_add_dav(struct mailbox *mailbox); ++#endif + + /* Rename a CID. Note - this is just one mailbox! */ + extern int mailbox_cid_rename(struct mailbox *mailbox, +diff -ur cyrus-imapd-2.5.orig/imap/mbdump.c cyrus-imapd-2.5/imap/mbdump.c +--- cyrus-imapd-2.5.orig/imap/mbdump.c 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/imap/mbdump.c 2014-06-24 23:04:03.629955305 +0200 +@@ -630,6 +630,7 @@ + fname = mboxkey_getpath(userid); + ftag = "MBOXKEY"; + break; ++#ifdef WITH_DAV + case DAV_DB: { + struct buf dav_file = BUF_INITIALIZER; + +@@ -638,6 +639,7 @@ + ftag = "DAV"; + break; + } ++#endif // WITH_DAV + default: + fatal("unknown user data file", EC_OSFILE); + } +@@ -1072,12 +1074,14 @@ + char *s = user_hash_subs(userid); + strlcpy(fnamebuf, s, sizeof(fnamebuf)); + free(s); ++#ifdef WITHDAV + } else if (userid && !strcmp(file.s, "DAV")) { + /* overwriting this outright is absolutely what we want to do */ + struct buf dav_file = BUF_INITIALIZER; + dav_getpath_byuserid(&dav_file, userid); + strlcpy(fnamebuf, buf_cstring(&dav_file), sizeof(fnamebuf)); + buf_free(&dav_file); ++#endif // WITH_DAV + } else if (userid && !strcmp(file.s, "SEEN")) { + seen_file = seen_getpath(userid); + +diff -ur cyrus-imapd-2.5.orig/imap/mboxevent.c cyrus-imapd-2.5/imap/mboxevent.c +--- cyrus-imapd-2.5.orig/imap/mboxevent.c 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/imap/mboxevent.c 2014-06-24 23:04:07.425937541 +0200 +@@ -53,8 +53,10 @@ + + #include "annotate.h" + #include "assert.h" ++#ifdef WITH_DAV + #include "caldav_db.h" + #include "carddav_db.h" ++#endif + #include "exitcodes.h" + #include "imapurl.h" + #include "libconfig.h" +@@ -76,7 +78,7 @@ + EVENT_MESSAGE_TRASH) + + #define MAILBOX_EVENTS (EVENT_MAILBOX_CREATE|EVENT_MAILBOX_DELETE|\ +- EVENT_MAILBOX_RENAME) ++ EVENT_MAILBOX_RENAME|EVENT_ACL_CHANGE) + + #define SUBS_EVENTS (EVENT_MAILBOX_SUBSCRIBE|EVENT_MAILBOX_UNSUBSCRIBE) + +@@ -129,11 +131,15 @@ + { EVENT_MIDSET, "vnd.cmu.midset", EVENT_PARAM_STRING, 0, 0 }, + { EVENT_FLAG_NAMES, "flagNames", EVENT_PARAM_STRING, 0, 0 }, + { EVENT_PID, "pid", EVENT_PARAM_INT, 0, 0 }, ++ { EVENT_ACL_SUBJECT, "aclSubject", EVENT_PARAM_STRING, 0, 0 }, ++ { EVENT_ACL_RIGHTS, "aclRights", EVENT_PARAM_STRING, 0, 0 }, + { EVENT_USER, "user", EVENT_PARAM_STRING, 0, 0 }, + { EVENT_MESSAGE_SIZE, "messageSize", EVENT_PARAM_INT, 0, 0 }, ++#ifdef WITH_DAV + { EVENT_MBTYPE, "vnd.cmu.mbtype", EVENT_PARAM_STRING, 0, 0 }, + { EVENT_DAV_FILENAME, "vnd.cmu.davFilename", EVENT_PARAM_STRING, 0, 0 }, + { EVENT_DAV_UID, "vnd.cmu.davUid", EVENT_PARAM_STRING, 0, 0 }, ++#endif + { EVENT_MESSAGE_CID, "vnd.fastmail.cid", EVENT_PARAM_STRING, 0, 0 }, + /* always at end to let the parser to easily truncate this part */ + { EVENT_ENVELOPE, "vnd.cmu.envelope", EVENT_PARAM_STRING, 0, 0 }, +@@ -187,7 +193,7 @@ + enabled_events |= FLAGS_EVENTS; + + if (groups & IMAP_ENUM_EVENT_GROUPS_ACCESS) +- enabled_events |= (EVENT_LOGIN|EVENT_LOGOUT); ++ enabled_events |= (EVENT_LOGIN|EVENT_LOGOUT|EVENT_ACL_CHANGE); + + if (groups & IMAP_ENUM_EVENT_GROUPS_SUBSCRIPTION) + enabled_events |= SUBS_EVENTS; +@@ -378,8 +384,10 @@ + return extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_VND_FASTMAIL_SESSIONID; + case EVENT_MAILBOX_ID: + return (type & MAILBOX_EVENTS); ++#ifdef WITH_DAV + case EVENT_MBTYPE: + return (type & MAILBOX_EVENTS); ++#endif + case EVENT_MAX_MESSAGES: + return type & QUOTA_EVENTS; + case EVENT_MESSAGE_CONTENT: +@@ -388,12 +396,14 @@ + case EVENT_MESSAGE_SIZE: + return (extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_MESSAGESIZE) && + (type & (EVENT_MESSAGE_APPEND|EVENT_MESSAGE_NEW)); ++#ifdef WITH_DAV + case EVENT_DAV_FILENAME: + return (extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_VND_CMU_DAVFILENAME) && + (type & EVENT_CALENDAR); + case EVENT_DAV_UID: + return (extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_VND_CMU_DAVUID) && + (type & EVENT_CALENDAR); ++#endif + case EVENT_MESSAGE_CID: + return (extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_VND_FASTMAIL_CID) && + (type & (EVENT_MESSAGE_APPEND|EVENT_MESSAGE_NEW)); +@@ -415,6 +425,10 @@ + return extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_SERVICE; + case EVENT_TIMESTAMP: + return extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_TIMESTAMP; ++ case EVENT_ACL_SUBJECT: ++ return type & EVENT_ACL_CHANGE; ++ case EVENT_ACL_RIGHTS: ++ return type & EVENT_ACL_CHANGE; + case EVENT_UIDNEXT: + if (!(extra_params & IMAP_ENUM_EVENT_EXTRA_PARAMS_UIDNEXT)) + return 0; +@@ -671,12 +685,24 @@ + if (userid && mboxevent_expected_param(event->type, EVENT_USER)) { + /* translate any separators in user */ + char *user = xstrdup(userid); +- mboxname_hiersep_toexternal(&namespace, user, +- config_virtdomains ? strcspn(user, "@") : 0); ++ if (user) { ++ mboxname_hiersep_toexternal(&namespace, user, ++ config_virtdomains ? strcspn(user, "@") : 0); ++ } + FILL_STRING_PARAM(event, EVENT_USER, user); + } + } + ++EXPORTED void mboxevent_set_acl(struct mboxevent *event, const char *identifier, ++ const char *rights) ++{ ++ if (!event) ++ return; ++ ++ FILL_STRING_PARAM(event, EVENT_ACL_SUBJECT, xstrdup(identifier)); ++ FILL_STRING_PARAM(event, EVENT_ACL_RIGHTS, xstrdup(rights)); ++} ++ + EXPORTED void mboxevent_extract_record(struct mboxevent *event, struct mailbox *mailbox, + struct index_record *record) + { +@@ -743,6 +769,7 @@ + cacheitem_size(record, CACHE_BODYSTRUCTURE))); + } + ++#ifdef WITH_DAV + /* add caldav items */ + if ((mailbox->mbtype & (MBTYPES_DAV)) && + (mboxevent_expected_param(event->type, EVENT_DAV_FILENAME) || +@@ -782,6 +809,7 @@ + } + } + } ++#endif //WITH_DAV + } + + void mboxevent_extract_copied_record(struct mboxevent *event, +@@ -993,8 +1021,10 @@ + imapurl_toURL(url, &imapurl); + FILL_STRING_PARAM(event, EVENT_URI, xstrdup(url)); + ++#ifdef WITH_DAV + FILL_STRING_PARAM(event, EVENT_MBTYPE, + xstrdup(mboxlist_mbtype_to_string(mailbox->mbtype))); ++#endif + + /* mailbox related events also require mailboxID */ + if (event->type & MAILBOX_EVENTS) { +@@ -1121,6 +1151,8 @@ + return "MailboxSubscribe"; + case EVENT_MAILBOX_UNSUBSCRIBE: + return "MailboxUnSubscribe"; ++ case EVENT_ACL_CHANGE: ++ return "AclChange"; + default: + fatal("Unknown message event", EC_SOFTWARE); + } +@@ -1324,6 +1356,12 @@ + { + } + ++EXPORTED void mboxevent_set_acl(struct mboxevent *event __attribute__((unused)), ++ const char *identifier __attribute__((unused)), ++>.......>.......>.......>.......const char *rights __attribute__((unused))) ++{ ++} ++ + EXPORTED void mboxevent_extract_record(struct mboxevent *event __attribute__((unused)), + struct mailbox *mailbox __attribute__((unused)), + struct index_record *record __attribute__((unused))) +diff -ur cyrus-imapd-2.5.orig/imap/mboxevent.h cyrus-imapd-2.5/imap/mboxevent.h +--- cyrus-imapd-2.5.orig/imap/mboxevent.h 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/imap/mboxevent.h 2014-06-24 23:03:54.998995682 +0200 +@@ -80,7 +80,8 @@ + EVENT_MAILBOX_RENAME = (1<<17), + EVENT_MAILBOX_SUBSCRIBE = (1<<18), + EVENT_MAILBOX_UNSUBSCRIBE = (1<<19), +- EVENT_CALENDAR = (1<<20) ++ EVENT_CALENDAR = (1<<20), ++ EVENT_ACL_CHANGE = (1<<21) + }; + + /* +@@ -110,11 +111,15 @@ + EVENT_MIDSET, + EVENT_FLAG_NAMES, + EVENT_PID, ++ EVENT_ACL_SUBJECT, ++ EVENT_ACL_RIGHTS, + EVENT_USER, + EVENT_MESSAGE_SIZE, ++#ifdef WITH_DAV + EVENT_MBTYPE, + EVENT_DAV_FILENAME, + EVENT_DAV_UID, ++#endif + EVENT_MESSAGE_CID, + EVENT_ENVELOPE, + EVENT_BODYSTRUCTURE, +@@ -219,6 +224,13 @@ + void mboxevent_set_access(struct mboxevent *event, + const char *serveraddr, const char *clientaddr, + const char *userid, const char *mailboxname); ++ ++/* ++ * Shortcut to setting event notification parameters ++ */ ++void mboxevent_set_acl(struct mboxevent *event, const char *identifier, ++ const char *rights); ++ + /* + * Extract data from the given record to fill these event parameters : + * - uidset from UID +diff -ur cyrus-imapd-2.5.orig/imap/mboxlist.c cyrus-imapd-2.5/imap/mboxlist.c +--- cyrus-imapd-2.5.orig/imap/mboxlist.c 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/imap/mboxlist.c 2014-06-24 23:03:54.999995678 +0200 +@@ -1854,6 +1854,15 @@ + name, cyrusdb_strerror(r)); + r = IMAP_IOERROR; + } ++ ++ /* send a AclChange event notification */ ++ struct mboxevent *mboxevent = mboxevent_new(EVENT_ACL_CHANGE); ++ mboxevent_extract_mailbox(mboxevent, mailbox); ++ mboxevent_set_acl(mboxevent, identifier, rights); ++ ++ mboxevent_notify(mboxevent); ++ mboxevent_free(&mboxevent); ++ + } + + /* 4. Change backup copy (cyrus.header) */ +diff -ur cyrus-imapd-2.5.orig/imap/mboxname.c cyrus-imapd-2.5/imap/mboxname.c +--- cyrus-imapd-2.5.orig/imap/mboxname.c 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/imap/mboxname.c 2014-06-24 23:03:46.580035052 +0200 +@@ -576,7 +576,15 @@ + + if (mbparts.box) + strcat(result, "."); ++ } else { ++ /* shared mailbox */ ++ if (mbparts.is_deleted) { ++ const char *dp = config_getstring(IMAPOPT_DELETEDPREFIX); ++ sprintf(result, "%s.", dp); ++ } + } ++ ++ + if (mbparts.box) + strcat(result, mbparts.box); + +diff -ur cyrus-imapd-2.5.orig/imap/sync_server.c cyrus-imapd-2.5/imap/sync_server.c +--- cyrus-imapd-2.5.orig/imap/sync_server.c 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/imap/sync_server.c 2014-06-24 23:03:50.530016583 +0200 +@@ -74,9 +74,11 @@ + #include "annotate.h" + #include "append.h" + #include "auth.h" ++#ifdef WITH_DAV + #include "caldav_db.h" + #include "carddav_db.h" + #include "dav_db.h" ++#endif + #include "dlist.h" + #include "exitcodes.h" + #include "global.h" +@@ -291,9 +293,11 @@ + statuscache_open(); + } + ++#ifdef WITH_DAV + dav_init(); + caldav_init(); + carddav_init(); ++#endif + + return 0; + } +@@ -455,9 +459,11 @@ + + proc_cleanup(); + ++#ifdef WITH_DAV + carddav_done(); + caldav_done(); + dav_done(); ++#endif + + if (config_getswitch(IMAPOPT_STATUSCACHE)) { + statuscache_close(); +diff -ur cyrus-imapd-2.5.orig/imap/xapian_wrap.cpp cyrus-imapd-2.5/imap/xapian_wrap.cpp +--- cyrus-imapd-2.5.orig/imap/xapian_wrap.cpp 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/imap/xapian_wrap.cpp 2014-06-24 23:03:37.885075693 +0200 +@@ -291,6 +291,7 @@ + catch (const Xapian::Error &err) { + syslog(LOG_ERR, "IOERROR: Xapian: caught exception: %s: %s", + err.get_context().c_str(), err.get_description().c_str()); ++ return 0; + } + } + +diff -ur cyrus-imapd-2.5.orig/Makefile.am cyrus-imapd-2.5/Makefile.am +--- cyrus-imapd-2.5.orig/Makefile.am 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/Makefile.am 2014-06-24 23:03:50.528016592 +0200 +@@ -1190,7 +1190,6 @@ + man/deliver.8 \ + man/fetchnews.8 \ + man/fud.8 \ +- man/httpd.8 \ + man/idled.8 \ + man/imapd.8 \ + man/ipurge.8 \ +@@ -1206,17 +1205,27 @@ + man/rmnews.8 \ + man/smmapd.8 \ + man/syncnews.8 \ +- man/sync_client.8 \ +- man/sync_reset.8 \ +- man/sync_server.8 \ + man/timsieved.8 \ + man/tls_prune.8 \ + man/unexpunge.8 +-if USE_SQUAT ++ ++if SQUATTER + dist_man_MANS += \ + man/squatter.8 + endif + ++if HTTPD ++dist_man_MANS += \ ++ man/httpd.8 ++endif ++ ++if REPLICATION ++dist_man_MANS += \ ++ man/sync_client.8 \ ++ man/sync_reset.8 \ ++ man/sync_server.8 ++endif ++ + master_master_SOURCES = \ + master/cyrusMasterMIB.c \ + master/cyrusMasterMIB.h \ +diff -ur cyrus-imapd-2.5.orig/notifyd/notify_external.c cyrus-imapd-2.5/notifyd/notify_external.c +--- cyrus-imapd-2.5.orig/notifyd/notify_external.c 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/notifyd/notify_external.c 2014-06-24 23:03:41.882057013 +0200 +@@ -71,15 +71,15 @@ + + /* check/parse options */ + if (!(notify = config_getstring(IMAPOPT_NOTIFY_EXTERNAL))) { +- syslog(LOG_ERR, "ERROR: recipient not specified"); +- return strdup("NO external recipient not specified"); ++ syslog(LOG_ERR, "ERROR: external recipient (program) not specified"); ++ return strdup("NO external recipient (program) not specified"); + } + +- if (!*user) { +- syslog(LOG_ERR, "ERROR: recipient not specified"); +- return strdup("NO external recipient not specified"); ++/* if (!*user) { ++ syslog(LOG_ERR, "ERROR: external recipient user not specified"); ++ return strdup("NO external recipient user not specified"); + } +- ++*/ + buf[0] = notify; + buf[1] = "-c"; + buf[2] = class; +diff -ur cyrus-imapd-2.5.orig/ptclient/ldap.c cyrus-imapd-2.5/ptclient/ldap.c +--- cyrus-imapd-2.5.orig/ptclient/ldap.c 2014-02-19 23:07:27.000000000 +0100 ++++ cyrus-imapd-2.5/ptclient/ldap.c 2014-06-24 23:04:12.564913487 +0200 +@@ -946,7 +946,7 @@ + if (rc != PTSM_OK) + return rc; + +- if (ptsm->domain_base_dn && (strrchr(canon_id, '@') != NULL)) { ++ if (ptsm->domain_base_dn && ptsm->domain_base_dn[0] != '\0' && (strrchr(canon_id, '@') != NULL)) { + syslog(LOG_DEBUG, "Attempting to get domain for %s from %s", canon_id, ptsm->domain_base_dn); + + /* Get the base dn to search from domain_base_dn searched on domain_scope with
View file
debian.series
Changed
@@ -1,9 +1,1 @@ -0001-There-is-no-actual-prerequisite-for-libtool-of-2.2.6.patch -0002-A-non-void-function-should-return-something-so-retur.patch -0003-Disable-user-parameter-check-to-notify-external.patch -0004-Fix-display-of-deleted-shared-folders.patch -0005-Apply-ifdefs-for-building-without-DAV-and-without-re.patch -0006-Add-ACL-change-notifications.patch -0007-Correct-location-of-ifdef-endif.patch -0008-Extend-ifdefs-endifs-for-WITH_DAV.patch -0009-Keep-the-same-order-between-.c-and-.h-perhaps.patch +cyrus-imapd-2.5-apt-concat.patch -p1
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
.