Update to 3.0.3.

- Update to 3.0.3, which contains an important security fix.  The fix is not
  embargoed but no CVE has been assigned yet.
- Drop patches merged upstream.
- An update of imaptest has resulted in three additional cassandane failures,
  reported upstream as https://github.com/cyrusimap/cyrus-imapd/issues/2087.
  In order to get the security fix out without delay, those three tests have been
  disabled.
This commit is contained in:
Jason Tibbitts 2017-08-11 11:20:12 -05:00
parent 514ad06e8e
commit a3910120e8
5 changed files with 20 additions and 209 deletions

View File

@ -8,8 +8,8 @@
%bcond_without cassandane
Name: cyrus-imapd
Version: 3.0.2
Release: 9%{?dist}
Version: 3.0.3
Release: 1%{?dist}
%define ssl_pem_file /etc/pki/%name/%name.pem
@ -32,17 +32,9 @@ Patch0: patch-cyrus-testsuite-timeout
# Upstream https://github.com/cyrusimap/cyrus-imapd/issues/2026
Patch1: patch-cyrus-managesieve-linking
# Upstream https://github.com/cyrusimap/cyrus-imapd/issues/2039
Patch2: patch-cyrus-pkgconfig-file
# Fedora-specific patch for the default configuration file
Patch3: patch-cyrus-default-configs
# Fix bugs in jmap turned up by Cassandane
# https://github.com/cyrusimap/cyrus-imapd/issues/2042
Patch4: patch-cyrus-jmapcalendar
Patch5: patch-cyrus-jmapcalendar2
Source10: cyrus-imapd.logrotate
Source11: cyrus-imapd.pam-config
Source12: cyrus-imapd.sysconfig
@ -467,6 +459,12 @@ tests=(
# As of yet unexplained
# https://github.com/cyrusimap/cyrus-imapd/issues/2047
Admin.imap_admins
# Three new failures with imaptest 20170719
# https://github.com/cyrusimap/cyrus-imapd/issues/2087
ImapTest.append-binary
ImapTest.fetch-binary-mime
ImapTest.urlauth-binary
)
for i in ${tests[@]}; do exclude+=("!$i"); done
@ -608,6 +606,15 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
%changelog
* Fri Aug 11 2017 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.0.3-1
- Update to 3.0.3, which contains an important security fix. The fix is not
embargoed but no CVE has been assigned yet.
- Drop patches merged upstream.
- An update of imaptest has resulted in three additional cassandane failures,
reported upstream as https://github.com/cyrusimap/cyrus-imapd/issues/2087.
In order to get the security fix out without delay, those three tests have been
disabled.
* Fri Aug 11 2017 Igor Gnatenko <ignatenko@redhat.com> - 3.0.2-9
- Rebuilt after RPM update (№ 3)

View File

@ -1,32 +0,0 @@
From 096984a8009b2eac99f8acd574cd9726ae2005ae Mon Sep 17 00:00:00 2001
From: Robert Stepanek <rsto@fastmail.com>
Date: Thu, 29 Jun 2017 13:19:32 +0200
Subject: [PATCH] jmap_ical.c: use JSON_INTEGER_FORMAT to format libjansson
ints
---
imap/jmap_ical.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/imap/jmap_ical.c b/imap/jmap_ical.c
index 30ea8fb27..968b3c37c 100644
--- a/imap/jmap_ical.c
+++ b/imap/jmap_ical.c
@@ -3445,7 +3445,7 @@ recurrence_to_ical(context_t *ctx, icalcomponent *comp, json_t *recur)
buf_appendcstr(&buf, ",");
}
if (nth) {
- buf_printf(&buf, "%+lld", nth);
+ buf_printf(&buf, "%+"JSON_INTEGER_FORMAT, nth);
}
buf_appendcstr(&buf, day);
free(day);
@@ -3660,7 +3660,7 @@ links_to_ical(context_t *ctx, icalcomponent *comp, json_t *links)
/* size */
if (size >= 0) {
- buf_printf(&buf, "%lld", (long long) size);
+ buf_printf(&buf, "%"JSON_INTEGER_FORMAT, size);
icalproperty_add_parameter(prop, icalparameter_new_size(buf_cstring(&buf)));
buf_reset(&buf);
}

View File

@ -1,154 +0,0 @@
From c2b5c8e1853cd38b902f204061535d6fc3d6e0dc Mon Sep 17 00:00:00 2001
From: Robert Stepanek <rsto@fastmail.com>
Date: Fri, 30 Jun 2017 15:41:02 +0200
Subject: [PATCH] jmap*.c: use 'I' format string to unpack into json_int_t
variables
---
imap/jmap_calendar.c | 6 +++---
imap/jmap_contact.c | 8 ++++----
imap/jmap_ical.c | 2 +-
imap/jmap_mail.c | 14 +++++++-------
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/imap/jmap_calendar.c b/imap/jmap_calendar.c
index 3fea52507..ecb9ef729 100644
--- a/imap/jmap_calendar.c
+++ b/imap/jmap_calendar.c
@@ -2029,7 +2029,7 @@ static int getCalendarEventUpdates(struct jmap_req *req)
json_array_append_new(invalid, json_string("sinceState"));
}
}
- pe = readprop(req->args, "maxChanges", 0 /*mandatory*/, invalid, "i", &maxChanges);
+ pe = readprop(req->args, "maxChanges", 0 /*mandatory*/, invalid, "I", &maxChanges);
if (pe > 0) {
if (maxChanges <= 0) {
json_array_append_new(invalid, json_string("maxChanges"));
@@ -2562,7 +2562,7 @@ static int getCalendarEventList(struct jmap_req *req)
/* position */
json_int_t pos = 0;
if (JNOTNULL(json_object_get(req->args, "position"))) {
- pe = readprop(req->args, "position", 0 /*mandatory*/, invalid, "i", &pos);
+ pe = readprop(req->args, "position", 0 /*mandatory*/, invalid, "I", &pos);
if (pe > 0 && pos < 0) {
json_array_append_new(invalid, json_string("position"));
}
@@ -2571,7 +2571,7 @@ static int getCalendarEventList(struct jmap_req *req)
/* limit */
json_int_t limit = 0;
if (JNOTNULL(json_object_get(req->args, "limit"))) {
- pe = readprop(req->args, "limit", 0 /*mandatory*/, invalid, "i", &limit);
+ pe = readprop(req->args, "limit", 0 /*mandatory*/, invalid, "I", &limit);
if (pe > 0 && limit < 0) {
json_array_append_new(invalid, json_string("limit"));
}
diff --git a/imap/jmap_contact.c b/imap/jmap_contact.c
index 59142b560..499f9140b 100644
--- a/imap/jmap_contact.c
+++ b/imap/jmap_contact.c
@@ -602,7 +602,7 @@ static int getContactGroupUpdates(struct jmap_req *req)
json_t *invalid = json_pack("[]");
json_int_t max_records = 0;
- pe = readprop(req->args, "maxChanges", 0 /*mandatory*/, invalid, "i", &max_records);
+ pe = readprop(req->args, "maxChanges", 0 /*mandatory*/, invalid, "I", &max_records);
if (pe > 0) {
if (max_records <= 0) {
json_array_append_new(invalid, json_string("maxChanges"));
@@ -1676,7 +1676,7 @@ static int getContactUpdates(struct jmap_req *req)
invalid = json_pack("[]");
json_int_t max_records = 0;
- pe = readprop(req->args, "maxChanges", 0 /*mandatory*/, invalid, "i", &max_records);
+ pe = readprop(req->args, "maxChanges", 0 /*mandatory*/, invalid, "I", &max_records);
if (pe > 0) {
if (max_records <= 0) {
json_array_append_new(invalid, json_string("maxChanges"));
@@ -2137,7 +2137,7 @@ static int getContactList(struct jmap_req *req)
/* position */
json_int_t pos = 0;
if (JNOTNULL(json_object_get(req->args, "position"))) {
- pe = readprop(req->args, "position", 0 /*mandatory*/, invalid, "i", &pos);
+ pe = readprop(req->args, "position", 0 /*mandatory*/, invalid, "I", &pos);
if (pe > 0 && pos < 0) {
json_array_append_new(invalid, json_string("position"));
}
@@ -2147,7 +2147,7 @@ static int getContactList(struct jmap_req *req)
/* limit */
json_int_t limit = 0;
if (JNOTNULL(json_object_get(req->args, "limit"))) {
- pe = readprop(req->args, "limit", 0 /*mandatory*/, invalid, "i", &limit);
+ pe = readprop(req->args, "limit", 0 /*mandatory*/, invalid, "I", &limit);
if (pe > 0 && limit < 0) {
json_array_append_new(invalid, json_string("limit"));
}
diff --git a/imap/jmap_ical.c b/imap/jmap_ical.c
index 968b3c37c..c0d4910f5 100644
--- a/imap/jmap_ical.c
+++ b/imap/jmap_ical.c
@@ -3428,7 +3428,7 @@ recurrence_to_ical(context_t *ctx, icalcomponent *comp, json_t *recur)
/* nthOfPeriod */
nth = 0;
- pe = readprop(ctx, bd, "nthOfPeriod", 0, "i", &nth);
+ pe = readprop(ctx, bd, "nthOfPeriod", 0, "I", &nth);
if (pe > 0 && !nth) {
invalidprop(ctx, "nthOfPeriod");
}
diff --git a/imap/jmap_mail.c b/imap/jmap_mail.c
index 4a5592119..aad827fc7 100644
--- a/imap/jmap_mail.c
+++ b/imap/jmap_mail.c
@@ -1664,7 +1664,7 @@ static int getMailboxUpdates(jmap_req_t *req)
json_array_append_new(invalid, json_string("sinceState"));
}
/* maxChanges */
- pe = readprop(req->args, "maxChanges", 0, invalid, "i", &max_changes);
+ pe = readprop(req->args, "maxChanges", 0, invalid, "I", &max_changes);
if (pe > 0 && max_changes < 0) {
json_array_append_new(invalid, json_string("maxChanges"));
}
@@ -3143,8 +3143,8 @@ static void validatefilter(json_t *filter, const char *prefix, json_t *invalid)
readprop_full(filter, prefix, "inMailbox", 0, invalid, "s", &s);
readprop_full(filter, prefix, "inMailboxOtherThan", 0, invalid, "s", &s);
- readprop_full(filter, prefix, "minSize", 0, invalid, "i", &num);
- readprop_full(filter, prefix, "maxSize", 0, invalid, "i", &num);
+ readprop_full(filter, prefix, "minSize", 0, invalid, "I", &num);
+ readprop_full(filter, prefix, "maxSize", 0, invalid, "I", &num);
readprop_full(filter, prefix, "threadIsFlagged", 0, invalid, "b", &b);
readprop_full(filter, prefix, "threadIsUnread", 0, invalid, "b", &b);
readprop_full(filter, prefix, "isFlagged", 0, invalid, "b", &b);
@@ -3575,12 +3575,12 @@ static int getMessageList(jmap_req_t *req)
readprop(req->args, "anchor", 0, invalid, "s", &window.anchor);
readprop(req->args, "anchorOffset", 0, invalid, "i", &window.anchor_off);
- if (readprop(req->args, "position", 0, invalid, "i", &i) > 0) {
+ if (readprop(req->args, "position", 0, invalid, "I", &i) > 0) {
if (i < 0) json_array_append_new(invalid, json_string("position"));
window.position = i;
}
- if (readprop(req->args, "limit", 0, invalid, "i", &i) > 0) {
+ if (readprop(req->args, "limit", 0, invalid, "I", &i) > 0) {
if (i < 0) json_array_append_new(invalid, json_string("limit"));
window.limit = i;
}
@@ -3708,7 +3708,7 @@ static int getMessageUpdates(jmap_req_t *req)
}
/* maxChanges */
memset(&window, 0, sizeof(struct getmsglist_window));
- readprop(req->args, "maxChanges", 0, invalid, "i", &max);
+ readprop(req->args, "maxChanges", 0, invalid, "I", &max);
if (max < 0) json_array_append_new(invalid, json_string("maxChanges"));
window.limit = max;
/* fetch */
@@ -3803,7 +3803,7 @@ static int getThreadUpdates(jmap_req_t *req)
}
/* maxChanges */
memset(&window, 0, sizeof(struct getmsglist_window));
- readprop(req->args, "maxChanges", 0, invalid, "i", &max);
+ readprop(req->args, "maxChanges", 0, invalid, "I", &max);
if (max < 0) json_array_append_new(invalid, json_string("maxChanges"));
window.limit = max;

View File

@ -1,13 +1,13 @@
diff --git a/perl/sieve/managesieve/Makefile.PL.in b/perl/sieve/managesieve/Makefile.PL.in
index 45ae8ea..14d5327 100644
index 2bb715d..422504d 100644
--- a/perl/sieve/managesieve/Makefile.PL.in
+++ b/perl/sieve/managesieve/Makefile.PL.in
@@ -69,7 +69,7 @@ WriteMakefile(
'ABSTRACT' => 'Cyrus Sieve management interface',
'VERSION_FROM' => "@top_srcdir@/perl/sieve/managesieve/managesieve.pm", # finds $VERSION
'MYEXTLIB' => '../lib/.libs/libisieve.a @top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
- 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@"],
+ 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ -lsqlite3 -lpq"],
- 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@"],
+ 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@ -lsqlite3 -lpq"],
'CCFLAGS' => '@GCOV_CFLAGS@',
'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
'INC' => "-I@top_srcdir@/lib -I@top_srcdir@/perl/sieve -I@top_srcdir@/perl/sieve/lib @SASLFLAGS@ @SSL_CPPFLAGS@",

View File

@ -1,10 +0,0 @@
diff --git a/libcyrus.pc.in b/libcyrus.pc.in
index 572436b..81cc640 100644
--- a/libcyrus.pc.in
+++ b/libcyrus.pc.in
@@ -5,4 +5,4 @@ Cflags: @SSL_CPPFLAGS@ @SASLFLAGS@
Version: @PACKAGE_VERSION@
Requires.private: libcyrus_min = @PACKAGE_VERSION@
Libs: -lcyrus
-Libs.private: @LIB_RT@ @LIB_SASL@ @SSL_LIBS@
+Libs.private: @LIB_SASL@ @SSL_LIBS@