Update to 3.4.1

Resolves: #1990473
Related:  #1988863
This commit is contained in:
Pavel Zhukov 2021-08-19 06:38:33 +02:00
parent c1660d0b99
commit 99d9033a70
5 changed files with 39 additions and 98 deletions

11
.gitignore vendored
View File

@ -3,9 +3,8 @@
/.*.swp
/results_cyrus-imapd/
/cyrus-imapd-*/
/cassandane-testdata-ca669d4b.tar.gz
/cassandane-17d372f.tar.gz
/cyrus-imapd-3.2.4.tar.gz
/cassandane-8d3fced.tar.gz
/cyrus-imapd-3.2.6.tar.gz
/cyrus-manpages-3.2.6.tar.gz
/cassandane-testdata-*.tar.gz
/cassandane-*.tar.gz
/cyrus-imapd-*.tar.gz
/cyrus-manpages-*.tar.gz

View File

@ -1,53 +0,0 @@
From 621f9e41465b521399f691c241181300fab55995 Mon Sep 17 00:00:00 2001
From: Bron Gondwana <brong@fastmail.fm>
Date: Sun, 18 Apr 2021 22:45:53 +1000
Subject: [PATCH] annotate: don't allow everyone to write shared server entries
---
imap/annotate.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/imap/annotate.c b/imap/annotate.c
index dc59a3b500..a5462d6e5f 100644
--- a/imap/annotate.c
+++ b/imap/annotate.c
@@ -2788,15 +2788,20 @@ static int write_entry(struct mailbox *mailbox,
keylen = make_key(mboxname, uid, entry, userid, key, sizeof(key));
- if (mailbox) {
- struct annotate_metadata oldmdata;
- r = read_old_value(d, key, keylen, &oldval, &oldmdata);
- if (r) goto out;
+ struct annotate_metadata oldmdata;
+ r = read_old_value(d, key, keylen, &oldval, &oldmdata);
+ if (r) goto out;
- /* if the value is identical, don't touch the mailbox */
- if (oldval.len == value->len && (!value->len || !memcmp(oldval.s, value->s, value->len)))
- goto out;
+ /* if the value is identical, don't touch the mailbox */
+ if (oldval.len == value->len && (!value->len || !memcmp(oldval.s, value->s, value->len)))
+ goto out;
+
+ if (!maywrite) {
+ r = IMAP_PERMISSION_DENIED;
+ if (r) goto out;
+ }
+ if (mailbox) {
if (!ignorequota) {
quota_t qdiffs[QUOTA_NUMRESOURCES] = QUOTA_DIFFS_DONTCARE_INITIALIZER;
qdiffs[QUOTA_ANNOTSTORAGE] = value->len - (quota_t)oldval.len;
@@ -2804,11 +2809,6 @@ static int write_entry(struct mailbox *mailbox,
if (r) goto out;
}
- if (!maywrite) {
- r = IMAP_PERMISSION_DENIED;
- if (r) goto out;
- }
-
/* do the annot-changed here before altering the DB */
mailbox_annot_changed(mailbox, uid, entry, userid, &oldval, value, silent);

View File

@ -1,10 +0,0 @@
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ all clean install::
all:: syntax
-SCRIPTS := $(shell find . -type f -name '*.pl' | sort)
+SCRIPTS := $(shell find . -type f -name '*.pl' | grep -v 'utils\/annotator.pl' | sort)
MODULES := $(shell find . -type f -name '*.pm' | sort)

View File

@ -2,7 +2,7 @@
# Cassandane commit hash. Cassandane doesn't have releases often, but it
# receives constant development. This was fetched on 20180518.
%global cocas 8d3fced95e77ba2e4d3b9f1f3c75f180d9abe444
%global cocas 693da6118c0faa9ff1515c615c88be150c3e36c9
%global cocas_short %(echo %{cocas} | cut -c -8)
%global testdata_commit ca669d4b76c71cbeb4fa840e263e2c031e19ea88
@ -13,8 +13,9 @@
%bcond_without cassandane
Name: cyrus-imapd
Version: 3.2.6
Release: 13%{?dist}
Version: 3.4.1
Release: 2%{?dist}
%define ssl_pem_file_prefix /etc/pki/%name/%name
@ -54,7 +55,6 @@ Patch2: patch-cyrus-rename-quota
# https://github.com/cyrusimap/cyrus-imapd/issues/2629#issuecomment-456925909
Patch4: patch-cyrus-perl-linking
Patch100: cyrus-imapd-CVE-2021-32056.patch
Source10: cyrus-imapd.logrotate
Source11: cyrus-imapd.pam-config
@ -84,7 +84,6 @@ Source91: patch-cassandane-no-syslog
# Upstream ticket https://github.com/cyrusimap/cyrus-imapd/issues/1995
Source92: patch-cassandane-fix-annotator
Source93: cyrus-imapd-annotator.patch
BuildRequires: autoconf automake bison flex gcc gcc-c++ git glibc-langpack-en
BuildRequires: groff libtool pkgconfig rsync systemd transfig
@ -140,6 +139,7 @@ BuildRequires: perl(XML::Generator) perl(XML::Spice)
%if 0%{?fedora} && 0%{?fedora} >= 0
BuildRequires: clamav-data
%endif
BuildRequires: perl(Unix::Syslog)
BuildRequires: perl(HTTP::Daemon) perl(DBI) perl(Net::LDAP::Constant)
BuildRequires: perl(Net::LDAP::Server)
@ -255,7 +255,6 @@ tar xf %SOURCE81
patch -p1 < %SOURCE91
patch -p1 < %SOURCE92
patch -p1 < %SOURCE93
cp %SOURCE82 cassandane.ini
# RF rpm-buildroot-usage
@ -282,23 +281,19 @@ sed -i \
-e '/^#!perl -w/d' \
-e '/^#!\/bin\/sh/d' \
-e '/^#! \/bin\/sh/d' \
snmp/snmpgen perl/sieve/scripts/installsieve.pl \
perl/sieve/scripts/installsieve.pl \
perl/sieve/scripts/sieveshell.pl perl/imap/cyradm.sh tools/config2header \
tools/masssievec tools/config2rst tools/mknewsgroups tools/config2sample \
tools/mkimap tools/translatesieve
%build
# This package fails its testsuite on s390x when LTO is enabled. Root cause
# analysis has not yet been performed
%ifarch s390x
%define _lto_cflags %{nil}
%endif
# This is the test suite, which doesn't build much but does verify its dependencies.
# If this is done after the configure call, the one thing it does build fails
# because the configure macro puts some hardening flags into the environment.
%if %{with cassandane}
pushd cassandane
export NOCYRUS=1
make
popd
%endif
@ -494,11 +489,11 @@ export CYRUS_USER=$USER
make %{?_smp_mflags} check || exit 1
%if %{without cassandane}
%ifarch %{ix86} armv7hl ppc64le
exit 0
%endif
%ifarch ppc64le %ix86
%if %{without cassandane}
exit 0
%endif
@ -526,6 +521,13 @@ tests=(
Rename.intermediate_cleanup
## FIXME
## Following tests started to fail with rebase and in rhel/centos only
Cyrus::ImapTest.urlauth-binary
Reconstruct.reconstruct_snoozed
SearchSquat.simple
SearchSquat.skip_unmodified
)
for i in ${tests[@]}; do exclude+=("!$i"); done
@ -659,23 +661,23 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
%changelog
* Thu Aug 19 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.4.1-2
- bump release
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com>
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Aug 5 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.4.1-1
- Update to v3.4.1
* Mon Jul 12 2021 Honza Horak <hhorak@redhat.com> - 3.2.6-12
- Require mariadb-connector-c-devel instead of mariadb-devel
Resolves: #1981257
* Mon Jul 12 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.6-10
- Fix for CVE-2021-32056
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com>
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065
* Thu May 6 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.6-9
- Wait for network to be online (#1957608)
* Fri Jun 11 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.6-6
- Disable tests on 32bit arches. Started to fail with perl rebase
* Thu Apr 29 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.6-8
- Add pregerated man pages
@ -683,10 +685,13 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
* Mon Apr 26 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.6-7
- Add python3-sphinx BR to properly build man pages
* Tue Apr 20 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.6-6
- disable tests on ix86 to workaround brew bug
* Mon Apr 26 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.6-7
- Add python3-sphinx BR to properly build man pages
* Wed Mar 17 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.6-4
* Mon Mar 22 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.6-2
- Require online target to prevent binding to down devices
* Wed Mar 17 2021 Pavel Zhukov <pzhukov@redhat.com> - 3.2.6-3
- Do not require clamav in rhel
- Disable tests for ppc64le
- Disable tests for ix86 to work brew bug around

View File

@ -1,4 +1,4 @@
SHA512 (cyrus-manpages-3.2.6.tar.gz) = b1ce700707e8c2848125ecb2a4203ac93bde42582055dcb0d30124dd8601a9564e87069264b14cff95ff5c5cf5810682c8c523c907f3167c8923580c8be3e805
SHA512 (cyrus-imapd-3.2.6.tar.gz) = b9760aac7ce6f39c183204764270867702d59d8f2afc50d4c782b5232c4ea95e79dee608e957098a49bd6473042e0ff0512929a482edd2c63e1f125cc108df36
SHA512 (cassandane-693da61.tar.gz) = 63f381bdd1404a90a029610b08e2a0ad621203eabae441f457821cecfd769f5c30acaeb997ab83adfb8c77ce630b9655baeca1079ca5fbec84bf01c0ae6e8863
SHA512 (cassandane-testdata-ca669d4b.tar.gz) = c153ab0a57d04d9deeabc5ef724eaecc05030c23b170abaa44eaea2e7df409efcdeb24871f7896759e85d64193fb9f289a470b0af9a593a740ffcc45c80033ff
SHA512 (cassandane-8d3fced.tar.gz) = b276a100a32f7348e7a07c30d1d6592ddc189fa0ce4f23d51b2f189da16c1c8e8b7ceab48281e2f284e199346bc6b508366131c285d4caf084b3ce922b2d4787
SHA512 (cyrus-imapd-3.4.1.tar.gz) = 9fd13e93755aca98215c1bd9c21fa3ef3a3db8b1ff48f71dd6070e614e9c68cb591b1cb411fa1319d46ab1d49ddc971f188a41cc0c9a2e2c9df0cc08299f8bfa
SHA512 (cyrus-manpages-3.2.6.tar.gz) = b1ce700707e8c2848125ecb2a4203ac93bde42582055dcb0d30124dd8601a9564e87069264b14cff95ff5c5cf5810682c8c523c907f3167c8923580c8be3e805