Projects
Kolab:16:Testing
cyrus-imapd
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 11
View file
cyrus-imapd.spec
Changed
@@ -18,9 +18,9 @@ %global _cyrusgroup mail %global _cyrexecdir %{_exec_prefix}/lib/%{name} -%global tag_version 2.5.10 -%global revision 55 -%global git_hash gb6dbffa +%global tag_version 2.5.11 +%global revision 30 +%global git_hash g948a95666 ## ## Options @@ -259,7 +259,7 @@ %setup -q -n %{name}-%{tag_version}-%{revision}-%{git_hash} %if 0%{?with_bdb} < 1 -sed -i -e 's/,berkeley//g' cunit/db.testc +sed -i -e 's/,berkeley//g' cunit/aaa-db.testc sed -r -i -e 's/"berkeley(|-a-z-+)", //g' lib/imapoptions %endif
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/cmulocal/clamav.m4
Deleted
@@ -1,35 +0,0 @@ -dnl -dnl macros for configure.in to detect clamav library -dnl - -AC_DEFUN(CMU_CLAMAV, -AC_REQUIRE(CMU_FIND_LIB_SUBDIR) -AC_ARG_WITH(clamav, - AS_HELP_STRING(--with-clamav=DIR, use ClamAV - DIR to clamav-config (yes)), - with_clamav=$withval, with_clamav=yes) - have_clamav=no - if test "$with_clamav" != no; then - - if test -d $with_clamav; then - clamav_path=${with_clamav}:${with_clamav}/bin - else - clamav_path=/usr/local/bin:/usr/bin:$PATH - fi - AC_PATH_PROG(CLAMAV_CONFIG,clamav-config,,$clamav_path) - - if test -x "$CLAMAV_CONFIG"; then - LIB_CLAMAV="`$CLAMAV_CONFIG --libs` -lclamav" - CFLAGS_CLAMAV=`$CLAMAV_CONFIG --cflags` - - if test -n "$LIB_CLAMAV"; then - have_clamav=yes - test -n "$CFLAGS_CLAMAV" && CPPFLAGS="$CPPFLAGS $CFLAGS_CLAMAV" - AC_DEFINE(HAVE_CLAMAV,,Do we have ClamAV?) - AC_SUBST(LIB_CLAMAV) - fi - fi - fi - - AC_MSG_CHECKING(ClamAV support) - AC_MSG_RESULT($have_clamav) -)
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/.gitignore -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/.gitignore
Changed
@@ -15,6 +15,7 @@ .deps .dirstamp .libs +VERSION Makefile.in Makefile Makefile.bak @@ -65,6 +66,7 @@ imap/cyr_sequence imap/cyr_synclog imap/cyr_userseen +imap/cyr_virusscan imap/cyrdump imap/dav_reconstruct imap/deliver
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/Makefile.am -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/Makefile.am
Changed
@@ -115,7 +115,8 @@ noinst_LTLIBRARIES = CLEANFILES = EXTRA_DIST = \ - $(wildcard tools/vzic/*) + $(wildcard tools/vzic/*) \ + VERSION if COM_ERR COMPILE_ET_DEP = com_err/et/compile_et @@ -555,7 +556,7 @@ # Note that several places in the code use -lcrypto, e.g. for SHA1 or # MD5 algorithms, without needing SSL. Currently we have no way of # minimally linking such code. -LD_BASIC_ADD = lib/libcyrus.la lib/libcyrus_min.la ${LIBS} $(LIB_RT) \ +LD_BASIC_ADD = lib/libcyrus.la lib/libcyrus_min.la ${LIBS} \ ${LIB_SASL} $(SSL_LIBS) # UTILITY is the libraries that utility programs which use Cyrus' @@ -588,6 +589,7 @@ cunit/timeout.h cunit_TESTS = \ + cunit/aaa-db.testc \ cunit/annotate.testc \ cunit/backend.testc \ cunit/binhex.testc \ @@ -596,7 +598,6 @@ cunit/byteorder64.testc \ cunit/charset.testc \ cunit/crc32.testc \ - cunit/db.testc \ cunit/dlist.testc \ cunit/duplicate.testc \ cunit/getxstring.testc \ @@ -780,14 +781,8 @@ imap_cyr_userseen_SOURCES = imap/cli_fatal.c imap/cyr_userseen.c imap/mutex_fake.c imap_cyr_userseen_LDADD = $(LD_UTILITY_ADD) -if HAVE_CLAMAV imap_cyr_virusscan_SOURCES = imap/cli_fatal.c imap/cyr_virusscan.c imap/mutex_fake.c -imap_cyr_virusscan_LDADD = $(LD_UTILITY_ADD) -lclamav -else # HAVE_CLAMAV -EXTRA_DIST += \ - imap/cyr_virusscan.c - -endif # HAVE_CLAMAV +imap_cyr_virusscan_LDADD = $(LD_UTILITY_ADD) $(CLAMAV_LIBS) if HTTPD imap_ctl_zoneinfo_SOURCES = imap/cli_fatal.c imap/ctl_zoneinfo.c imap/mutex_fake.c @@ -1220,7 +1215,7 @@ else lib_libcyrus_la_SOURCES += lib/nonblock_ioctl.c endif -lib_libcyrus_la_LIBADD = $(LIB_RT) ${LIB_SASL} $(SSL_LIBS) +lib_libcyrus_la_LIBADD = ${LIB_SASL} $(SSL_LIBS) lib_libcyrus_la_CFLAGS = $(AM_CFLAGS) $(CFLAG_VISIBILITY) nodist_lib_libcyrus_min_la_SOURCES = \ @@ -1601,6 +1596,9 @@ done @echo "== done ==" +VERSION: tools/git-version.sh + $(AM_V_GEN)$< > $@.NEW && mv $@.NEW $@ + install-data-hook: if CMULOCAL $(INSTALL) -m 644 $(top_srcdir)/depot/depot.conf $(DESTDIR)/
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/README -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/README
Changed
@@ -11,7 +11,8 @@ If you continue to install this software PLEASE be sure to read the documentation (located in the doc/ subdirectory). Many common questions can be answered just by carefully following the documentation. -Please also refer to http://bugzilla.cyrusimap.org for any outstanding bugs. +Please also refer to https://github.com/cyrusimap/cyrus-imapd/issues +for any outstanding bugs. Note that CMU only provides a source distribution. If you run into problems with any binary distribution, please contact the source of
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/configure.ac -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/configure.ac
Changed
@@ -294,7 +294,9 @@ ;; yes) # Find mysql_config in $PATH - mysql_config=mysql_config + AC_PATH_PROG(mysql_config, mysql_config, ) + AS_IF(test -z "$mysql_config", + AC_MSG_ERROR(The mysql_config program was not found)) ;; *) # Find mysql_config in the specified directory @@ -654,12 +656,13 @@ AM_CONDITIONAL(LOCK_FCNTL, test $WITH_LOCK = "fcntl") dnl check for fdatasync (used by cyrusdb_skiplist) -LIB_RT="" -AC_CHECK_FUNC(fdatasync, AC_DEFINE(HAVE_FDATASYNC,,Do we have fdatasync()?), - AC_CHECK_LIB(rt, fdatasync, - LIB_RT="-lrt" - AC_DEFINE(HAVE_FDATASYNC,,Do we have fdatasync()?) - ) +AC_SEARCH_LIBS(fdatasync, rt, + AC_DEFINE(HAVE_FDATASYNC,,Do we have fdatasync()?) +, ) + +dnl check for clock_gettime +AC_SEARCH_LIBS(clock_gettime, rt, , + AC_MSG_ERROR(unable to find the clock_gettime() function) ) dnl check for libuuid (used when generating mailbox uniqueids) @@ -821,48 +824,14 @@ AM_CONDITIONAL(PTCLIENT, test "x$enable_afs" = "xyes" -o "$have_ldap" = "yes") -AC_ARG_WITH( - clamav, - AS_HELP_STRING(--with-clamav=DIR, use ClamAV from PATH (no)), - with_clamav=$withval, - with_clamav=no -) - -if test "$with_clamav" != no; then - if test -d $with_clamav; then - save_CPPFLAGS="$CPPFLAGS" - save_LDFLAGS="$LDFLAGS" - save_LIBS="$LIBS" - - CPPFLAGS="${CPPFLAGS} -I${with_clamav}/include" - LDFLAGS="$LDFLAGS -L${with_clamav}/$CMU_LIB_SUBDIR" - AC_CHECK_LIB( - wrap, - request_init, - AC_CHECK_HEADER(clamav.h,, with_clamav=no), - with_clamav=no - ) - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - fi -fi - -AC_MSG_CHECKING(ClamAV support) -AC_MSG_RESULT($with_clamav) -LIB_CLAMAV="" -if test "$with_clamav" != "no"; then - AC_DEFINE(HAVE_CLAMAV,,Do we have ClamAV?) - if test -d "$with_clamav"; then - CPPFLAGS="${CPPFLAGS} -I${with_clamav}/include" - LIB_CLAMAV="-L${with_clamav}/$CMU_LIB_SUBDIR -lclamav" - else - LIB_CLAMAV="-lclamav" - fi -fi - -AC_SUBST(LIB_CLAMAV) -AM_CONDITIONAL(HAVE_CLAMAV, test "$with_clamav" != "no") +AC_ARG_WITH(clamav, + AS_HELP_STRING(--without-clamav, ignore presence of ClamAV and disable it)) +AS_IF(test "x$with_clamav" != "xno", + PKG_CHECK_MODULES(CLAMAV, libclamav, + AC_DEFINE(HAVE_CLAMAV, , Do we have ClamAV?) + with_clamav=yes , + with_clamav=no)) +AM_CONDITIONAL(HAVE_CLAMAV, test "x$with_clamav" != "xno") AC_ARG_ENABLE(server, AS_HELP_STRING(--disable-server, disable compiling servers)) @@ -1519,7 +1488,6 @@ done AC_SUBST(LIB_SASL) -AC_SUBST(LIB_RT) AC_SUBST(LIB_UUID) AC_SUBST(PERL)
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/contrib/README -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/contrib/README
Changed
@@ -5,8 +5,8 @@ didn't try them, don't use them for whatever reasons, or were too lazy to do a real integration at this point in time. -Bugs can still be sent to cyrus-bugs@andrew.cmu.edu. Patches are even -better. +Bugs can still be sent to https://github.com/cyrusimap/cyrus-imapd/issues. +Patches/pull requests are even better. If you wish to submit a patch, please submit either unified or context diffs; plain diffs are hard to apply if the source has changed.
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/contrib/cyrus-graphtools.1.0/README -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/contrib/cyrus-graphtools.1.0/README
Changed
@@ -1,7 +1,8 @@ cyrus-graphtools v1.0 Alison Greenwald <alison@andrew.cmu.edu> -Please send all comments/questions/bugs to cyrus-bugs@andrew.cmu.edu. +Please send all comments/questions/bugs to +https://github.com/cyrusimap/cyrus-imapd/issues -------- @@ -66,4 +67,5 @@ ------- -Please send any comments or suggestions to cyrus-bugs@andrew.cmu.edu. +Please send any comments or suggestions to +https://github.com/cyrusimap/cyrus-imapd/issues
View file
cyrus-imapd-2.5.11-30-g948a95666.tar.gz/cunit/aaa-db.testc
Changed
(renamed from cunit/db.testc)
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/doc/ag.html -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/doc/ag.html
Changed
@@ -33,11 +33,6 @@ <a href="install-murder.html">documentation</a> for setup and install instructions.</i></p> -<p> -Please send any questions or comments to <a -href="mailto:cyrus-bugs+@andrew.cmu.edu">cyrus-bugs@andrew.cmu.edu</a>. -</p> - <h3><a name="overview">1.0 Overview</a></h3> Scaling a service usually takes one of two paths: buy bigger and
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/doc/internal/unit-tests.html -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/doc/internal/unit-tests.html
Changed
@@ -452,6 +452,7 @@ of the <tt>cunit_TESTS</tt> variable.</p> <blockquote class="src">cunit_TESTS = \ + cunit/aaa-db.testc \ cunit/annotate.testc \ cunit/backend.testc \ cunit/binhex.testc \ @@ -460,7 +461,6 @@ cunit/byteorder64.testc \ cunit/charset.testc \ cunit/<b>crc32</b>.testc \ - cunit/db.testc \ cunit/dlist.testc \ cunit/duplicate.testc \ </blockquote>
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/docsrc/conf.py -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/docsrc/conf.py
Changed
@@ -63,7 +63,7 @@ # General information about the project. project = u'Cyrus IMAP' -copyright = u'1993-2016, The Cyrus Team' +copyright = u'1993-2017, The Cyrus Team' # The version info for the project you're documenting, acts as replacement for @@ -71,9 +71,9 @@ # built documents. # # The short X.Y version. -version = '2.5.10' +version = '2.5.11' # The full version, including alpha/beta/rc tags. -release = '2.5.10 (stable)' +release = '2.5.11' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -1063,13 +1063,13 @@ #epub_use_index = True rst_prolog = """ -.. |imap_last_stable_version| replace:: 2.4.18 -.. |imap_last_stable_branch| replace:: `cyrus-imapd-2.4` -.. |imap_last_stable_next_version| replace:: 2.4.18 + patches -.. |imap_current_stable_version| replace:: 2.5.10 -.. |imap_current_stable_next_version| replace:: 2.5.10 + patches -.. |imap_current_stable_branch| replace:: `cyrus-imapd-2.5` -.. |imap_latest_development_version| replace:: 3.0.0-beta2 +.. |imap_last_stable_version| replace:: 2.5.11 +.. |imap_last_stable_branch| replace:: `cyrus-imapd-2.5` +.. |imap_last_stable_next_version| replace:: 2.5.11 + patches +.. |imap_current_stable_version| replace:: 3.0.1 +.. |imap_current_stable_next_version| replace:: 3.0.0 + patches +.. |imap_current_stable_branch| replace:: `cyrus-imapd-3.0` +.. |imap_latest_development_version| replace:: 3.1.0 .. |imap_latest_development_branch| replace:: master .. |imap_tikanga_stock_version| replace:: 2.3.7 .. |imap_santiago_stock_version| replace:: 2.3.16 @@ -1082,11 +1082,11 @@ .. |sasl_current_stable_version| replace:: 2.1.26 .. |imap_stable_release_notes| raw:: html - <a href="2.5/x/2.5.10.html">2.5.10</a> + <a href="3.0/x/3.0.0.html">3.0.0</a> .. |imap_development_release_notes| raw:: html - <a href="3.0/x/3.0.0-beta2.html">3.0.0-beta2</a> + <a href="3.1/x/3.1.0.html">3.1.0</a> """ @@ -1148,13 +1148,14 @@ # Use this as :task:`18` extlinks = { - 'rfc':('http://tools.ietf.org/html/rfc%s', 'RFC '), 'task':('https://git.cyrus.foundation/T%s', 'Task #'), 'issue':('https://github.com/cyrusimap/cyrus-imapd/issues/%s', 'Issue #'), - 'cyrus-stable':('http://www.cyrusimap.org/stable%s', None), - 'cyrus-dev':('http://www.cyrusimap.org/dev%s', None), + 'cyrus-2.5':('http://www.cyrusimap.org/2.5%s',None), + 'cyrus-3.0':('http://www.cyrusimap.org/3.0%s',None), + 'cyrus-dev':('http://www.cyrusimap.org/dev%s',None), + 'cyrus-stable': ('http://www.cyrusimap.org/3.0%s',None), } # Change this to whatever your output root is # If you're in a local build environment, this might be file://cyrus-imapd/doc/build/imap/admin/$num/$topic/$topic.html -cyrus_man_url_regex = "http://www.cyrusimap.org/stable/imap/admin/$num/$topic.html"; +cyrus_man_url_regex = "http://www.cyrusimap.org/2.5/imap/admin/$num/$topic.html";
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/docsrc/feedback-bugs.rst -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/docsrc/feedback-bugs.rst
Changed
@@ -1,7 +1,9 @@ Reporting Bugs ============== -Bug reports can be logged in our `Bugzilla issue tracker <http://bugzilla.cyrusimap.org/>`__. Please bear in mind registration is required. +Bug reports can be logged in our `GitHub issue tracker +<https://github.com/cyrusimap/cyrus-imapd/issues>`__. +Please bear in mind registration is required. When reporting a bug, please prepare to provide the following information; * Your platform, and if applicable, your distribution and the distribution version.
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/docsrc/feedback-mailing-lists.rst -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/docsrc/feedback-mailing-lists.rst
Changed
@@ -21,10 +21,6 @@ This is a mailing list for the use of Cyrus developers and package maintainers, for all the Cyrus software. -* cyrus-bugzilla@lists.andrew.cmu.edu (no archive) - - This is the bugzilla event list. - Archives --------
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/docsrc/imap/faqs/o-annotations.rst -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/docsrc/imap/faqs/o-annotations.rst
Changed
@@ -7,13 +7,13 @@ * **/admin** - Sets the administrator email address for the server. (See :cyrusman:`cyradm(1)`) -* **/check** - Boolean value "true" or "false" that indicates whether this mailbox should be checked at regular intervals by the client. The interval in minutes is specified by the - -* **/checkperiod** entry. (Draft RFC) +* **/check** - Boolean value "true" or "false" that indicates whether this mailbox should be checked at regular intervals by the client. The interval in minutes is specified by the ``/checkperiod`` entry. (Draft RFC) * **/checkperiod** - Numeric value indicating a period of minutes that the client uses to determine the interval of regular 'new mail' checks for the corresponding mailbox. (Draft RFC) -* **/comment** - Sets a comment or description associated with the mailbox. (cyradm(1)) /motd - Sets a "message of the day". The message gets displayed as an ALERT after authentication. +* **/comment** - Sets a comment or description associated with the mailbox. (cyradm(1)) + +* **/motd** - Sets a "message of the day". The message gets displayed as an ALERT after authentication. * **/sort** - Defines the default sort criteria I-D.ietf-imapext-sort to use when first displaying the mailbox contents to the user, or NIL if sorting is not required. (Draft RFC) @@ -47,4 +47,4 @@ * **/vendor/cmu/cyrus-imapd/size** - Undocumented. -* **/vendor/cmu/cyrus-imapd/squat** - Indicates that the mailbox should have a squat index created for it. (See :cyrusman:`squatter(8)`) \ No newline at end of file +* **/vendor/cmu/cyrus-imapd/squat** - Indicates that the mailbox should have a squat index created for it. (See :cyrusman:`squatter(8)`)
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/docsrc/imap/installation/diy.rst -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/docsrc/imap/installation/diy.rst
Changed
@@ -21,7 +21,7 @@ .. parsed-literal:: - $ :command:`git clone github.com/cyrusimap/cyrus-imapd.git` + $ :command:`git clone git@github.com:cyrusimap/cyrus-imapd.git` Check out the desired branch or revision: @@ -33,7 +33,7 @@ remotes/origin/cyrus-imapd-2.3 remotes/origin/cyrus-imapd-2.4 remotes/origin/cyrus-imapd-2.5 - $ :command:`git checkout` *$branch* + $ :command:`git checkout $BRANCH` Continue with :ref:`imap-installation-diy-build-dependencies`. @@ -303,7 +303,7 @@ .. parsed-literal:: $ :command:`autoreconf -vi` - $ :command:`./configure` options + $ :command:`./configure options` Check the summary after ``./configure`` completes successfully. The following segment shows the defaults in version 2.5.0, ran on a system
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/docsrc/imap/release-notes/2.5/x/2.5.0.rst -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/docsrc/imap/release-notes/2.5/x/2.5.0.rst
Changed
@@ -113,6 +113,15 @@ their backends before they upgrade their frontends. See :task:`16` for details. +Greater Memory Footprint +------------------------ + +For those upgrading from 2.3.X; newer releases of Cyrus IMAP will use +significantly more memory per selected mailbox. This is not an error +or bug; it's a feature. The newer code is holding more data and +metadata in memory for purposes of faster access to more of the +mailbox. This is not a memory leak. + .. _relnotes-2.5.0-new-features: New Features
View file
cyrus-imapd-2.5.11-30-g948a95666.tar.gz/docsrc/imap/release-notes/2.5/x/2.5.11.rst
Added
@@ -0,0 +1,61 @@ +:tocdepth: 3 + +=============================== +Cyrus IMAP 2.5.11 Release Notes +=============================== + +.. IMPORTANT:: + + This is a bug-fix release in the `stable 2.5 series <http://www.cyrusimap.org/stable>`_. + + Refer to the Cyrus IMAP 2.5.0 Release Notes for important information + about the 2.5 series, including upgrading instructions. + +Download via HTTP: + + * http://www.cyrusimap.org/releases/cyrus-imapd-2.5.11.tar.gz + * http://www.cyrusimap.org/releases/cyrus-imapd-2.5.11.tar.gz.sig + +Download via FTP: + + * ftp://ftp.cyrusimap.org/cyrus-imapd/cyrus-imapd-2.5.11.tar.gz + * ftp://ftp.cyrusimap.org/cyrus-imapd/cyrus-imapd-2.5.11.tar.gz.sig + +.. _relnotes-2.5.11-changes: + +Changes Since 2.5.10 +==================== + +Dependency changes +------------------ + +Other changes +------------- + +* Better integration with updated documentation/website infrastructure +* The "timeout" option is now also used as an upper limit in minutes + for IDLE connections. A new option "imapidletimeout" can be used + to set an idle-specific timeout instead. (Thanks Philipp Gesang.) + +Bug fixes +--------- + +* Fixed: invalid free and memory leak in httpd +* Fixed: services no longer exit when client disconnects before accept() +* Fixed :issue:`65`: no longer use -Wno-sign-compare when unsupported +* Fixed :issue:`67`: better support for dots in localparts (thanks Jeroen van Meeuwen) +* Fixed: don't assume LIST section options when proxying +* Fixed: SEARCH crash on some platforms +* Fixed: ensure directory hierarchy created when renaming empty mailboxes +* Fixed :issue:`1742`: reconstruct no longer crashes when cache records + are too short +* Fixed :issue:`11`: LIST RETURN options now work properly with virtdomains +* Fixed :issue:`44`: http proxy no longer crashes on starttls (thanks Wolfgang Breyha) +* Fixed :issue:`1752`: no longer crash on notifyd mailto method +* Fixed :issue:`1768`: ensure consistency of CalDav ORGANIZER (thanks Дилян Палаузов) +* Fixed :issue:`368`: SETACL with invalid rights characters now returns BAD +* Fixed :issue:`46`: renames to remote destinations now work correctly +* Fixed :issue:`38`: UTF-8 :subject now supported in sieve vacations +* Fixed :issue:`1872`: no longer crash on bad SSL session ids +* Fixed :issue:`1931`: missing mysql/mariadb dependencies now reported by configure +* Fixed: various memory and resource leaks (thanks Дилян Палаузов)
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/docsrc/imap/release-notes/index.rst -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/docsrc/imap/release-notes/index.rst
Changed
@@ -4,16 +4,22 @@ IMAP Release Notes ================== +This is version 2.5. + Currently Stable Version ======================== -Release notes for stable: |imap_stable_release_notes|. +Latest stable version is |imap_stable_release_notes|. Documentation at :cyrus-stable:`/`. Current Development Version =========================== -Full documentation for development release at :cyrus-dev:`/`. +.. + Latest development version is |imap_development_release_notes|. Documentation at :cyrus-dev:`/`. + +There have not yet been any releases from the current development series. +Documentation is at :cyrus-dev:`/`. Currently Supported Product Series ==================================
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/docsrc/index.rst -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/docsrc/index.rst
Changed
@@ -11,7 +11,7 @@ Cyrus IMAP is an email, contacts and calendar server. -The latest stable version of Cyrus IMAP is |imap_current_stable_version|. Looking for other +This documentation is for version |version|. The latest stable version of Cyrus IMAP is |imap_current_stable_version|. Looking for other :ref:`versions <imap-release-notes>`? Features
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/annotate.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/annotate.c
Changed
@@ -3574,7 +3574,8 @@ ae->attribs = normalise_attribs(&state, i); if (!(p = get_token(&state, NULL))) goto bad; - ae->extra_rights = cyrus_acl_strtomask(p); + cyrus_acl_strtomask(p, &ae->extra_rights); + /* XXX and if strtomask fails? */ p = tok_next(&state.tok); if (p) {
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/backend.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/backend.c
Changed
@@ -500,6 +500,7 @@ char *auth_id = NULL; int *layerp = NULL; int r = 0; + int auto_capa = 0; if (tls_cmd) { char buf2048; @@ -511,6 +512,8 @@ if (!prot_fgets(buf, sizeof(buf), s->in) || strncmp(buf, tls_cmd->ok, strlen(tls_cmd->ok))) return -1; + + auto_capa = tls_cmd->auto_capa; } r = tls_init_clientengine(5, c_cert_file, c_key_file); @@ -533,7 +536,7 @@ prot_settls(s->in, s->tlsconn); prot_settls(s->out, s->tlsconn); - ask_capability(s, /*dobanner*/1, tls_cmd->auto_capa); + ask_capability(s, /*dobanner*/1, auto_capa); return 0; #endif /* HAVE_SSL */
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/caldav_db.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/caldav_db.c
Changed
@@ -929,3 +929,9 @@ return res; } + +EXPORTED void caldav_data_fini(struct caldav_data *cdata) +{ + /* not currently anything malloced */ + memset(cdata, 0, sizeof *cdata); +}
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/caldav_db.h -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/caldav_db.h
Changed
@@ -167,4 +167,7 @@ char *caldav_mboxname(const char *userid, const char *name); +/* release memory used by struct caldav_data */ +void caldav_data_fini(struct caldav_data *cdata); + #endif /* CALDAV_DB_H */
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/carddav_db.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/carddav_db.c
Changed
@@ -669,5 +669,12 @@ strarray_append(&cdata->member_uids, item+9); } } +} +EXPORTED void carddav_data_fini(struct carddav_data *cdata) +{ + if (!cdata) return; + strarray_fini(&cdata->emails); + strarray_fini(&cdata->member_uids); + memset(cdata, 0, sizeof *cdata); }
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/carddav_db.h -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/carddav_db.h
Changed
@@ -122,4 +122,7 @@ /* create carddav_data from vparse_card */ void carddav_make_entry(struct vparse_card *vcard, struct carddav_data *cdata); +/* release memory used by struct carddav_data */ +void carddav_data_fini(struct carddav_data *cdata); + #endif /* CARDDAV_DB_H */
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/cyr_virusscan.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/cyr_virusscan.c
Changed
@@ -58,6 +58,7 @@ #include "imap/imap_err.h" #include "index.h" #include "mailbox.h" +#include "message.h" #include "xmalloc.h" #include "mboxlist.h" #include "prot.h" @@ -78,7 +79,6 @@ struct infected_mbox { char *owner; - uint32_t recno; /* running count of which message we're scanning */ struct infected_msg *msgs; struct infected_mbox *next; }; @@ -95,9 +95,6 @@ struct infected_mbox *public = NULL; struct infected_mbox *user = NULL; -/* current namespace */ -static struct namespace scan_namespace; - int verbose = 1; /* abstract definition of a virus scan engine */ @@ -221,18 +218,16 @@ /* forward declarations */ int usage(char *name); -int scan_me(char *, int, int, void *); +int scan_me(const char *, int, int, void *); unsigned virus_check(struct mailbox *mailbox, - struct index_record *record, + struct index_record *record, void *rock); void append_notifications(); int main (int argc, char *argv) { int option; /* getopt() returns an int */ - char bufMAX_MAILBOX_PATH+1; char *alt_config = NULL; - int r; if ((geteuid()) == 0 && (become_cyrus(/*is_master*/0) != 0)) { fatal("must run as the Cyrus user", EC_USAGE); @@ -267,12 +262,6 @@ engine.state = engine.init(); - /* Set namespace -- force standard (internal) */ - if ((r = mboxname_init_namespace(&scan_namespace, 1)) != 0) { - syslog(LOG_ERR, "%s", error_message(r)); - fatal(error_message(r), EC_CONFIG); - } - mboxlist_init(0); mboxlist_open(NULL); @@ -284,21 +273,12 @@ /* setup for mailbox event notifications */ mboxevent_init(); - mboxevent_setnamespace(&scan_namespace); if (optind == argc) { /* do the whole partition */ - strcpy(buf, "*"); - (*scan_namespace.mboxlist_findall)(&scan_namespace, buf, 1, 0, 0, - scan_me, NULL); + mboxlist_findall(NULL, "*", 1, 0, 0, scan_me, NULL); } else { for (; optind < argc; optind++) { - strncpy(buf, argvoptind, MAX_MAILBOX_BUFFER); - /* Translate any separators in mailboxname */ - mboxname_hiersep_tointernal(&scan_namespace, buf, - config_virtdomains ? - strcspn(buf, "@") : 0); - (*scan_namespace.mboxlist_findall)(&scan_namespace, buf, 1, 0, 0, - scan_me, NULL); + mboxlist_findall(NULL, argvoptind, 1, 0, 0, scan_me, NULL); } } @@ -329,8 +309,7 @@ exit(0); } -/* we don't check what comes in on matchlen and maycreate, should we? */ -int scan_me(char *name, +int scan_me(const char *name, int matchlen __attribute__((unused)), int maycreate __attribute__((unused)), void *rock __attribute__((unused))) @@ -340,34 +319,24 @@ struct infected_mbox *i_mbox = NULL; if (verbose) { - char mboxnameMAX_MAILBOX_BUFFER; - - /* Convert internal name to external */ - (*scan_namespace.mboxname_toexternal)(&scan_namespace, name, - "cyrus", mboxname); - printf("Working on %s...\n", mboxname); + printf("Working on %s...\n", name); } r = mailbox_open_iwl(name, &mailbox); - if (r) { /* did we find it? */ - syslog(LOG_ERR, "Couldn't find %s, check spelling", name); + if (r) { + printf("failed to open %s (%s)\n", name, error_message(r)); return 0; } if (notify) { - /* XXX Need to handle virtdomains */ - if (!strncmp(name, "user.", 5)) { - size_t ownerlen; - - if (user && (ownerlen = strlen(user->owner)) && - !strncmp(name, user->owner, ownerlen) && - (nameownerlen == '.' || nameownerlen =='\0')) { - /* mailbox belongs to current owner */ + const char *owner = mboxname_to_userid(name); + if (owner) { + if (!strcmp(owner, user->owner)) { i_mbox = user; } else { /* new owner (Inbox) */ struct infected_mbox *new = xzmalloc(sizeof(struct infected_mbox)); - new->owner = xstrdup(name); + new->owner = xstrdup(owner); new->next = user; i_mbox = user = new; } @@ -382,8 +351,6 @@ i_mbox = public; } #endif - - if (i_mbox) i_mbox->recno = 1; } mailbox_expunge(mailbox, virus_check, i_mbox, NULL, EVENT_MESSAGE_EXPUNGE); @@ -392,22 +359,19 @@ return 0; } -void create_digest(struct infected_mbox *i_mbox, struct mailbox *mbox, - uint32_t recno, unsigned long uid, const char *virname) +void create_digest(struct infected_mbox *i_mbox, struct mailbox *mailbox, + struct index_record *record, const char *virname) { - struct infected_msg *i_msg = xmalloc(sizeof(struct infected_msg)); - struct nntp_overview *over; + struct infected_msg *i_msg = xzmalloc(sizeof(struct infected_msg)); - i_msg->mboxname = xstrdup(mbox->name); + i_msg->mboxname = xstrdup(mailbox->name); i_msg->virname = xstrdup(virname); - i_msg->uid= uid; + i_msg->uid = record->uid; - index_operatemailbox(mbox); - over = index_overview(mbox, recno); - i_msg->msgid = strdup(over->msgid); - i_msg->date = strdup(over->date); - i_msg->from = strdup(over->from); - i_msg->subj = strdup(over->subj); + i_msg->msgid = mailbox_cache_get_env(mailbox, record, ENV_MSGID); + i_msg->date = mailbox_cache_get_env(mailbox, record, ENV_DATE); + i_msg->from = mailbox_cache_get_env(mailbox, record, ENV_FROM); + i_msg->subj = mailbox_cache_get_env(mailbox, record, ENV_SUBJECT); i_msg->next = i_mbox->msgs; i_mbox->msgs = i_msg; @@ -416,7 +380,7 @@ /* thumbs up routine, checks for virus and returns yes or no for deletion */ /* 0 = no, 1 = yes */ unsigned virus_check(struct mailbox *mailbox, - struct index_record *record, + struct index_record *record, void *deciderock) { struct infected_mbox *i_mbox = (struct infected_mbox *) deciderock; @@ -428,17 +392,15 @@ if ((r = engine.scanfile(engine.state, fname, &virname))) { if (verbose) { - printf("Virus detected in message %lu: %s\n", record->uid, virname); + printf("Virus detected in message %u: %s\n", record->uid, virname); } if (disinfect) { if (notify && i_mbox) { - create_digest(i_mbox, mailbox, i_mbox->recno, record->uid, virname); + create_digest(i_mbox, mailbox, record, virname); } } }
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/global.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/global.c
Changed
@@ -229,8 +229,9 @@ config_fulldirhash = config_getswitch(IMAPOPT_FULLDIRHASH); /* look up and canonify the implicit rights of mailbox owners */ - config_implicitrights = - cyrus_acl_strtomask(config_getstring(IMAPOPT_IMPLICIT_OWNER_RIGHTS)); + cyrus_acl_strtomask(config_getstring(IMAPOPT_IMPLICIT_OWNER_RIGHTS), + &config_implicitrights); + /* XXX and if strtomask fails? */ config_metapartition_files = config_getbitfield(IMAPOPT_METAPARTITION_FILES);
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/http_caldav.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/http_caldav.c
Changed
@@ -362,7 +362,7 @@ struct caldav_db *caldavdb, int overwrite, unsigned flags); -static void sched_request(const char *organizer, struct sched_param *sparam, +static void sched_request(const char *organizer, struct caldav_sched_param *sparam, icalcomponent *oldical, icalcomponent *newical, const char *att_update); static void sched_reply(const char *userid, @@ -563,6 +563,7 @@ { (db_open_proc_t) &my_caldav_open, (db_close_proc_t) &my_caldav_close, (db_lookup_proc_t) &caldav_lookup_resource, + (db_release_proc_t) &caldav_data_fini, (db_foreach_proc_t) &caldav_foreach, (db_write_proc_t) &caldav_write, (db_delete_proc_t) &caldav_delete, @@ -724,7 +725,7 @@ static void my_caldav_auth(const char *userid) { - const char *mailboxname; + char *mailboxname; int r; /* Generate mailboxname of calendar-home-set */ @@ -752,10 +753,12 @@ if (r == IMAP_MAILBOX_NONEXISTENT) { if (config_mupdate_server) { /* Find location of INBOX */ - const char *inboxname = mboxname_user_mbox(userid, NULL); + char *inboxname = mboxname_user_mbox(userid, NULL); mbentry_t *mbentry = NULL; r = http_mlookup(inboxname, &mbentry, NULL); + free(inboxname); + if (!r && mbentry->server) { proxy_findserver(mbentry->server, &http_protocol, proxy_userid, &backend_cached, NULL, NULL, httpd_in); @@ -767,6 +770,7 @@ else r = 0; /* will have been overwritten */ + free(mailboxname); mailboxname = caldav_mboxname(userid, NULL); /* Create locally */ @@ -777,6 +781,7 @@ if (r) syslog(LOG_ERR, "IOERROR: failed to create %s (%s)", mailboxname, error_message(r)); } + free(mailboxname); /* Default calendar */ mailboxname = caldav_mboxname(userid, SCHED_DEFAULT); @@ -789,6 +794,7 @@ if (r) syslog(LOG_ERR, "IOERROR: failed to create %s (%s)", mailboxname, error_message(r)); } + free(mailboxname); /* Scheduling Inbox */ mailboxname = caldav_mboxname(userid, SCHED_INBOX); @@ -801,6 +807,7 @@ if (r) syslog(LOG_ERR, "IOERROR: failed to create %s (%s)", mailboxname, error_message(r)); } + free(mailboxname); /* Scheduling Outbox */ mailboxname = caldav_mboxname(userid, SCHED_OUTBOX); @@ -813,6 +820,7 @@ if (r) syslog(LOG_ERR, "IOERROR: failed to create %s (%s)", mailboxname, error_message(r)); } + free(mailboxname); } @@ -946,10 +954,11 @@ buf_putc(&boxbuf, '.'); buf_appendmap(&boxbuf, tgt->collection, tgt->collen); } - parts.box = buf_release(&boxbuf); + parts.box = buf_release(&boxbuf); /* tricky, we now need to free parts.box separately */ mboxname_parts_to_internal(&parts, tgt->mboxname); + free((char *) parts.box); /* n.b. casting away constness */ mboxname_free_parts(&parts); return 0; @@ -1154,7 +1163,7 @@ const char *userid, *organizer, **hdr; icalcomponent *ical, *comp; icalproperty *prop; - struct sched_param sparam; + struct caldav_sched_param sparam; /* Load message containing the resource and parse iCal data */ ical = record_to_ical(mailbox, record); @@ -2441,7 +2450,7 @@ icalproperty_method meth = 0; icalproperty *prop = NULL; const char *uid = NULL, *organizer = NULL; - struct sched_param sparam; + struct caldav_sched_param sparam; if (!(namespace_calendar.allow & ALLOW_CAL_SCHED) || !txn->req_tgt.flags) { /* POST to regular calendar collection */ @@ -2699,17 +2708,16 @@ goto done; } - if (organizer) { - const char *nextorg = NULL; + const char *nextorg = NULL; - prop = icalcomponent_get_first_property(nextcomp, - ICAL_ORGANIZER_PROPERTY); - if (prop) nextorg = icalproperty_get_organizer(prop); - if (!nextorg || strcmp(organizer, nextorg)) { - txn->error.precond = CALDAV_SAME_ORGANIZER; - ret = HTTP_FORBIDDEN; - goto done; - } + prop = icalcomponent_get_first_property(nextcomp, + ICAL_ORGANIZER_PROPERTY); + if (prop) nextorg = icalproperty_get_organizer(prop); + if ( (!organizer && nextorg) + || (organizer && (!nextorg || strcmp(organizer, nextorg)))) { + txn->error.precond = CALDAV_SAME_ORGANIZER; + ret = HTTP_FORBIDDEN; + goto done; } } @@ -2726,7 +2734,7 @@ /* Scheduling object resource */ const char *userid; struct caldav_data *cdata; - struct sched_param sparam; + struct caldav_sched_param sparam; icalcomponent *oldical = NULL; int r; @@ -4390,6 +4398,7 @@ fctx->open_db = (db_open_proc_t) &my_caldav_open; fctx->close_db = (db_close_proc_t) &my_caldav_close; fctx->lookup_resource = (db_lookup_proc_t) &caldav_lookup_resource; + fctx->release_resource = (db_release_proc_t) &caldav_data_fini; fctx->foreach_resource = (db_foreach_proc_t) &caldav_foreach; fctx->proc_by_resource = &propfind_by_resource; @@ -4848,6 +4857,7 @@ fctx->open_db = (db_open_proc_t) &my_caldav_open; fctx->close_db = (db_close_proc_t) &my_caldav_close; fctx->lookup_resource = (db_lookup_proc_t) &caldav_lookup_resource; + fctx->release_resource = (db_release_proc_t) &caldav_data_fini; fctx->foreach_resource = (db_foreach_proc_t) &caldav_foreach; fctx->proc_by_resource = &busytime_by_resource; @@ -5359,12 +5369,12 @@ } -int caladdress_lookup(const char *addr, struct sched_param *param) +int caladdress_lookup(const char *addr, struct caldav_sched_param *param) { const char *userid = addr; int islocal = 1, found = 1; - memset(param, 0, sizeof(struct sched_param)); + memset(param, 0, sizeof(struct caldav_sched_param)); if (!addr) return HTTP_NOT_FOUND; @@ -5388,6 +5398,7 @@ mboxname_userid_to_parts(userid, &parts); parts.box = xstrdupnull(config_getstring(IMAPOPT_CALENDARPREFIX)); mboxname_parts_to_internal(&parts, mailboxname); + free((char *) parts.box); /* n.b. casting away constness */ mboxname_free_parts(&parts); r = http_mlookup(mailboxname, &mbentry, NULL); @@ -5571,7 +5582,7 @@ static void busytime_query_remote(const char *server __attribute__((unused)), void *data, void *rock) { - struct sched_param *remote = (struct sched_param *) data; + struct caldav_sched_param *remote = (struct caldav_sched_param *) data; struct remote_rock *rrock = (struct remote_rock *) rock; icalcomponent *comp; struct proplist *list; @@ -5675,7 +5686,7 @@ static void free_sched_param(void *data) { - struct sched_param *sched_param = (struct sched_param *) data;
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/http_caldav_sched.h -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/http_caldav_sched.h
Changed
@@ -109,7 +109,7 @@ }; /* Each calendar user address has the following scheduling protocol params */ -struct sched_param { +struct caldav_sched_param { char *userid; /* Userid corresponding to calendar address */ char *server; /* Remote server user lives on */ unsigned port; /* Remote server port, default = 80 */ @@ -119,7 +119,7 @@ extern icalarray *rscale_calendars; extern const char *get_icalcomponent_errstr(icalcomponent *ical); -extern int isched_send(struct sched_param *sparam, const char *recipient, +extern int isched_send(struct caldav_sched_param *sparam, const char *recipient, icalcomponent *ical, xmlNodePtr *xml); extern int sched_busytime_query(struct transaction_t *txn, @@ -127,6 +127,6 @@ extern void sched_deliver(const char *recipient, void *data, void *rock); extern xmlNodePtr xml_add_schedresponse(xmlNodePtr root, xmlNsPtr dav_ns, xmlChar *recipient, xmlChar *status); -extern int caladdress_lookup(const char *addr, struct sched_param *param); +extern int caladdress_lookup(const char *addr, struct caldav_sched_param *param); #endif /* HTTP_CALDAV_SCHED_H */
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/http_carddav.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/http_carddav.c
Changed
@@ -269,6 +269,7 @@ { (db_open_proc_t) &my_carddav_open, (db_close_proc_t) &my_carddav_close, (db_lookup_proc_t) &carddav_lookup_resource, + (db_release_proc_t) &carddav_data_fini, (db_foreach_proc_t) &carddav_foreach, (db_write_proc_t) &carddav_write, (db_delete_proc_t) &carddav_delete, @@ -363,9 +364,7 @@ { int r; struct buf boxbuf = BUF_INITIALIZER; - const char *mailboxname; - - mailboxname = mboxname_user_mbox(userid, NULL); + char *mailboxname; if (httpd_userisadmin || global_authisa(httpd_authstate, IMAPOPT_PROXYSERVERS)) { @@ -391,10 +390,12 @@ if (r == IMAP_MAILBOX_NONEXISTENT) { if (config_mupdate_server) { /* Find location of INBOX */ - const char *inboxname = mboxname_user_mbox(userid, NULL); + char *inboxname = mboxname_user_mbox(userid, NULL); mbentry_t *mbentry = NULL; r = http_mlookup(inboxname, &mbentry, NULL); + free(inboxname); + if (!r && mbentry->server) { proxy_findserver(mbentry->server, &http_protocol, proxy_userid, &backend_cached, NULL, NULL, httpd_in); @@ -405,6 +406,8 @@ } else r = 0; + /* will have been overwritten */ + free(mailboxname); mailboxname = mboxname_user_mbox(userid, buf_cstring(&boxbuf)); /* XXX - set rights */ @@ -415,12 +418,14 @@ if (r) syslog(LOG_ERR, "IOERROR: failed to create %s (%s)", mailboxname, error_message(r)); } + free(mailboxname); if (r) return; /* Default addressbook */ buf_setcstr(&boxbuf, config_getstring(IMAPOPT_ADDRESSBOOKPREFIX)); buf_printf(&boxbuf, ".%s", DEFAULT_ADDRBOOK); mailboxname = mboxname_user_mbox(userid, buf_cstring(&boxbuf)); + buf_free(&boxbuf); r = mboxlist_lookup(mailboxname, NULL, NULL); if (r == IMAP_MAILBOX_NONEXISTENT) { /* XXX - set rights */ @@ -431,6 +436,7 @@ if (r) syslog(LOG_ERR, "IOERROR: failed to create %s (%s)", mailboxname, error_message(r)); } + free(mailboxname); } @@ -551,10 +557,11 @@ buf_putc(&boxbuf, '.'); buf_appendmap(&boxbuf, tgt->collection, tgt->collen); } - parts.box = buf_release(&boxbuf); + parts.box = buf_release(&boxbuf); /* tricky, we now need to free parts.box separately */ mboxname_parts_to_internal(&parts, tgt->mboxname); + free((char *) parts.box); /* n.b. casting away constness */ mboxname_free_parts(&parts); return 0; @@ -830,6 +837,7 @@ fctx->open_db = (db_open_proc_t) &my_carddav_open; fctx->close_db = (db_close_proc_t) &my_carddav_close; fctx->lookup_resource = (db_lookup_proc_t) &carddav_lookup_resource; + fctx->release_resource = (db_release_proc_t) &carddav_data_fini; fctx->foreach_resource = (db_foreach_proc_t) &carddav_foreach; fctx->proc_by_resource = &propfind_by_resource; @@ -932,6 +940,8 @@ propfind_by_resource(fctx, cdata); + carddav_data_fini(cdata); + my_carddav_close(fctx->davdb); } } @@ -1153,5 +1163,6 @@ append_removestage(stage); done: + carddav_data_fini(cdata); return ret; }
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/http_dav.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/http_dav.c
Changed
@@ -1596,7 +1596,8 @@ userid++; } - rights = cyrus_acl_strtomask(rightstr); + cyrus_acl_strtomask(rightstr, &rights); + /* XXX and if strtomask fails? */ /* Add ace XML element for this userid/right pair */ ace = xmlNewChild(acl, NULL, BAD_CAST "ace", NULL); @@ -2003,15 +2004,19 @@ buf_cstring(&fctx->buf), httpd_userid, &attrib); done: - if (r) return HTTP_SERVER_ERROR; - if (!buf_len(&attrib)) return HTTP_NOT_FOUND; + if (r) r = HTTP_SERVER_ERROR; + else if (!buf_len(&attrib)) r = HTTP_NOT_FOUND; - node = xml_add_prop(HTTP_OK, fctx->nsNS_DAV, &propstatPROPSTAT_OK, - name, ns, NULL, 0); - xmlAddChild(node, xmlNewCDataBlock(fctx->root->doc, - BAD_CAST buf_cstring(&attrib), buf_len(&attrib))); + if (!r) { + node = xml_add_prop(HTTP_OK, fctx->nsNS_DAV, &propstatPROPSTAT_OK, + name, ns, NULL, 0); + xmlAddChild(node, xmlNewCDataBlock(fctx->root->doc, + BAD_CAST buf_cstring(&attrib), + buf_len(&attrib))); + } - return 0; + buf_free(&attrib); + return r; } @@ -2050,6 +2055,7 @@ name, ns, NULL, 0); xmlAddChild(node, xmlNewCDataBlock(fctx->root->doc, BAD_CAST buf_cstring(&attrib), buf_len(&attrib))); + buf_free(&attrib); return 0; } @@ -2990,6 +2996,7 @@ } overwrite = OVERWRITE_NO; } + cparams->davdb.release_resource(ddata); /* Open source mailbox for reading */ r = mailbox_open_irl(txn->req_tgt.mboxname, &src_mbox); @@ -3047,6 +3054,8 @@ goto done; } + cparams->davdb.release_resource(ddata); + if (get_preferences(txn) & PREFER_REP) flags |= PREFER_REP; if ((txn->meth == METH_MOVE) && (dest_mbox == src_mbox)) flags |= NO_DUP_CHECK; @@ -3095,6 +3104,8 @@ } done: + cparams->davdb.release_resource(ddata); + if (ret == HTTP_CREATED) { /* Tell client where to find the new resource */ txn->location = dest_tgt.path; @@ -4091,6 +4102,8 @@ /* XXX Check errors */ r = fctx->proc_by_resource(rock, data); + + fctx->release_resource(data); } else { /* Add responses for all contained resources */ @@ -4299,6 +4312,7 @@ fctx.open_db = fparams->davdb.open_db; fctx.close_db = fparams->davdb.close_db; fctx.lookup_resource = fparams->davdb.lookup_resource; + fctx.release_resource = fparams->davdb.release_resource; fctx.foreach_resource = fparams->davdb.foreach_resource; fctx.proc_by_resource = &propfind_by_resource; fctx.elist = NULL;
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/http_dav.h -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/http_dav.h
Changed
@@ -247,6 +247,9 @@ typedef int (*db_lookup_proc_t)(void *davdb, const char *mailbox, const char *resource, int lock, void **data); +/* Function to release previously lookup'd DAV resource record */ +typedef void (*db_release_proc_t)(void *data); + /* Function to process each DAV resource in 'mailbox' with 'cb' */ typedef int (*db_foreach_proc_t)(void *davdb, const char *mailbox, int (*cb)(void *rock, void *data), void *rock); @@ -278,6 +281,7 @@ db_open_proc_t open_db; /* open DAV DB for a given mailbox */ db_close_proc_t close_db; /* close DAV DB for a given mailbox */ db_lookup_proc_t lookup_resource; /* lookup a specific resource */ + db_release_proc_t release_resource; /* release a lookup'd resource */ db_foreach_proc_t foreach_resource; /* process all resources in a mailbox */ int (*proc_by_resource)(void *rock, /* Callback to process a resource */ void *data); @@ -373,6 +377,7 @@ db_open_proc_t open_db; /* open DAV DB for a given mailbox */ db_close_proc_t close_db; /* close DAV DB for a given mailbox */ db_lookup_proc_t lookup_resource; /* lookup a specific resource */ + db_release_proc_t release_resource; /* release the resource when done with it */ db_foreach_proc_t foreach_resource; /* process all resources in a mailbox */ db_write_proc_t write_resource; /* write a specific resource */ db_delete_proc_t delete_resource; /* delete a specific resource */
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/http_ischedule.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/http_ischedule.c
Changed
@@ -540,7 +540,7 @@ while ((recipient = tok_next(&tok))) { /* Is recipient remote or local? */ - struct sched_param sparam; + struct caldav_sched_param sparam; int r = caladdress_lookup(recipient, &sparam); /* Don't allow scheduling with remote users via iSchedule */ @@ -583,7 +583,7 @@ } -int isched_send(struct sched_param *sparam, const char *recipient, +int isched_send(struct caldav_sched_param *sparam, const char *recipient, icalcomponent *ical, xmlNodePtr *xml) { int r = 0;
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/httpd.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/httpd.c
Changed
@@ -2792,7 +2792,8 @@ if (!proxy_userid || strcmp(proxy_userid, httpd_userid)) { /* Close existing telemetry log */ - close(httpd_logfd); + if (httpd_logfd != -1) + close(httpd_logfd); prot_setlog(httpd_in, PROT_NO_FD); prot_setlog(httpd_out, PROT_NO_FD);
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/imap_err.et -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/imap_err.et
Changed
@@ -113,6 +113,9 @@ ec IMAP_INVALID_IDENTIFIER, "Invalid identifier" +ec IMAP_INVALID_RIGHTS, + "Invalid rights" + ec IMAP_MESSAGE_CONTAINSNULL, "Message contains NUL characters"
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/imapd.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/imapd.c
Changed
@@ -259,6 +259,14 @@ struct listargs *listargs; char *last_name; int last_attributes; + int (*findall)(struct namespace *namespace, + const char *pattern, int isadmin, const char *userid, + struct auth_state *auth_state, int (*proc)(), + void *rock); + int (*findsub)(struct namespace *namespace, + const char *pattern, int isadmin, const char *userid, + struct auth_state *auth_state, int (*proc)(), + void *rock, int force); }; /* Information about one mailbox name that LIST returns */ @@ -2737,9 +2745,7 @@ /* check if we've already had an ID in non-authenticated state */ if (!imapd_userid && imapd_id.did_id) { - prot_printf(imapd_out, - "%s NO Only one Id allowed in non-authenticated state\r\n", - tag); + prot_printf(imapd_out, "%s OK NIL\r\n", tag); eatline(imapd_in, c); return; } @@ -6036,6 +6042,13 @@ return; } + if (location && strcmp(oldname, newname)) { + prot_printf(imapd_out, + "%s NO Cross-server or cross-partition move w/rename not supported\r\n", + tag); + return; + } + /* canonicalize names */ r = (*imapd_namespace.mboxname_tointernal)( &imapd_namespace, @@ -6088,38 +6101,40 @@ char *destserver = NULL; char *destpart = NULL; - destserver = xstrdupnull(location); c = strchr(location, '!'); if (c) { - *c++ = '\0'; - destpart = xstrdupnull(c); + destserver = xstrndup(location, c - location); + destpart = xstrdup(c + 1); } else { destpart = xstrdup(location); - free(destserver); } - if (destserver) { - if (destpart && !strcmp(destserver,config_servername)) { - // XFER - prot_printf(s->out, - "%s XFER \"%s\" \"%s\" %s\r\n", - tag, - oldname, - newname, - location - ); + if (*destpart == '\0') { + free(destpart); + destpart = NULL; + } - } else { - // RENAME - prot_printf(s->out, + if (!destserver || !strcmp(destserver, mbentry->server)) { + /* same server: proxy a rename */ + prot_printf(s->out, "%s RENAME \"%s\" \"%s\" %s\r\n", tag, oldname, newname, - location - ); - } - } // (destserver) + location); + } else { + /* different server: proxy an xfer */ + prot_printf(s->out, + "%s XFER \"%s\" %s%s%s\r\n", + tag, + oldname, + destserver, + destpart ? " " : "", + destpart ? destpart : ""); + } + + if (destserver) free(destserver); + if (destpart) free(destpart); res = pipe_until_tag(s, tag, 0); @@ -6166,20 +6181,14 @@ if (location && !config_partitiondir(location)) { /* invalid partition, assume its a server (remote destination) */ char *server; - - if (strcmp(oldname, newname)) { - prot_printf(imapd_out, - "%s NO Cross-server or cross-partition move w/rename not supported\r\n", - tag); - goto done; - } + char *partition; /* dest partition? */ server = location; - location = strchr(server, '!'); - if (location) *location++ = '\0'; + partition = strchr(location, '!'); + if (partition) *partition++ = '\0'; - cmd_xfer(tag, oldname, server, location); + cmd_xfer(tag, oldname, server, partition); goto done; } @@ -7083,6 +7092,18 @@ /* local mailbox */ if (!r) { + char *err; + + /* send BAD response if rights string contains unrecognised chars */ + if (rights && *rights) { + r = cyrus_acl_checkstr(rights, &err); + if (r) { + prot_printf(imapd_out, "%s BAD %s\r\n", tag, err); + free(err); + return; + } + } + r = mboxlist_setacl(&imapd_namespace, mailboxname, identifier, rights, imapd_userisadmin || imapd_userisproxyadmin, proxy_userid, imapd_authstate); @@ -10179,6 +10200,8 @@ // Note that the mailbox name needs to be sent as an atom in order to // prevent having to escape space characters. + config_defpartition = config_getstring(IMAPOPT_DEFAULTPARTITION); + for (item = xfer->items; item; item = item->next) { // The target partition has been specified explicitly. if (xfer->topart) { @@ -11253,6 +11276,7 @@ freestrlist(s->cc); freestrlist(s->bcc); freestrlist(s->subject); + freestrlist(s->messageid); freestrlist(s->body); freestrlist(s->text); freestrlist(s->header_name); @@ -11656,10 +11680,19 @@ rock->last_attributes |= MBOX_ATTRIBUTE_HASCHILDREN; /* XXX: is there a cheaper way to figure out \Subscribed? */ - if (rock->listargs->ret & LIST_RET_SUBSCRIBED) - mboxlist_findsub(&imapd_namespace, name, imapd_userisadmin, - imapd_userid, imapd_authstate, set_subscribed, - &rock->last_attributes, 0); + if (rock->listargs->ret & LIST_RET_SUBSCRIBED) { + char namebufMAX_MAILBOX_PATH = {0}; + + /* XXX mboxlist_findsub and mboxlist_findsub_alt need input that uses + * internal namespace separator, but external namespace names + */ + (*imapd_namespace.mboxname_toexternal)(&imapd_namespace, name, imapd_userid, namebuf); + mboxname_hiersep_tointernal(&imapd_namespace, namebuf, strlen(namebuf)); + + rock->findsub(&imapd_namespace, namebuf, imapd_userisadmin, + imapd_userid, imapd_authstate, set_subscribed, + &rock->last_attributes, 0); + } return 0; } @@ -11881,6 +11914,8 @@ struct list_rock rock; memset(&rock, 0, sizeof(struct list_rock)); rock.listargs = listargs; + rock.findall = findall; + rock.findsub = findsub; if (listargs->sel & LIST_SEL_SUBSCRIBED) { for (pattern = listargs->pat.data ; pattern && *pattern ; pattern++) {
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/index.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/index.c
Changed
@@ -1076,6 +1076,11 @@ im = &state->mapmsgno-1; if (seq && !seqset_ismember(seq, usinguid ? im->uid : msgno)) continue; + /* if we haven't told exists and we're fetching something past the end of the + * old size, we need to tell exists now... + * https://github.com/cyrusimap/cyrus-imapd/issues/1967 + */ + if (msgno > state->oldexists) index_tellexists(state); if (index_fetchreply(state, msgno, fetchargs)) break; fetched = 1; @@ -2784,6 +2789,10 @@ uint32_t msgno; struct index_map *im; + /* must call tellexpunge before tellexists, because tellexpunge changes + * the size of oldexists to mention expunges, and tellexists will reset + * oldexists. If we do these out of order, we will tell the user about + * expunges of messages they never saw, which would be wrong */ if (canexpunge) index_tellexpunge(state); if (state->oldexists != state->exists) index_tellexists(state); @@ -5613,7 +5622,7 @@ if (index_reload_record(state, msgno, &record)) return NULL; - return mailbox_cache_get_msgid(mailbox, &record); + return mailbox_cache_get_env(mailbox, &record, ENV_MSGID); } static void massage_header(char *hdr)
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/lmtp_sieve.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/lmtp_sieve.c
Changed
@@ -170,7 +170,7 @@ sieve_bodypart_t as defined in sieve_interface.h, so we can typecast */ if (!r) message_fetch_part(mydata->content, content_types, (struct bodypart ***) parts); - return (!r ? SIEVE_OK : SIEVE_FAIL); + return r ? SIEVE_FAIL : SIEVE_OK; } @@ -635,7 +635,7 @@ { FILE *sm; const char *smbuf10; - char outmsgid8192, *sievedb; + char outmsgid8192, *sievedb, *subj; int i, sl, sm_stat; time_t t; char datestrRFC822_DATETIME_MAX+1; @@ -678,7 +678,9 @@ src->subji = '\0'; break; } - fprintf(sm, "Subject: %s\r\n", charset_encode_mimeheader(src->subj, strlen(src->subj))); + subj = charset_encode_mimeheader(src->subj, strlen(src->subj)); + fprintf(sm, "Subject: %s\r\n", subj); + free(subj); if (md->id) fprintf(sm, "In-Reply-To: %s\r\n", md->id); fprintf(sm, "Auto-Submitted: auto-replied (vacation)\r\n"); fprintf(sm, "MIME-Version: 1.0\r\n");
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/mailbox.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/mailbox.c
Changed
@@ -429,14 +429,25 @@ offset = cache_offset; - if (offset >= cachebase->len) { - syslog(LOG_ERR, "IOERROR: offset greater than cache size %lu %lu", - offset, cachebase->len); - return IMAP_IOERROR; - } - for (cache_ent = 0; cache_ent < NUM_CACHE_FIELDS; cache_ent++) { cacheitem = cachebase->s + offset; + + /* bounds checking */ + if (offset >= cachebase->len) { + syslog(LOG_ERR, "IOERROR: offset greater than cache size " + SIZE_T_FMT " " SIZE_T_FMT "(%d)", + offset, cachebase->len, cache_ent); + return IMAP_IOERROR; + } + + if (offset + CACHE_ITEM_SIZE_SKIP + CACHE_ITEM_LEN(cacheitem) > cachebase->len) { + syslog(LOG_ERR, "IOERROR: cache entry truncated " + SIZE_T_FMT " %u " SIZE_T_FMT "(%d)", + offset, CACHE_ITEM_LEN(cacheitem), + cachebase->len, cache_ent); + return IMAP_IOERROR; + } + /* copy locations */ crec->itemcache_ent.len = CACHE_ITEM_LEN(cacheitem); crec->itemcache_ent.offset = offset + CACHE_ITEM_SIZE_SKIP; @@ -449,12 +460,6 @@ } offset = next - cachebase->s; - if (offset > cachebase->len) { - syslog(LOG_ERR, "IOERROR: offset greater than cache size " - SIZE_T_FMT " " SIZE_T_FMT "(%d)", - offset, cachebase->len, cache_ent); - return IMAP_IOERROR; - } } /* all fit within the cache, it's gold as far as we can tell */ @@ -465,12 +470,13 @@ return 0; } -char *mailbox_cache_get_msgid(struct mailbox *mailbox, - struct index_record *record) +EXPORTED char *mailbox_cache_get_env(struct mailbox *mailbox, + struct index_record *record, + int token) { char *env; char *envtokensNUMENVTOKENS; - char *msgid; + char *field; if (mailbox_cacherecord(mailbox, record)) return NULL; @@ -478,7 +484,7 @@ if (cacheitem_size(record, CACHE_ENVELOPE) <= 2) return NULL; - /* get msgid out of the envelope + /* get field out of the envelope * * get a working copy; strip outer ()'s * +1 -> skip the leading paren @@ -488,12 +494,12 @@ cacheitem_size(record, CACHE_ENVELOPE) - 2); parse_cached_envelope(env, envtokens, VECTOR_SIZE(envtokens)); - msgid = envtokensENV_MSGID ? xstrdup(envtokensENV_MSGID) : NULL; + field = xstrdupnull(envtokenstoken); /* free stuff */ free(env); - return msgid; + return field; } HIDDEN int mailbox_ensure_cache(struct mailbox *mailbox, size_t len) @@ -2564,10 +2570,13 @@ r = carddav_write(carddavdb, cdata, 0); + carddav_data_fini(cdata); + vparse_free(&vparser); } done: + carddav_data_fini(cdata); message_free_body(body); free(body); @@ -2659,6 +2668,7 @@ } done: + caldav_data_fini(cdata); message_free_body(body); free(body);
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/mailbox.h -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/mailbox.h
Changed
@@ -456,8 +456,9 @@ int cache_append_record(int fd, struct index_record *record); int mailbox_append_cache(struct mailbox *mailbox, struct index_record *record); -char *mailbox_cache_get_msgid(struct mailbox *mailbox, - struct index_record *record); +char *mailbox_cache_get_env(struct mailbox *mailbox, + struct index_record *record, + int field); /* field-based lookup functions */ const char *cacheitem_base(struct index_record *record, int field);
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/mboxevent.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/mboxevent.c
Changed
@@ -732,7 +732,7 @@ /* add Message-Id to midset or NIL if doesn't exists */ if (mboxevent_expected_param(event->type, (EVENT_MIDSET))) { - msgid = mailbox_cache_get_msgid(mailbox, record); + msgid = mailbox_cache_get_env(mailbox, record, ENV_MSGID); strarray_add(&event->midset, msgid ? msgid : "NIL"); if (msgid) @@ -787,6 +787,7 @@ carddavdb = carddav_open_mailbox(mailbox, 0); carddav_lookup_resource(carddavdb, mailbox->name, resource, 0, &cdata); FILL_STRING_PARAM(event, EVENT_DAV_UID, xstrdup(cdata->vcard_uid)); + carddav_data_fini(cdata); carddav_close(carddavdb); } if (mailbox->mbtype & MBTYPE_CALENDAR) { @@ -795,6 +796,7 @@ caldavdb = caldav_open_mailbox(mailbox, 0); caldav_lookup_resource(caldavdb, mailbox->name, resource, 0, &cdata); FILL_STRING_PARAM(event, EVENT_DAV_UID, xstrdup(cdata->ical_uid)); + caldav_data_fini(cdata); caldav_close(caldavdb); } }
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/mboxlist.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/mboxlist.c
Changed
@@ -731,6 +731,7 @@ mbentry_t *mbentry = NULL; const char *owner; int r; + int mask; char *defaultacl; char *identifier; @@ -775,7 +776,9 @@ p = rights; while (*p && !Uisspace(*p)) p++; if (*p) *p++ = '\0'; - cyrus_acl_set(out, identifier, ACL_MODE_SET, cyrus_acl_strtomask(rights), + cyrus_acl_strtomask(rights, &mask); + /* XXX and if strtomask fails? */ + cyrus_acl_set(out, identifier, ACL_MODE_SET, mask, (cyrus_acl_canonproc_t *)0, (void *)0); identifier = p; } @@ -1666,8 +1669,10 @@ * Check if the admin rights are present in the 'rights' */ static int mboxlist_have_admin_rights(const char* rights) { - int access = cyrus_acl_strtomask(rights); - int have_admin_access = access & ACL_ADMIN; + int access, have_admin_access; + + cyrus_acl_strtomask(rights, &access); + have_admin_access = access & ACL_ADMIN; return have_admin_access; } @@ -1704,6 +1709,7 @@ int isidentifiermbox = 0; int anyoneuseracl = 1; int ensure_owner_rights = 0; + int mask; const char *mailbox_owner = NULL; struct mailbox *mailbox = NULL; char *newacl = NULL; @@ -1854,10 +1860,11 @@ } } - if (cyrus_acl_set(&newacl, identifier, mode, - cyrus_acl_strtomask(rights), - ensure_owner_rights ? mboxlist_ensureOwnerRights : 0, - (void *)mailbox_owner)) { + r = cyrus_acl_strtomask(rights, &mask); + + if (!r && cyrus_acl_set(&newacl, identifier, mode, mask, + ensure_owner_rights ? mboxlist_ensureOwnerRights : 0, + (void *)mailbox_owner)) { r = IMAP_INVALID_IDENTIFIER; } } else {
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/statuscache_db.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/statuscache_db.c
Changed
@@ -244,6 +244,7 @@ } } + seqset_free(seq); /* we've calculated the correct values for both */ c_statusitems |= STATUS_RECENT | STATUS_UNSEEN; }
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/imap/tls.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/imap/tls.c
Changed
@@ -518,11 +518,13 @@ /* store the session in our database */ session_id = SSL_SESSION_get_id(sess, &session_id_length); - do { - ret = cyrusdb_store(sessdb, (const char *) session_id, - session_id_length, - (const char *) data, len + sizeof(time_t), NULL); - } while (ret == CYRUSDB_AGAIN); + if (session_id_length) { + do { + ret = cyrusdb_store(sessdb, (const char *) session_id, + session_id_length, + (const char *) data, len + sizeof(time_t), NULL); + } while (ret == CYRUSDB_AGAIN); + } } free(data); @@ -551,6 +553,7 @@ assert(id); assert(idlen <= SSL_MAX_SSL_SESSION_ID_LENGTH); + if (!idlen) return; if (!sess_dbopen) return; do { @@ -882,7 +885,8 @@ #if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) /* Load DH params for DHE-* key exchanges */ - SSL_CTX_set_tmp_dh(s_ctx, load_dh_param(server_key_file, server_cert_file)); + DH* dh_freeme = load_dh_param(server_key_file, server_cert_file); + SSL_CTX_set_tmp_dh(s_ctx, dh_freeme); #endif #if (OPENSSL_VERSION_NUMBER >= 0x1000103fL) @@ -985,6 +989,9 @@ } tls_serverengine = 1; +#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) + DH_free(dh_freeme); +#endif return (0); }
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/lib/acl.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/lib/acl.c
Changed
@@ -47,20 +47,62 @@ #include <config.h> #include <stdio.h> -#include "acl.h" -#include "libcyr_cfg.h" +#include <syslog.h> +#include "lib/acl.h" +#include "lib/libcyr_cfg.h" +#include "lib/util.h" +#include "imap/imap_err.h" -/* convert a string to an acl bit vector +/* check a string, with meaningful description of error */ +EXPORTED int cyrus_acl_checkstr(const char *str, char **errstr) +{ + const char *rights = "lrswipckxtedan0123456789"; + const char *p; + + /* ignore leading plus/minus */ + if (*str == '-' || *str == '+') str++; + + for (p = str; *p; p++) { + if (strchr(rights, *p) == NULL) { + struct buf errbuf = BUF_INITIALIZER; + + syslog(LOG_DEBUG, "%s: unrecognised right '%c' in string \"%s\"", + __func__, *p, str); + + buf_printf(&errbuf, "The %c right is not supported", *p); + *errstr = buf_release(&errbuf); + return IMAP_INVALID_RIGHTS; + } + } + + return 0; +} + +/* Convert a string to an acl bit vector + * + * Sets mask to all the valid ACL rights found in str, even if + * invalid rights were found. + * + * Returns IMAP_INVALID_RIGHTS if invalid rights were found, + * or 0 otherwise. + * + * Note that a string containing only invalid rights will result + * in a mask of 0 (i.e. "no rights"), so be mindful of the + * ramifications if ignoring the return value. */ -EXPORTED int cyrus_acl_strtomask(const char *str) +EXPORTED int cyrus_acl_strtomask(const char *str, int *mask) { const char *deleteright = libcyrus_config_getstring(CYRUSOPT_DELETERIGHT); + const char *p; long legacy_create = 0; long legacy_delete = 0; long result = 0; + int r = 0; + + for (p = str; *p; p++) { + int nomatch = 0; - while (*str) { - switch (*str) { + switch (*p) { case 'l': result |= ACL_LOOKUP; break; case 'r': result |= ACL_READ; break; case 's': result |= ACL_SETSEEN; break; @@ -87,9 +129,10 @@ case '7': result |= ACL_USER7; break; case '8': result |= ACL_USER8; break; case '9': result |= ACL_USER9; break; + default: nomatch = 1; break; } - if (*str++ == *deleteright) { + if (*p == *deleteright) { switch (*deleteright) { case 'c': /* legacy CREATE macro - build member rights */ legacy_create |= ACL_DELETEMBOX; break; @@ -98,6 +141,12 @@ default: result |= ACL_DELETEMBOX; break; } } + else if (nomatch) { + /* unrecognised right character, bad! */ + syslog(LOG_INFO, "%s: ACL string \"%s\" contains unrecognised right '%c'", + __func__, str, *p); + r = IMAP_INVALID_RIGHTS; + } } /* If the rights string contained a legacy macro, but none of its @@ -107,7 +156,8 @@ if (!(result & legacy_create)) result |= legacy_create; if (!(result & legacy_delete)) result |= legacy_delete; - return (result); + *mask = result; + return r; } /* convert an acl bit vector to a string
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/lib/acl.h -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/lib/acl.h
Changed
@@ -96,8 +96,11 @@ typedef int cyrus_acl_canonproc_t(void *rock, const char *identifier, int rights); +/* check a string, with meaningful description of error */ +extern int cyrus_acl_checkstr(const char *str, char **errstr); + /* convert a string to an acl bit vector */ -extern int cyrus_acl_strtomask(const char *str); +extern int cyrus_acl_strtomask(const char *str, int *mask); /* cyrus_acl_masktostr(acl, dst) * convert an acl bit vector to a string
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/lib/acl_afs.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/lib/acl_afs.c
Changed
@@ -59,7 +59,6 @@ /* * Calculate the set of rights the user in 'auth_state' has in the ACL 'acl'. - * 'acl' must be writable, but is restored to its original condition. */ EXPORTED int cyrus_acl_myrights(struct auth_state *auth_state, const char *origacl) { @@ -88,7 +87,10 @@ thisid++; } if (auth_memberof(auth_state, thisid)) { - *acl_ptr |= cyrus_acl_strtomask(rights); + int mask; + cyrus_acl_strtomask(rights, &mask); + /* XXX and if strtomask fails? */ + *acl_ptr |= mask; } } @@ -155,7 +157,8 @@ *nextid++ = '\0'; if (strcmp(identifier, thisid) == 0) { - oldaccess = cyrus_acl_strtomask(rights); + cyrus_acl_strtomask(rights, &oldaccess); + /* XXX and if strtomask fails? */ break; } rights-1 = '\t';
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/lib/auth_pts.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/lib/auth_pts.c
Changed
@@ -425,6 +425,13 @@ fname = tofree; } + if (strlen(fname) >= sizeof(srvaddr.sun_path)) { + syslog(LOG_ERR, "ptload(): socket filename %s too long for " SIZE_T_FMT "-byte buffer", + fname, sizeof(srvaddr.sun_path)); + rc = -1; + goto done; + } + memset((char *)&srvaddr, 0, sizeof(srvaddr)); srvaddr.sun_family = AF_UNIX; strcpy(srvaddr.sun_path, fname);
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/lib/imapoptions -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/lib/imapoptions
Changed
@@ -510,15 +510,21 @@ mailboxes. */ { "deletedprefix", "DELETED", STRING } -/* If "delete_mode" set to be "delayed", the prefix for the deleted - mailboxes hierarchy. The hierarchy delimiter will be automatically - appended. */ +/* With \fBdelete_mode\fR set to \fIdelayed\fR, the + \fBdeletedprefix\fR setting defines the prefix for the hierarchy of + deleted mailboxes. +.PP + The hierarchy delimiter will be automatically appended. +*/ { "delete_mode", "delayed", ENUM("immediate", "delayed") } -/* The manner in which mailboxes are deleted. "immediate" mode is the - default behavior in which mailboxes are removed immediately. In - "delayed" mode, mailboxes are renamed to a special hiearchy defined - by the "deletedprefix" option to be removed later by cyr_expire. +/* The manner in which mailboxes are deleted. In the default + \fIdelayed\fR mode, mailboxes that are being deleted are renamed to + a special mailbox hierarchy under the \fBdeletedprefix\fR, to be + removed later by \fBcyr_expire(8)\fR. +.PP + In \fIimmediate\fR mode, the mailbox is removed from the filesystem + immediately. */ { "deleteright", "c", STRING } @@ -600,10 +606,12 @@ { "expunge_mode", "delayed", ENUM("default", "immediate", "delayed") } /* The mode in which messages (and their corresponding cache entries) - are expunged. "default" mode is the default behavior in which the + are expunged. "default" mode is the old behavior in which the message files are purged at the time of the EXPUNGE, but index - and cache records are retained to facilitate QRESYNC. In "delayed" - mode, the message files are also retained, allowing unexpunge to + and cache records are retained to facilitate QRESYNC. (Note that + this behaviour is no longer the default, but is so named for historical + reasons.) In "delayed" mode, which is the default since Cyrus 2.5.0, + the message files are also retained, allowing unexpunge to rescue them. In "immediate" mode, both the message files and the index records are removed as soon as possible. In all cases, nothing will be finally purged until all other processes have
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/master/CYRUS-MASTER.mib -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/master/CYRUS-MASTER.mib
Changed
@@ -9,10 +9,10 @@ FROM CMU-MIB; cyrusMasterMIB MODULE-IDENTITY - LAST-UPDATED "0010312300Z" -- 2000 Oct 31 + LAST-UPDATED "1704070437Z" -- 2017 April 7 ORGANIZATION "CMU Project Cyrus" CONTACT-INFO - " Email: cyrus-bugs@andrew.cmu.edu + " WWW: https://github.com/cyrusimap/cyrus-imapd/ Project Cyrus Computing Services
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/notifyd/notifyd.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/notifyd/notifyd.c
Changed
@@ -144,7 +144,7 @@ if (nopt < 0 || errno == ERANGE) cp = NULL; for (i = 0; cp && i < nopt; i++) - strarray_appendm(&options, cp = fetch_arg(cp, tail)); + strarray_append(&options, cp = fetch_arg(cp, tail)); if (cp) message = (cp = fetch_arg(cp, tail));
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/perl/sieve/scripts/sieveshell.pl -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/perl/sieve/scripts/sieveshell.pl
Changed
@@ -344,4 +344,4 @@ =head1 AUTHOR Tim Martin E<lt>tmartin@mirapoint.comE<gt>, and the rest of the Cyrus -team E<lt>cyrus-bugs@andrew.cmu.eduE<gt>. +team.
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/sieve/tree.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/sieve/tree.c
Changed
@@ -208,6 +208,8 @@ if (cl->u.v.subject) free(cl->u.v.subject); if (cl->u.v.addresses) strarray_free(cl->u.v.addresses); if (cl->u.v.message) free(cl->u.v.message); + free(cl->u.v.handle); + free(cl->u.v.from); break; case SETFLAG:
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/timsieved/actions.c -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/timsieved/actions.c
Changed
@@ -76,7 +76,7 @@ extern int sieved_userisadmin; static char *sieve_dir_config = NULL; -static const char *sieved_userid = NULL; +static char *sieved_userid = NULL; int actions_init(void) { @@ -103,8 +103,10 @@ int result; char *sieve_dir = (char *) xzmalloc(size+1); - + + if (sieved_userid) free(sieved_userid); sieved_userid = xstrdup(userid); + user = (char *) userid; if (config_virtdomains && strchr(user, '@')) { /* split the user and domain */
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/tools/git-version.sh -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/tools/git-version.sh
Changed
@@ -41,6 +41,10 @@ # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # +# if we've come from a release package, ignore git entirely +test -s VERSION && + exec head -1 VERSION + # first try: based on annotated git tags (real releases) version=$(git describe --dirty=-dirty 2>/dev/null) test -n "$version" &&
View file
cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz/xversion.h -> cyrus-imapd-2.5.11-30-g948a95666.tar.gz/xversion.h
Changed
@@ -1,3 +1,3 @@ -/* cyrus-imapd 2.5.10-55-gb6dbffa */ -#define _CYRUS_VERSION "2.5.10-55-gb6dbffa" -#define CYRUS_GITVERSION "b6dbffa0 2016-12-13" +/* cyrus-imapd 2.5.11-30-g948a95666 */ +#define _CYRUS_VERSION "2.5.11-30-g948a95666" +#define CYRUS_GITVERSION "948a9566 2017-07-10"
View file
cyrus-imapd.dsc
Changed
@@ -2,7 +2,7 @@ Source: cyrus-imapd Binary: cyrus-imapd Architecture: any -Version: 2.5.10.55-0~kolab1 +Version: 2.5.11.30-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.cyrusimap.org/ @@ -43,5 +43,5 @@ Package-List: cyrus-imapd deb mail extra Files: - 00000000000000000000000000000000 0 cyrus-imapd-2.5.10-55-gb6dbffa.tar.gz + 00000000000000000000000000000000 0 cyrus-imapd-2.5.11-30-g948a95666.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
View file
debian.changelog
Changed
@@ -1,3 +1,15 @@ +cyrus-imapd (2.5.11.30-0~kolab1) unstable; urgency=low + + * Fix segfault in XFER + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Mon, 10 Jul 2017 11:30:13 +0100 + +cyrus-imapd (2.5.11.29-0~kolab1) unstable; urgency=low + + * Check in upstream version 2.5.11 + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Sat, 1 Jul 2017 11:30:13 +0100 + cyrus-imapd (2.5.10.55-0~kolab1) unstable; urgency=low * Fix proxying extended list usage.
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
.