![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package kopano for openSUSE:Factory checked in at 2017-08-16 16:14:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kopano (Old) and /work/SRC/openSUSE:Factory/.kopano.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kopano" Wed Aug 16 16:14:22 2017 rev:6 rq:516726 version:8.3.3.22 Changes: -------- --- /work/SRC/openSUSE:Factory/kopano/kopano.changes 2017-07-09 13:04:31.328363079 +0200 +++ /work/SRC/openSUSE:Factory/.kopano.new/kopano.changes 2017-08-16 16:14:24.683507412 +0200 @@ -1,0 +2,16 @@ +Tue Aug 8 09:32:06 UTC 2017 - jengelh@inai.de + +- Update to new bugfix snapshot 8.3.3~22 + * gateway: trim CRLF from PR_EC_IMAP_BODY{,STRUCTURE} and + make Apple Mail client work again [KC-668, KC-720] + * server: disallow empty value for embedded_attachment_limit + and depth counting error [KC-745] + * common: fix incorrect timeout check in scheduler which had + disabled softdeletes [KC-638] + * server: disable reminders from shared stores [KC-758] + * catch pointer underflows / NULL pointers [KC-694, KC-60, + KC-177, KC-355, KC-378, KC-379, KC-669, KC-754] + * libserver: avoid creating multi-stream gzip files + [KC-104, KC-304, KC-597] + +------------------------------------------------------------------- Old: ---- kopanocore-8.3.2.tar.xz New: ---- kopanocore-8.3.3.22.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kopano.spec ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:26.423263205 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:26.427262644 +0200 @@ -17,10 +17,10 @@ # -%define version_unconverted 8.3.2 +%define version_unconverted 8.3.3.22 Name: kopano -Version: 8.3.2 +Version: 8.3.3.22 Release: 0 Summary: Collaboration software for professionals License: AGPL-3.0 @@ -39,10 +39,10 @@ BuildRequires: libcurl-devel BuildRequires: libical-devel >= 0.42 BuildRequires: libicu-devel -BuildRequires: libs3-devel +BuildRequires: libs3-devel >= 4.1 BuildRequires: libtool BuildRequires: libuuid-devel -BuildRequires: libvmime-devel >= 0.9.1.999 +BuildRequires: libvmime-devel >= 0.9.2 BuildRequires: libxml2-devel BuildRequires: ncurses-devel BuildRequires: openldap2-devel @@ -337,6 +337,8 @@ Requires: kopano-common = %version # Needed for createstore scripts' functionality Requires: kopano-utils +# dlopened +Requires: libs3-4 %description server This package provides the key component of Kopano Core, providing the @@ -547,10 +549,9 @@ --with-quotatemplate-prefix="%_sysconfdir/kopano/quotamail" \ --with-php-config="%phpconfig" \ --enable-epoll --enable-unicode \ - --disable-static --enable-release --enable-icu + --disable-static --enable-release echo "%version" >version -# Same as kopano.io -echo "15" >revision +echo "37" >revision make V=1 %{?_smp_mflags} %install @@ -814,7 +815,7 @@ %defattr(-,root,root) %dir %_sysconfdir/kopano %attr(0640,root,kopano) %config(noreplace) %_sysconfdir/kopano/archiver.cfg -%_sbindir/kopano-archiver +%_sbindir/kopano-archiver* %_mandir/man*/kopano-archiver* %dir %_docdir/kopano %dir %_docdir/kopano/example-config @@ -1101,9 +1102,6 @@ %defattr(-,root,root) %_bindir/kopano-set-oof %_sbindir/kopano-admin -%_sbindir/kopano-archiver-aclset -%_sbindir/kopano-archiver-aclsync -%_sbindir/kopano-archiver-restore %_sbindir/kopano-cachestat %_sbindir/kopano-mailbox-permissions %_sbindir/kopano-search-upgrade-findroots.py ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:26.471256469 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:26.471256469 +0200 @@ -1,5 +1,5 @@ pkgname=kopano -pkgver=8.3.2 +pkgver=8.3.3.22 pkgrel=0 pkgdesc='Kopano' arch=('x86_64') ++++++ _service ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:26.503251977 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:26.503251977 +0200 @@ -4,10 +4,10 @@ <service name="tar_scm" mode="disabled"> <param name="scm">git</param> <param name="url">https://stash.kopano.io/scm/kc/kopanocore.git</param> - <param name="revision">kopanocore-8.3.2</param> + <param name="revision">kc-8.3.x</param> <param name="filename">kopanocore</param> - <param name="parent-tag">bp/8.3.2</param> - <param name="versionformat">8.3.2</param> + <param name="parent-tag">bp/8.3.3</param> + <param name="versionformat">8.3.3.@TAG_OFFSET@</param> </service> <service name="recompress" mode="disabled"> <param name="file">*.tar</param> ++++++ build.collax ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:26.523249171 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:26.523249171 +0200 @@ -2,7 +2,7 @@ set -x source=kopanocore -version=8.3.2 +version=8.3.3.22 revnum=0 build=0 ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:26.547245803 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:26.551245241 +0200 @@ -1,4 +1,4 @@ -kopano (8.4.0~1054-0) unstable; urgency=low +kopano (8.3.3.22-0) unstable; urgency=low * Current release. ++++++ debian.control ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:26.587240189 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:26.587240189 +0200 @@ -5,14 +5,13 @@ Build-Depends: debhelper (>= 4.0.0), binutils (>= 2.12.90.0.9), devscripts, autotools-dev, g++, automake (>= 1:1.9) | automake1.9, autoconf (>= 2.59), libtool (>= 1.5), libtool-bin | libtool, pkg-config (>= 0.18), libssl-dev, - libvmime-kopano-dev (>= 0.9.2~), uuid-dev, php-dev | php5-dev | php7.0-dev, + libvmime-dev (>= 0.9.2), uuid-dev, php-dev | php5-dev | php7.0-dev, libmysqlclient15-dev | libmysqlclient-dev | libmariadb-client-lgpl-dev, libcurl3-dev | libcurl4-openssl-dev, gettext, libldap2-dev, m4, zlib1g-dev, fakeroot, libncurses5-dev, libncursesw5-dev, libxml2-dev, libpam0g-dev, libkrb5-dev, libicu-dev, libical-dev, swig, python-dev, - gsoap-kopano-dev (>= 2.8.39), libgoogle-perftools-dev, openssl, - libs3-dev (>= 3) + gsoap-dev (>= 2.8.39), libgoogle-perftools-dev, openssl, libs3-dev (>= 4.1) Standards-Version: 3.7.3 Package: kopano-server-packages @@ -65,7 +64,7 @@ Package: kopano-migration-imap Architecture: any Depends: libdigest-hmac-perl, libfile-copy-recursive-perl, libunicode-string-perl, - libreadonly-perl, libio-tee-perl, libmail-imapclient-perl + libreadonly-perl, libio-tee-perl, libmail-imapclient-perl, libterm-readkey-perl Description: Utility to migrate between IMAP mailboxes kopano-migration-imap provides a utility based on imapsync to migrate between IMAP mailboxes (including Kopano). @@ -197,7 +196,7 @@ Package: kopano-server Architecture: any Depends: ${shlibs:Depends}, kopano-common (= ${binary:Version}), - kopano-utils, libtcmalloc-minimal4 + kopano-utils, libtcmalloc-minimal4, libs3-4 Description: Server component for Kopano Core This package provides the key component of Kopano Core, providing the server to which Kopano clients connect. The server requires a MySQL ++++++ debian.kopano-dagent.install ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:26.759216048 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:26.759216048 +0200 @@ -6,8 +6,6 @@ usr/sbin/kopano-autorespond usr/sbin/kopano-mr-accept usr/sbin/kopano-mr-process -usr/sbin/kopano-mr-accept.py -usr/sbin/kopano-mr-process.py usr/share/doc/kopano-dagent/ usr/share/man/man5/kopano-dagent.cfg.5 usr/share/man/man8/kopano-dagent.8 ++++++ debian.kopano-utils.install ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:27.095168892 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:27.095168892 +0200 @@ -7,13 +7,10 @@ usr/sbin/kopano-archiver-aclsync usr/sbin/kopano-archiver-restore usr/sbin/kopano-cachestat -usr/sbin/kopano-cli usr/sbin/kopano-mailbox-permissions usr/sbin/kopano-search-upgrade-findroots.py usr/libexec/kopano/mapitime -usr/lib/python*/*/kopano_cli/ usr/share/man/man8/kopano-admin.8 -usr/share/man/man8/kopano-cli.8 usr/share/man/man1/kopano-fsck.1 usr/share/man/man1/kopano-passwd.1 usr/share/man/man1/kopano-stats.1 ++++++ debian.python-mapi.install ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:27.427122296 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:27.427122296 +0200 @@ -1,4 +1,4 @@ -usr/lib/python*/*/{MAPICore,inetmapi,icalmapi,libfreebusy}.py -usr/lib/python*/*/_{MAPICore,inetmapi,icalmapi,libfreebusy}.so +usr/lib/python*/*/{MAPICore,inetmapi,icalmapi}.py +usr/lib/python*/*/_{MAPICore,inetmapi,icalmapi}.so usr/lib/python*/*/MAPI*.egg-info usr/lib/python*/*/MAPI/ ++++++ debian.rules ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:27.463117243 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:27.467116681 +0200 @@ -44,6 +44,8 @@ dpkg-parsechangelog | perl -lne 'if(/^Version: \d+\D+\d+\D+\d+\D+(\d+)/){print$$1;exit}' >revision cat revision ./bootstrap.sh + echo debian7 workaround: + if ! pkg-config --exists python; then nopy=1; fi; echo nopy=$$nopy; \ ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --with-distro=debian --prefix=/usr --localstatedir=/var \ --sysconfdir=/etc --mandir=\$${prefix}/share/man \ @@ -51,9 +53,10 @@ --with-systemunitdir=/lib/systemd/system \ --with-userscript-prefix=/etc/kopano/userscripts \ --with-quotatemplate-prefix=/etc/kopano/quotamail \ - --enable-tcmalloc TCMALLOC_CFLAGS=" " \ + --disable-static --enable-tcmalloc TCMALLOC_CFLAGS=" " \ TCMALLOC_LIBS="-ltcmalloc_minimal" --enable-epoll \ --enable-unicode $(CONFFLAG) \ + $(CONFFLAG) --enable-release $${nopy+PYTHON_CFLAGS=`pkg-config python-2.7 --cflags` PYTHON_LIBS=`pkg-config python-2.7 --libs`} \ --enable-release # first entry point of dpkg-buildpackage @@ -111,9 +114,6 @@ # Add here commands to install the arch part of the package into # debian/tmp. $(MAKE) DESTDIR=$(INSTDIR) install PHP_SYSCONF_DIR=/usr/share/kopano/php/mapi - mkdir -p ${INSTDIR}/etc/kopano/autorespond - cp -av ${INSTDIR}/usr/share/doc/kopano/example-config/*.cfg ${INSTDIR}/etc/kopano/ - rm -fv ${INSTDIR}/etc/kopano/ldap.cfg # since this is not linked to an initscript anymore, install the file ourselves. mkdir -p $(INSTDIR)/etc/default ++++++ kopano.dsc ++++++ --- /var/tmp/diff_new_pack.KpMjOm/_old 2017-08-16 16:14:27.507111068 +0200 +++ /var/tmp/diff_new_pack.KpMjOm/_new 2017-08-16 16:14:27.511110507 +0200 @@ -1,7 +1,7 @@ Format: 1.0 Source: kopano Architecture: any all -Version: 8.3.2-0 +Version: 8.3.3.22-0 DEBTRANSFORM-RELEASE: 1 Maintainer: Kopano Development <development@kopano.io> Homepage: https://kopano.com ++++++ kopanocore-8.3.2.tar.xz -> kopanocore-8.3.3.22.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/RELNOTES.txt new/kopanocore-8.3.3.22/RELNOTES.txt --- old/kopanocore-8.3.2/RELNOTES.txt 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/RELNOTES.txt 2017-08-07 13:07:07.000000000 +0200 @@ -1,11 +1,25 @@ -Release notes for 8.3.2 +Release notes for 8.3.3 ======================= Fixes: +* gateway: fix another IMAP protocol error [KC-720] +* server: fix depth level count for attachments [KC-745] +* common/spooler: catch a potential pointer underflow [KC-694] +* common: fix incorrect condition in scheduler [KC-638] + Fixes timing of softdeletes, sync-table cleanups, kopano-monitor. +* server: disable reminders from shared stores [KC-728] +Changes: +* server: build with libs3 4.1 [KC-751] + + +Release notes for 8.3.2 [2017-07-06] +==================================== +Fixes: * gateway: fix an IMAP protocol error [KC-668] Apple Mail/Alpine did not show mails with long encoded subjects * common: restore ability to output crashdump [KC-630] * caldav: counter proposal without dates [KC-710] * inetmapi: avoid short allocation on group expansion [KC-388,KC-727] +* server: support ICS initial sync with more than 100000 items again [KC-683] Changes: * server: improve wording of ntlm_auth messages [KC-572] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/common/ECScheduler.cpp new/kopanocore-8.3.3.22/common/ECScheduler.cpp --- old/kopanocore-8.3.2/common/ECScheduler.cpp 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/common/ECScheduler.cpp 2017-08-07 13:07:07.000000000 +0200 @@ -132,7 +132,7 @@ ulock_normal l_exit(lpScheduler->m_hExitMutex); if (lpScheduler->m_bExit) break; - if (lpScheduler->m_hExitSignal.wait_for(l_exit, std::chrono::seconds(SCHEDULER_POLL_FREQUENCY)) == + if (lpScheduler->m_hExitSignal.wait_for(l_exit, std::chrono::seconds(SCHEDULER_POLL_FREQUENCY)) != std::cv_status::timeout) break; l_exit.unlock(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/common/include/kopano/stringutil.h new/kopanocore-8.3.3.22/common/include/kopano/stringutil.h --- old/kopanocore-8.3.2/common/include/kopano/stringutil.h 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/common/include/kopano/stringutil.h 2017-08-07 13:07:07.000000000 +0200 @@ -199,6 +199,7 @@ extern _kc_export std::string zcp_md5_final_hex(MD5_CTX *); extern _kc_export std::string string_strip_nuls(const std::string &); extern _kc_export std::wstring string_strip_nuls(const std::wstring &); +extern _kc_export std::string string_strip_crlf(const char *); } /* namespace */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/common/libkcmapi.sym.in new/kopanocore-8.3.3.22/common/libkcmapi.sym.in --- old/kopanocore-8.3.2/common/libkcmapi.sym.in 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/common/libkcmapi.sym.in 2017-08-07 13:07:07.000000000 +0200 @@ -13,7 +13,7 @@ KC::*; typeinfo*; vtable*; - *::_Rep::_S_empty_rep_storage; + std::*::_S_*; }; local: *; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/common/libkcutil.sym.in new/kopanocore-8.3.3.22/common/libkcutil.sym.in --- old/kopanocore-8.3.2/common/libkcutil.sym.in 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/common/libkcutil.sym.in 2017-08-07 13:07:07.000000000 +0200 @@ -21,7 +21,7 @@ KC::*; typeinfo*; vtable*; - *::_Rep::_S_empty_rep_storage; + std::*::_S_*; }; local: *; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/common/rtfutil.cpp new/kopanocore-8.3.3.22/common/rtfutil.cpp --- old/kopanocore-8.3.2/common/rtfutil.cpp 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/common/rtfutil.cpp 2017-08-07 13:07:07.000000000 +0200 @@ -1061,9 +1061,12 @@ */ bool isrtfhtml(const char *buf, unsigned int len) { + if (len < 9) + return false; + assert(buf != nullptr); for (const char *c = buf; c < buf + len - 9; ++c) - if (strncmp(c, "\\from", 5) == 0) - return strncmp(c, "\\fromhtml", 9) == 0; + if (memcmp(c, "\\fromhtml", 9) == 0) + return true; return false; } @@ -1080,9 +1083,12 @@ */ bool isrtftext(const char *buf, unsigned int len) { + if (len < 9) + return false; + assert(buf != nullptr); for (const char *c = buf; c < buf + len - 9; ++c) - if (strncmp(c, "\\from", 5) == 0) - return strncmp(c, "\\fromtext", 9) == 0; + if (memcmp(c, "\\fromtext", 9) == 0) + return true; return false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/common/stringutil.cpp new/kopanocore-8.3.3.22/common/stringutil.cpp --- old/kopanocore-8.3.2/common/stringutil.cpp 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/common/stringutil.cpp 2017-08-07 13:07:07.000000000 +0200 @@ -714,4 +714,12 @@ return o; } +std::string string_strip_crlf(const char *s) +{ + std::string o; + std::copy_if(s, s + strlen(s), std::back_inserter(o), + [](char c) { return c != '\n' && c != '\r'; }); + return o; +} + } /* namespace */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/configure.ac new/kopanocore-8.3.3.22/configure.ac --- old/kopanocore-8.3.2/configure.ac 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/configure.ac 2017-08-07 13:07:07.000000000 +0200 @@ -661,11 +661,8 @@ AM_CONDITIONAL(WITH_EPOLL, test "$want_epoll" = "yes") if test "$want_epoll" = "yes"; then AC_CHECK_FUNCS([epoll_create]) -EPOLL_CFLAGS=-DUSE_EPOLL -else -EPOLL_CFLAGS= +ZCPPFLAGS="$ZCPPFLAGS -DUSE_EPOLL" fi -AC_SUBST(EPOLL_CFLAGS) dnl The "Locale" class is in icu-uc. dnl The "CollationKey" class is in icu-i18n. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/default.sym.in new/kopanocore-8.3.3.22/default.sym.in --- old/kopanocore-8.3.2/default.sym.in 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/default.sym.in 2017-08-07 13:07:07.000000000 +0200 @@ -4,7 +4,7 @@ KC::*; typeinfo*; vtable*; - *::_Rep::_S_empty_rep_storage; + std::*::_S_*; }; local: *; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/doc/install.txt new/kopanocore-8.3.3.22/doc/install.txt --- old/kopanocore-8.3.2/doc/install.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/kopanocore-8.3.3.22/doc/install.txt 2017-08-07 13:07:07.000000000 +0200 @@ -0,0 +1,36 @@ + +Mandatory build-time dependencies and their minimum versions (if any): + + * g++ 4.7 or clang++ 3.8 + * pkg-config + * gsoap 2.8.49, generator and library + * libcrypt with crypt_r + * libgettext (where separate from libc) + * libical 0.9.x + * libiconv (where separate from libc) + * libicu 52 + * libcrypto and libssl from LibreSSL or OpenSSL 0.9.8 + * libmysqlclient: MySQL-compatible C connector library + * libncurses 5 + * libpython 2.x & swig 2.x + * libuuid from util-linux + * libvmime 0.9.2 + * libxml2 2.6 + * zlib + +Optional build-time dependencies and their minimum versions: + + * google-perftools libtcmalloc + * MIT Kerberos libkrb5 + * libcurl + * libs3 4.1 (for Amazon S3 attachment storing) + * libtidy 5.0 from tidy-html + * Linux-PAM + * OpenLDAP libldap_r + * php 5.4 + +Optional components during runtime: + + * libtcmalloc or jemalloc as an alternate allocator + (preload declarable in server.cfg) + * libs3 (dlopened) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/gateway/IMAP.cpp new/kopanocore-8.3.3.22/gateway/IMAP.cpp --- old/kopanocore-8.3.2/gateway/IMAP.cpp 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/gateway/IMAP.cpp 2017-08-07 13:07:07.000000000 +0200 @@ -3931,11 +3931,8 @@ } else if (item.compare("ENVELOPE") == 0) { auto lpProp = PCpropFindProp(lpProps, cValues, m_lpsIMAPTags->aulPropTag[0]); if (lpProp) { - std::string e = "("; - std::copy_if(lpProp->Value.lpszA, lpProp->Value.lpszA + strlen(lpProp->Value.lpszA), std::back_inserter(e), [](char x) { return x != '\r' && x != '\n'; }); vProps.push_back(item); - e += ")"; - vProps.push_back(e); + vProps.push_back("(" + string_strip_crlf(lpProp->Value.lpszA) + ")"); } else if (lpMessage) { string strEnvelope; HrGetMessageEnvelope(strEnvelope, lpMessage); @@ -3948,12 +3945,12 @@ // table version auto lpProp = PCpropFindProp(lpProps, cValues, PR_EC_IMAP_BODY); vProps.push_back(item); - vProps.push_back(lpProp ? lpProp->Value.lpszA : "NIL"); + vProps.push_back(lpProp != nullptr ? string_strip_crlf(lpProp->Value.lpszA) : std::string("NIL")); } else if (bSkipOpen && item.compare("BODYSTRUCTURE") == 0) { // table version auto lpProp = PCpropFindProp(lpProps, cValues, PR_EC_IMAP_BODYSTRUCTURE); vProps.push_back(item); - vProps.push_back(lpProp ? lpProp->Value.lpszA : "NIL"); + vProps.push_back(lpProp != nullptr ? string_strip_crlf(lpProp->Value.lpszA) : std::string("NIL")); } else if (Prefix(item, "BODY") || Prefix(item, "RFC822")) { // the only exceptions when we don't need to generate anything yet. if (item.compare("RFC822.SIZE") == 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/installer/linux/Makefile.am new/kopanocore-8.3.3.22/installer/linux/Makefile.am --- old/kopanocore-8.3.2/installer/linux/Makefile.am 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/installer/linux/Makefile.am 2017-08-07 13:07:07.000000000 +0200 @@ -85,7 +85,7 @@ EXTRA_DIST = ${BUILT_SOURCES} ldap.m4 \ $(rhel_initscript_files) $(suse_initscript_files) $(cbs4_initscript_files) \ - sysconfig.txt + ${debian_initscript_files} sysconfig.txt install-data-hook: install -d -m 755 ${DESTDIR}/${sysconf_configdir}/license diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/m4lcommon/include/kopano/mapi_ptr.h new/kopanocore-8.3.3.22/m4lcommon/include/kopano/mapi_ptr.h --- old/kopanocore-8.3.2/m4lcommon/include/kopano/mapi_ptr.h 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/m4lcommon/include/kopano/mapi_ptr.h 2017-08-07 13:07:07.000000000 +0200 @@ -88,7 +88,7 @@ SRowSet **operator&(void) { return &~*this; } size_type size(void) const { return (*this)->cRows; } const SRow &operator[](size_t i) const { return (*this)->aRow[i]; } - bool empty(void) const { return (*this)->cRows == 0; } + bool empty(void) const { return (*this) != nullptr && (*this)->cRows == 0; } }; } /* namespace */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/mapi4linux/src/libkchl.sym.in new/kopanocore-8.3.3.22/mapi4linux/src/libkchl.sym.in --- old/kopanocore-8.3.2/mapi4linux/src/libkchl.sym.in 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/mapi4linux/src/libkchl.sym.in 2017-08-07 13:07:07.000000000 +0200 @@ -4,7 +4,7 @@ *KCHL::*; typeinfo*; vtable*; - *::_Rep::_S_empty_rep_storage; + std::*::_S_*; }; local: *; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/mapi4linux/src/libmapi.sym.in new/kopanocore-8.3.3.22/mapi4linux/src/libmapi.sym.in --- old/kopanocore-8.3.2/mapi4linux/src/libmapi.sym.in 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/mapi4linux/src/libmapi.sym.in 2017-08-07 13:07:07.000000000 +0200 @@ -71,7 +71,7 @@ typeinfo*; vtable*; /* workaround gcc issue 78747 */ - *::_Rep::_S_empty_rep_storage; + std::*::_S_*; }; PCpropFindProp; /* workaround RHBZ issue 1403609 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/php-ext/mapi.sym new/kopanocore-8.3.3.22/php-ext/mapi.sym --- old/kopanocore-8.3.2/php-ext/mapi.sym 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/php-ext/mapi.sym 2017-08-07 13:07:07.000000000 +0200 @@ -2,7 +2,7 @@ global: get_module; extern "C++" { - *::_Rep::_S_epmty_rep_storage; + std::*::_S_*; }; local: *; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/provider/common/SOAPSock.cpp new/kopanocore-8.3.3.22/provider/common/SOAPSock.cpp --- old/kopanocore-8.3.2/provider/common/SOAPSock.cpp 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/provider/common/SOAPSock.cpp 2017-08-07 13:07:07.000000000 +0200 @@ -33,7 +33,11 @@ // we cannot patch http_post now (see external/gsoap/*.diff), so we redefine it static int +#if GSOAP_VERSION >= 20850 +http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, ULONG64 count) +#else http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count) +#endif { int err; if (strlen(endpoint) + strlen(soap->http_version) > sizeof(soap->tmpbuf) - 80 || strlen(host) + strlen(soap->http_version) > sizeof(soap->tmpbuf) - 80) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/provider/libkcserver.sym.in new/kopanocore-8.3.3.22/provider/libkcserver.sym.in --- old/kopanocore-8.3.2/provider/libkcserver.sym.in 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/provider/libkcserver.sym.in 2017-08-07 13:07:07.000000000 +0200 @@ -10,7 +10,7 @@ KC::*; typeinfo*; vtable*; - *::_Rep::_S_empty_rep_storage; + std::*::_S_*; }; local: *; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/provider/libkcsoap.sym.in new/kopanocore-8.3.3.22/provider/libkcsoap.sym.in --- old/kopanocore-8.3.2/provider/libkcsoap.sym.in 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/provider/libkcsoap.sym.in 2017-08-07 13:07:07.000000000 +0200 @@ -24,7 +24,7 @@ KC::*; typeinfo*; vtable*; - *::_Rep::_S_empty_rep_storage; + std::*::_S_*; }; local: *; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/provider/libserver/ECAttachmentStorage.cpp new/kopanocore-8.3.3.22/provider/libserver/ECAttachmentStorage.cpp --- old/kopanocore-8.3.2/provider/libserver/ECAttachmentStorage.cpp 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/provider/libserver/ECAttachmentStorage.cpp 2017-08-07 13:07:07.000000000 +0200 @@ -1772,7 +1772,7 @@ } if (er == erSuccess) { - if (gzflush(gzfp, Z_FINISH)) { + if (gzflush(gzfp, 0)) { int saved_errno = errno; int zerror; const char *zstrerr = gzerror(gzfp, &zerror); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/provider/libserver/ECS3Attachment.cpp new/kopanocore-8.3.3.22/provider/libserver/ECS3Attachment.cpp --- old/kopanocore-8.3.2/provider/libserver/ECS3Attachment.cpp 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/provider/libserver/ECS3Attachment.cpp 2017-08-07 13:07:07.000000000 +0200 @@ -118,14 +118,14 @@ ec_log_info("Initializing S3 Attachment Storage"); /* - * Do a dlopen of libs3.so.3 so that the implicit pull-in of + * Do a dlopen of libs3.so.4 so that the implicit pull-in of * libldap-2.4.so.2 symbols does not pollute our namespace of * libldap_r-2.4.so.2 symbols. */ - void *h = ec_libs3_handle = dlopen("libs3.so.3", RTLD_LAZY | RTLD_LOCAL); + void *h = ec_libs3_handle = dlopen("libs3.so.4", RTLD_LAZY | RTLD_LOCAL); const char *err; if (ec_libs3_handle == NULL) { - ec_log_warn("dlopen libs3.so.3: %s", (err = dlerror()) ? err : "<none>"); + ec_log_warn("dlopen libs3.so.4: %s", (err = dlerror()) ? err : "<none>"); return KCERR_DATABASE_ERROR; } #define W(n) do { \ @@ -427,7 +427,7 @@ */ cdp->retries = S3_RETRIES; do { - DY_head_object(&m_bucket_ctx, filename.c_str(), 0, + DY_head_object(&m_bucket_ctx, filename.c_str(), nullptr, 0, &m_response_handler, &cwdata); if (DY_status_is_retryable(cdp->status)) ec_log_debug("Existence check result in while: %s", @@ -477,9 +477,8 @@ */ cdp->retries = S3_RETRIES; do { - DY_get_object(&m_bucket_ctx, filename.c_str(), - &m_get_conditions, /*startByte*/ 0, /*byteCount*/ 0, 0, - &m_get_obj_handler, &cwdata); + DY_get_object(&m_bucket_ctx, filename.c_str(), &m_get_conditions, 0, 0, + nullptr, 0, &m_get_obj_handler, &cwdata); if (DY_status_is_retryable(cdp->status)) ec_log_debug("Load instance result in while: %s", DY_get_status_name(cdp->status)); @@ -550,9 +549,8 @@ */ cdp->retries = S3_RETRIES; do { - DY_get_object(&m_bucket_ctx, filename.c_str(), - &m_get_conditions, /*startByte*/ 0, /*byteCount*/ 0, 0, - &m_get_obj_handler, &cwdata); + DY_get_object(&m_bucket_ctx, filename.c_str(), &m_get_conditions, 0, 0, + nullptr, 0, &m_get_obj_handler, &cwdata); if (DY_status_is_retryable(cdp->status)) ec_log_debug("Load instance result in while: %s", DY_get_status_name(cdp->status)); @@ -614,8 +612,8 @@ */ cdp->retries = S3_RETRIES; do { - DY_put_object(&m_bucket_ctx, filename.c_str(), size, NULL, - NULL, &m_put_obj_handler, &cwdata); + DY_put_object(&m_bucket_ctx, filename.c_str(), size, nullptr, nullptr, 0, + &m_put_obj_handler, &cwdata); if (DY_status_is_retryable(cdp->status)) ec_log_debug("Save attachment result in while: %s", DY_get_status_name(cdp->status)); @@ -673,8 +671,8 @@ */ cdp->retries = S3_RETRIES; do { - DY_put_object(&m_bucket_ctx, filename.c_str(), size, NULL, - NULL, &m_put_obj_handler, &cwdata); + DY_put_object(&m_bucket_ctx, filename.c_str(), size, nullptr, nullptr, 0, + &m_put_obj_handler, &cwdata); if (DY_status_is_retryable(cdp->status)) ec_log_debug("Save attachment result in while: %s", DY_get_status_name(cdp->status)); @@ -771,7 +769,7 @@ */ cdp->retries = S3_RETRIES; do { - DY_delete_object(&m_bucket_ctx, filename.c_str(), 0, + DY_delete_object(&m_bucket_ctx, filename.c_str(), nullptr, 0, &m_response_handler, &cwdata); if (DY_status_is_retryable(cdp->status)) ec_log_debug("Delete marked attachment result in while: %s", @@ -888,7 +886,7 @@ */ cdp->retries = S3_RETRIES; do { - DY_head_object(&m_bucket_ctx, filename.c_str(), 0, + DY_head_object(&m_bucket_ctx, filename.c_str(), nullptr, 0, &m_response_handler, &cwdata); if (DY_status_is_retryable(cdp->status)) ec_log_debug("Get size attachment result in while: %s", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/provider/libserver/ECSecurity.cpp new/kopanocore-8.3.3.22/provider/libserver/ECSecurity.cpp --- old/kopanocore-8.3.2/provider/libserver/ECSecurity.cpp 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/provider/libserver/ECSecurity.cpp 2017-08-07 13:07:07.000000000 +0200 @@ -1260,10 +1260,10 @@ er = m_lpSession->GetSessionManager()->GetCacheManager()->GetStoreAndType(ulStoreId, NULL, NULL, &ulStoreType); if (er != erSuccess) return er; - - if(ulStoreType != ECSTORE_TYPE_PRIVATE) { + + if(GetAdminLevel() == ADMIN_LEVEL_SYSADMIN || ulStoreType != ECSTORE_TYPE_PRIVATE) { *lpQuotaStatus = QUOTA_OK; - return er; // all is good, no quota on non-private stores. + return er; // all is good for admin user and/or non-private stores. } // Get the store owner diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/provider/libserver/cmd.cpp new/kopanocore-8.3.3.22/provider/libserver/cmd.cpp --- old/kopanocore-8.3.2/provider/libserver/cmd.cpp 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/provider/libserver/cmd.cpp 2017-08-07 13:07:07.000000000 +0200 @@ -2733,7 +2733,15 @@ } } - er = SaveObject(soap, lpecSession, lpDatabase, lpAttachmentStorage, ulStoreId, ulParentObjId, ulParentObjType, ulFlags, ulSyncId, lpsSaveObj, &sReturnObject, atoui(g_lpSessionManager->GetConfig()->GetSetting("embedded_attachment_limit")), &fHaveChangeKey); + er = SaveObject(soap, lpecSession, lpDatabase, lpAttachmentStorage, + ulStoreId, ulParentObjId, ulParentObjType, ulFlags, ulSyncId, + lpsSaveObj, &sReturnObject, + /* message itself occupies another level */ + 1 + atoui(g_lpSessionManager->GetConfig()->GetSetting("embedded_attachment_limit")), + &fHaveChangeKey); + if (er == KCERR_TOO_COMPLEX) + ec_log_debug("saveObject: refusing to store object \"%s\" (store %u): too many levels of attachments/subobjects", + sEntryId.__ptr != nullptr ? base64_encode(sEntryId.__ptr, sEntryId.__size).c_str() : "", ulStoreId); if (er != erSuccess) goto exit; @@ -3071,19 +3079,40 @@ er = KCERR_NO_ACCESS; goto exit; } - + ulParentObjType = MAPI_FOLDER; } else if(ulObjType == MAPI_FOLDER) { - er = g_lpSessionManager->GetCacheManager()->GetObject(ulParentId, NULL, NULL, NULL, &ulParentObjType); + er = g_lpSessionManager->GetCacheManager()->GetObject(ulParentId, NULL, NULL, NULL, &ulParentObjType); if (er != erSuccess) goto exit; - - // Reset folder counts now (Note: runs in a DB transaction!). Note: we only update counts when lpNotSubscribe is not NULL; this - // makes sure that we only reset folder counts on the first open of a folder, and not when the folder properties are updated (eg - // due to counter changes) - if(lpsNotSubscribe && ulObjFlags != FOLDER_SEARCH && parseBool(g_lpSessionManager->GetConfig()->GetSetting("counter_reset"))) - ResetFolderCount(lpecSession, ulObjId); - } + + // avoid reminders from shared stores by detecting that we are opening non-owned reminders folder + if((ulObjFlags&FOLDER_SEARCH) && lpecSession->GetSecurity()->IsOwner(ulObjId) == KCERR_NO_ACCESS) { + strQuery = "SELECT val_string FROM properties where hierarchyid=" + stringify(ulObjId) + " AND tag = " + stringify(PROP_ID(PR_CONTAINER_CLASS))+ ";"; + er = lpDatabase->DoSelect(strQuery, &lpDBResult); + if(er != erSuccess) + goto exit; + + if (lpDatabase->GetNumRows(lpDBResult) == 1) { + lpDBRow = lpDatabase->FetchRow(lpDBResult); + if (lpDBRow == NULL || lpDBRow[0] == NULL ) { + ec_log_err("ECSearchObjectTable::Load(): row or columns null"); + er = KCERR_DATABASE_ERROR; + goto exit; + } + if(!strcmp(lpDBRow[0], "Outlook.Reminder")) { + er = KCERR_NOT_FOUND; + goto exit; + } + } + } + + // Reset folder counts now (Note: runs in a DB transaction!). Note: we only update counts when lpNotSubscribe is not NULL; this + // makes sure that we only reset folder counts on the first open of a folder, and not when the folder properties are updated (eg + // due to counter changes) + if(lpsNotSubscribe && ulObjFlags != FOLDER_SEARCH && parseBool(g_lpSessionManager->GetConfig()->GetSetting("counter_reset"))) + ResetFolderCount(lpecSession, ulObjId); + } // check if flags were passed, older clients call checkExistObject if(ulFlags & 0x80000000) { @@ -9958,8 +9987,7 @@ } else if (er != erSuccess) goto exit; - ulDepth = atoui(lpecSession->GetSessionManager()->GetConfig()->GetSetting("embedded_attachment_limit")); - + ulDepth = atoui(lpecSession->GetSessionManager()->GetConfig()->GetSetting("embedded_attachment_limit")) + 1; er = lpecSession->GetAdditionalDatabase(&lpBatchDB); if (er != erSuccess) goto exit; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/provider/plugin.sym.in new/kopanocore-8.3.3.22/provider/plugin.sym.in --- old/kopanocore-8.3.2/provider/plugin.sym.in 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/provider/plugin.sym.in 2017-08-07 13:07:07.000000000 +0200 @@ -4,7 +4,7 @@ getUserPluginInstance; getUserPluginVersion; extern "C++" { - *::_Rep::_S_empty_rep_storage; + std::*::_S_*; }; local: *; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/provider/server/ECServer.cpp new/kopanocore-8.3.3.22/provider/server/ECServer.cpp --- old/kopanocore-8.3.2/provider/server/ECServer.cpp 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/provider/server/ECServer.cpp 2017-08-07 13:07:07.000000000 +0200 @@ -956,7 +956,7 @@ { "counter_reset", "yes", CONFIGSETTING_RELOADABLE }, { "mysql_group_concat_max_len", "21844", CONFIGSETTING_RELOADABLE }, { "restrict_admin_permissions", "no", 0 }, - { "embedded_attachment_limit", "20", CONFIGSETTING_RELOADABLE }, + {"embedded_attachment_limit", "20", CONFIGSETTING_NONEMPTY | CONFIGSETTING_RELOADABLE}, { "proxy_header", "", CONFIGSETTING_RELOADABLE }, { "owner_auto_full_access", "true" }, { "attachment_files_fsync", "false", 0 }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/swig/python/python.sym.in new/kopanocore-8.3.3.22/swig/python/python.sym.in --- old/kopanocore-8.3.2/swig/python/python.sym.in 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/swig/python/python.sym.in 2017-08-07 13:07:07.000000000 +0200 @@ -5,6 +5,6 @@ List_to_*; Object_from_*; Object_to_*; - *::_Rep::_S_empty_rep_storage; + std::*::_S_*; }; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopanocore-8.3.2/version.in new/kopanocore-8.3.3.22/version.in --- old/kopanocore-8.3.2/version.in 2017-06-30 10:59:40.000000000 +0200 +++ new/kopanocore-8.3.3.22/version.in 2017-08-07 13:07:07.000000000 +0200 @@ -1 +1 @@ -8.3.2 +8.3.3