Compare commits

..

1 commit

Author SHA1 Message Date
Jason Tibbitts
711bf49043 Handle the new ClamAV API
A new release of ClamAV was pushed out, even to stable releases.  This
update required a rebuild of any package using libclamav.  It also
changed the API, requiring a patch.
2019-01-14 23:56:08 -06:00
33 changed files with 1527 additions and 2519 deletions

View file

@ -1 +0,0 @@
1

9
.gitignore vendored
View file

@ -2,6 +2,11 @@
/.build-*.log
/.*.swp
/results_cyrus-imapd/
/cyrus-imapd-*/
/cyrus-imapd-*.tar.gz
/cyrus-imapd-*.gz.sig
/cyrus-imapd-*/
/cassandane-testdata-20170523.tar.gz
/cassandane-b97ba9c.tar.gz
/cassandane-0a6c13e.tar.gz
/cassandane-2f8f3f4.tar.gz
/cassandane-6d33978.tar.gz
/cassandane-6bd697c.tar.gz

View file

@ -0,0 +1,240 @@
From 1966c22fc4249a1157a4d4c1224138ce78653514 Mon Sep 17 00:00:00 2001
From: Ken Murchison <murch@andrew.cmu.edu>
Date: Sat, 21 Oct 2017 19:04:08 -0400
Subject: [PATCH] Account for the removal of icaltimetype.is_utc field in
upcoming libical
---
configure.ac | 5 +++++
imap/http_caldav.c | 2 +-
imap/http_caldav_sched.c | 4 ++--
imap/http_tzdist.c | 22 +++++++++++-----------
imap/ical_support.c | 9 +++++++++
imap/ical_support.h | 2 ++
imap/jmap_ical.c | 4 ++--
imap/xcal.c | 4 ++--
8 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index b7f2d0da9..8eb11966d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1492,6 +1492,11 @@ dnl
icalrecur_freq_to_string, icalrecur_weekday_to_string],
[], [], [[#include <libical/ical.h>]])
+ AC_CHECK_MEMBER(icaltimetype.is_utc,
+ AC_DEFINE(ICALTIME_HAS_IS_UTC,[],
+ [Does icaltimetype have is_utc field?]),
+ [], [#include <libical/ical.h>])
+
AC_CHECK_LIB(ical, icalproperty_new_acknowledged,
AC_DEFINE(HAVE_VALARM_EXT_PROPS,[],
[Do we have built-in support for VALARM extensions props?]))
diff --git a/imap/http_caldav.c b/imap/http_caldav.c
index eb9d4add1..4cb11d228 100644
--- a/imap/http_caldav.c
+++ b/imap/http_caldav.c
@@ -2391,7 +2391,7 @@ static struct icaltimetype icaltime_from_rfc3339_string(const char *str)
goto fail;
}
- tt.is_utc = 1;
+ icaltime_set_utc(&tt, 1);
return tt;
fail:
diff --git a/imap/http_caldav_sched.c b/imap/http_caldav_sched.c
index 1dc97a501..b896d871a 100644
--- a/imap/http_caldav_sched.c
+++ b/imap/http_caldav_sched.c
@@ -355,7 +355,7 @@ static int imip_send_sendmail(icalcomponent *ical,
cp += sprintf(cp, "%s, %02u %s %04u",
day_of_week[icaltime_day_of_week(start)-1],
start.day, month_of_year[start.month-1], start.year);
- if (!start.is_date) {
+ if (!icaltime_is_date(start)) {
cp += sprintf(cp, " %02u:%02u", start.hour, start.minute);
if (start.second) cp += sprintf(cp, ":%02u", start.second);
strcpy(cp, " UTC");
@@ -370,7 +370,7 @@ static int imip_send_sendmail(icalcomponent *ical,
day_of_week[icaltime_day_of_week(end)-1],
end.day, month_of_year[end.month-1], end.year);
}
- if (!end.is_date) {
+ if (!icaltime_is_date(end)) {
cp += sprintf(cp, " %02u:%02u", end.hour, end.minute);
if (end.second) cp += sprintf(cp, ":%02u", end.second);
strcpy(cp, " UTC");
diff --git a/imap/http_tzdist.c b/imap/http_tzdist.c
index 258440ce9..a88e8bf68 100644
--- a/imap/http_tzdist.c
+++ b/imap/http_tzdist.c
@@ -1376,7 +1376,7 @@ static void truncate_vtimezone(icalcomponent *vtz,
/* Adjust DTSTART observance to UTC */
icaltime_adjust(&obs.onset, 0, 0, 0, -obs.offset_from);
- obs.onset.is_utc = 1;
+ icaltime_set_utc(&obs.onset, 1);
/* Check DTSTART vs window close */
if (!icaltime_is_null_time(end) &&
@@ -1451,7 +1451,7 @@ static void truncate_vtimezone(icalcomponent *vtz,
if (!eternal) {
/* Adjust UNTIL to local time (for iterator) */
icaltime_adjust(&rrule.until, 0, 0, 0, obs.offset_from);
- rrule.until.is_utc = 0;
+ icaltime_set_utc(&rrule.until, 0);
}
if (trunc_dtstart) {
@@ -1475,7 +1475,7 @@ static void truncate_vtimezone(icalcomponent *vtz,
/* Adjust observance to UTC */
icaltime_adjust(&obs.onset, 0, 0, 0, -obs.offset_from);
- obs.onset.is_utc = 1;
+ icaltime_set_utc(&obs.onset, 1);
if (trunc_until && icaltime_compare(obs.onset, end) >= 0) {
/* Observance is on/after window close */
@@ -1580,7 +1580,7 @@ static void truncate_vtimezone(icalcomponent *vtz,
/* Adjust observance to UTC */
icaltime_adjust(&obs.onset, 0, 0, 0, -obs.offset_from);
- obs.onset.is_utc = 1;
+ icaltime_set_utc(&obs.onset, 1);
if (!icaltime_is_null_time(end) &&
icaltime_compare(obs.onset, end) >= 0) {
@@ -1691,7 +1691,7 @@ static void truncate_vtimezone(icalcomponent *vtz,
case ICAL_DTSTART_PROPERTY:
/* Adjust window open to local time */
icaltime_adjust(&start, 0, 0, 0, tombstone.offset_from);
- start.is_utc = 0;
+ icaltime_set_utc(&start, 0);
icalproperty_set_dtstart(prop, start);
break;
@@ -1775,14 +1775,14 @@ static int action_get(struct transaction_t *txn)
/* Sanity check the parameters */
if ((param = hash_lookup("start", &txn->req_qparams))) {
start = icaltime_from_string(param->s);
- if (param->next || !start.is_utc) { /* once only, UTC */
+ if (param->next || !icaltime_is_utc(start)) { /* once only, UTC */
return json_error_response(txn, TZ_INVALID_START, param, &start);
}
}
if ((param = hash_lookup("end", &txn->req_qparams))) {
end = icaltime_from_string(param->s);
- if (param->next || !end.is_utc /* once only, UTC */
+ if (param->next || !icaltime_is_utc(end) /* once only, UTC */
|| icaltime_compare(end, start) <= 0) { /* end MUST be > start */
return json_error_response(txn, TZ_INVALID_END, param, &end);
}
@@ -1956,7 +1956,7 @@ static int action_expand(struct transaction_t *txn)
return json_error_response(txn, TZ_INVALID_START, param, NULL);
start = icaltime_from_string(param->s);
- if (!start.is_utc) /* MUST be UTC */
+ if (!icaltime_is_utc(start)) /* MUST be UTC */
return json_error_response(txn, TZ_INVALID_START, param, &start);
param = hash_lookup("end", &txn->req_qparams);
@@ -1964,7 +1964,7 @@ static int action_expand(struct transaction_t *txn)
return json_error_response(txn, TZ_INVALID_END, param, NULL);
end = icaltime_from_string(param->s);
- if (!end.is_utc /* MUST be UTC */
+ if (!icaltime_is_utc(end) /* MUST be UTC */
|| icaltime_compare(end, start) <= 0) { /* end MUST be > start */
return json_error_response(txn, TZ_INVALID_END, param, &end);
}
@@ -2237,7 +2237,7 @@ static int json_error_response(struct transaction_t *txn, long tz_code,
else if (param->next) fmt = "Multiple %s parameters";
else if (!param->s || !param->s[0]) fmt = "Missing %s value";
else if (!time) fmt = "Invalid %s value";
- else if (!time->is_utc) fmt = "Invalid %s UTC value";
+ else if (!icaltime_is_utc(*time)) fmt = "Invalid %s UTC value";
else fmt = "End date-time <= start date-time";
assert(!buf_len(&txn->buf));
@@ -2500,7 +2500,7 @@ static struct buf *_icaltimezone_as_tzfile(icalcomponent* ical,
for (n = 0; n < obsarray->num_elements; n++) {
long long int t;
unsigned typeidx;
- icaltimetype tt_1601 = { 1601, 1, 1, 0, 0, 0, 1, 0, 0, NULL };
+ icaltimetype tt_1601 = icaltime_from_string("1601-01-01T00:00:00Z");
obs = icalarray_element_at(obsarray, n);
t = icaltime_to_gmtime64(obs->onset);
diff --git a/imap/ical_support.c b/imap/ical_support.c
index 3deb649b1..13861b25a 100644
--- a/imap/ical_support.c
+++ b/imap/ical_support.c
@@ -833,6 +833,15 @@ icalrecurrenceset_get_utc_timespan(icalcomponent *ical,
return span;
}
+EXPORTED void icaltime_set_utc(struct icaltimetype *t, int set)
+{
+#ifdef ICALTIME_HAS_IS_UTC
+ t->is_utc = set;
+#else
+ icaltime_set_timezone(t, set ? icaltimezone_get_utc_timezone() : NULL);
+#endif
+}
+
#ifndef HAVE_TZDIST_PROPS
diff --git a/imap/ical_support.h b/imap/ical_support.h
index 8db35ed1f..0336d59e1 100644
--- a/imap/ical_support.h
+++ b/imap/ical_support.h
@@ -100,6 +100,8 @@ extern struct icalperiodtype icalrecurrenceset_get_utc_timespan(icalcomponent *i
void*),
void *cb_rock);
+extern void icaltime_set_utc(struct icaltimetype *t, int set);
+
/* Functions not declared in in libical < v2.0 */
diff --git a/imap/jmap_ical.c b/imap/jmap_ical.c
index c0d4910f5..dd8460f36 100644
--- a/imap/jmap_ical.c
+++ b/imap/jmap_ical.c
@@ -737,7 +737,7 @@ static const char *tzid_from_icalprop(icalproperty *prop, int guess) {
} else {
icalvalue *val = icalproperty_get_value(prop);
icaltimetype dt = icalvalue_get_datetime(val);
- if (icaltime_is_valid_time(dt) && dt.is_utc) {
+ if (icaltime_is_valid_time(dt) && icaltime_is_utc(dt)) {
tzid = "Etc/UTC";
}
}
@@ -2615,7 +2615,7 @@ static icalproperty *dtprop_to_ical(icalcomponent *comp,
/* Set the new property. */
prop = icalproperty_new(kind);
icalproperty_set_value(prop, val);
- if (tz && !dt.is_utc) {
+ if (tz && !icaltime_is_utc(dt)) {
icalparameter *param = icalproperty_get_first_parameter(prop, ICAL_TZID_PARAMETER);
const char *tzid = icaltimezone_get_location(tz);
if (param) {
diff --git a/imap/xcal.c b/imap/xcal.c
index 27a32d96b..36129fdcc 100644
--- a/imap/xcal.c
+++ b/imap/xcal.c
@@ -115,8 +115,8 @@ const char *icaltime_as_iso_string(const struct icaltimetype tt)
static char str[21];
const char *fmt;
- if (tt.is_date) fmt = "%04d-%02d-%02d";
- else if (tt.is_utc) fmt = "%04d-%02d-%02dT%02d:%02d:%02dZ";
+ if (icaltime_is_date(tt)) fmt = "%04d-%02d-%02d";
+ else if (icaltime_is_utc(tt)) fmt = "%04d-%02d-%02dT%02d:%02d:%02dZ";
else fmt = "%04d-%02d-%02dT%02d:%02d:%02d";
snprintf(str, sizeof(str), fmt, tt.year, tt.month, tt.day,

View file

@ -0,0 +1,23 @@
From 24af24aa77144e0c1ab976657833b470502be7a8 Mon Sep 17 00:00:00 2001
From: Robert Stepanek <rsto@fastmail.com>
Date: Mon, 26 Feb 2018 22:00:34 +0100
Subject: [PATCH] xapian_wrap.cpp: change set_stem_version signature to return
void
---
imap/xapian_wrap.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/imap/xapian_wrap.cpp b/imap/xapian_wrap.cpp
index 0afb73674..ce07cdcf6 100644
--- a/imap/xapian_wrap.cpp
+++ b/imap/xapian_wrap.cpp
@@ -259,7 +259,7 @@ static int stem_version_get(Xapian::Database *database)
return version;
}
-static int stem_version_set(Xapian::WritableDatabase *database, int version)
+static void stem_version_set(Xapian::WritableDatabase *database, int version)
{
std::ostringstream convert;
convert << version;

View file

@ -0,0 +1,29 @@
From 7214a7e3a60c628575a73dab0437e065b9e9a32a Mon Sep 17 00:00:00 2001
From: Pavel Zhukov <pzhukov@redhat.com>
Date: Tue, 27 Feb 2018 09:48:13 +0100
Subject: [PATCH] Check if mechlist buffer is not empty
Check if mechlist is null is redundant because it's initialized in
ask_capabilities flow. As the result some capabilities may be lost and
reported as not advertised
Keeping (now reduntant) null check to avoid regressions in the future
This is regression in 9fd201ba2b4ab58eda3372fb6765e1d5d8f027b4
Bug-Url: https://bugzilla.redhat.com/1543481
---
imtest/imtest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/imtest/imtest.c b/imtest/imtest.c
index 716e2b252..85f4cc5ce 100644
--- a/imtest/imtest.c
+++ b/imtest/imtest.c
@@ -3084,7 +3084,7 @@ int main(int argc, char **argv)
/* try to get the capabilities from the banner */
mechlist = ask_capability(protocol, servername,
&capabilities, AUTO_BANNER);
- if (!mechlist && !(capabilities & CAPA_STARTTLS)) {
+ if ((!mechlist || !buf_len(mechlist)) && !(capabilities & CAPA_STARTTLS)) {
/* found no capabilities in banner -> get them explicitly */
protocol->banner.is_capa = 0;
}

View file

@ -0,0 +1,43 @@
From 79244173353d95149ad1944f61cc6bd2e43bd7d4 Mon Sep 17 00:00:00 2001
From: ellie timoney <ellie@fastmail.com>
Date: Tue, 20 Feb 2018 13:17:39 +1100
Subject: [PATCH] master: reject unix domain listen paths that are too long
Fixes #2253
---
master/master.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/master/master.c b/master/master.c
index 325afd42f..a28731fd0 100644
--- a/master/master.c
+++ b/master/master.c
@@ -496,6 +496,12 @@ static void service_create(struct service *s)
EX_SOFTWARE);
if (s->listen[0] == '/') { /* unix socket */
+ if (strlen(s->listen) >= sizeof(sunsock.sun_path)) {
+ syslog(LOG_ERR, "invalid listen '%s' (too long), disabling %s",
+ s->listen, s->name);
+ service_forget_exec(s);
+ return;
+ }
res0_is_local = 1;
res0 = (struct addrinfo *)xzmalloc(sizeof(struct addrinfo));
res0->ai_flags = AI_PASSIVE;
@@ -513,7 +519,14 @@ static void service_create(struct service *s)
sunsock.sun_len = res0->ai_addrlen;
#endif
sunsock.sun_family = AF_UNIX;
- strcpy(sunsock.sun_path, s->listen);
+
+ int r = snprintf(sunsock.sun_path, sizeof(sunsock.sun_path), "%s", s->listen);
+ if (r < 0 || (size_t) r >= sizeof(sunsock.sun_path)) {
+ /* belt and suspenders */
+ fatal("Serious software bug found: "
+ "over-long listen path not detected earlier!",
+ EX_SOFTWARE);
+ }
unlink(s->listen);
} else { /* inet socket */
char *port;

View file

@ -4,15 +4,12 @@
# The idea here is to run tests on the just-compiled version of cyrus-imapd.
# However, many of the build locations are just random temporary directories, and
# so this requires some finesse.
#
# Example config: https://github.com/cyrusimap/cyrus-imapd/blob/master/cassandane/cassandane.ini.example
[cassandane]
rootdir = CASSDIR/work
pwcheck = alwaystrue # This is enabled in Fedora builds
cleanup = no
maxworkers = 1
base_port = 19100
#[valgrind]
#enabled = no
@ -37,10 +34,9 @@ quota = cyr_quota
# backupd = yes
[config]
# Keep altnamespace on by default, many tests fail when set to no
#altnamespace = no
#unixhierarchysep = no
#client_timeout = 60
altnamespace = no
unixhierarchysep = no
client_timeout = 60
#[caldavtalk]
#basedir = CASSDIR/cassandane/testdata

1613
changelog

File diff suppressed because it is too large Load diff

1
ci.fmf
View file

@ -1 +0,0 @@
resultsdb-testcase: separate

View file

@ -7,6 +7,5 @@ ConditionPathExists=!/etc/pki/cyrus-imapd/cyrus-imapd-ca.pem
[Service]
Type=oneshot
Group=mail
RemainAfterExit=no
ExecStart=/usr/bin/sscg --cert-file /etc/pki/cyrus-imapd/cyrus-imapd.pem --cert-key-file /etc/pki/cyrus-imapd/cyrus-imapd-key.pem --ca-file /etc/pki/cyrus-imapd/cyrus-imapd-ca.pem --cert-key-mode=0640
ExecStart=/usr/bin/sscg --package cyrus-imapd --cert-file /etc/pki/cyrus-imapd/cyrus-imapd.pem --cert-key-file /etc/pki/cyrus-imapd/cyrus-imapd-key.pem --ca-file /etc/pki/cyrus-imapd/cyrus-imapd-ca.pem

409
cyrus-imapd.cvt_cyrusdb_all Normal file
View file

@ -0,0 +1,409 @@
#!/bin/bash
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# This script converts all db files of a cyrus installation from their
# existing format to the format required by the current installation.
# The format of current db files is determined using the 'file' command
# with a magic file added for skiplist db, the new format is read from
# a config file usually in /usr/share/cyrus-imapd/rpm/db.cfg, which is
# created while compiling. After converting, the db.cfg file is
# copied to a cache file usually at /var/lib/imap/rpm/db.cfg.cache to
# allow bypassing this converting script if both files are identical.
# While this is a bit less secure, it may be useful on big server where
# db converting is done automatically.
#
# This script can safely be run as root, it will reexec itself as user
# cyrus if needed.
#
# author: Simon Matter, Invoca Systems <simon.matter@invoca.ch>
# changelog
# v1.0.1, Oct 22 2002 Simon Matter <simon.matter@invoca.ch>
# - added two-step conversion method
#
# v1.0.2, Jan 10 2003 Simon Matter <simon.matter@invoca.ch>
# - fixed a bug where cvt_cyrusdb was called to convert empty or
# nonexistent files
#
# v1.0.3, Mar 14 2003 Simon Matter <simon.matter@invoca.ch>
# - fixed a problem with new versions of the file command
#
# v1.0.4
# - added GPL license
#
# v1.0.5, May 02 2003 Simon Matter <simon.matter@invoca.ch>
# - modified exec path
#
# v1.0.6, Jul 18 2003 Simon Matter <simon.matter@invoca.ch>
# - changed db3 to berkeley
# - added new db backends for 2.2
#
# v1.0.7, Jan 23 2004 Simon Matter <simon.matter@invoca.ch>
# - included some modifications from Luca Olivetti <luca@olivetti.cjb.net>
# - added masssievec functionality
#
# v1.0.8, Jan 28 2004 Simon Matter <simon.matter@invoca.ch>
# - convert sieve scripts to UTF-8 before calling masssievec
#
# v1.0.9, Jan 29 2004 Simon Matter <simon.matter@invoca.ch>
# - convert sieve scripts to UTF-8 only if sievec failed before
#
# v1.0.10, Feb 24 2004 Simon Matter <simon.matter@invoca.ch>
# - change su within init script to get input from
# /dev/null, this prevents hang when running in SELinux
#
# v1.0.11, Mar 02 2004 Simon Matter <simon.matter@invoca.ch>
# - fixed SELinux fix
#
# v1.0.12, Dec 16 2004 Simon Matter <simon.matter@invoca.ch>
# - use runuser instead of su if available
#
# v1.0.13, Jul 15 2005 Simon Matter <simon.matter@invoca.ch>
# - don't use flat in the two step conversion, use skiplist instead
#
# v1.0.14, Jul 18 2005 Simon Matter <simon.matter@invoca.ch>
# - replace the order of the magic files in the file call to make
# sure skiplist is detected correctly.
#
# v1.0.15, Aug 17 2005 Simon Matter <simon.matter@invoca.ch>
# - add functionality to export all berkeley db files to skiplist
#
# v1.1.0, Aug 18 2005 Simon Matter <simon.matter@invoca.ch>
# - fix export functionality, try to recover Berkeley databases
# as much as possible before any conversion.
#
# v1.1.1, Dec 05 2005 Simon Matter <simon.matter@invoca.ch>
# - run db_checkpoint in background with a timeout to prevent
# that cyrus-imapd doesn't start at all if it hangs.
#
# v1.1.2, Dec 06 2005 Simon Matter <simon.matter@invoca.ch>
# - make handling of db_checkpoint more robust
#
# v1.2.0, Jan 12 2006 Simon Matter <simon.matter@invoca.ch>
# - adopt for cyrus-imapd-2.3
#
# v1.2.1, Jan 13 2006 Simon Matter <simon.matter@invoca.ch>
# - code cleanup
#
# v1.2.2, Nov 29 2007 Simon Matter <simon.matter@invoca.ch>
# - add ability to handle "@include" options in imapd.conf, patch
# provided by Tim Bannister
#
# v1.2.3, Feb 07 2008 Simon Matter <simon.matter@invoca.ch>
# - add ability to handle tabs in imapd.conf, patch provided
# by Franz Knipp
# - disable default values for some config options like sievedir
#
# v1.2.4, Apr 23 2008 Simon Matter <simon.matter@invoca.ch>
# - add support for statuscache.db
#
# v1.3.0, Sep 29 2008 Simon Matter <simon.matter@invoca.ch>
# - add multi-instance support
#
# v1.3.1, Oct 09 2008 Simon Matter <simon.matter@invoca.ch>
# - improve variable handling
#
# v1.3.2, May 26 2009 Simon Matter <simon.matter@invoca.ch>
# - add some sanity checks to multi-instance support
#
# v1.3.3, May 27 2009 Simon Matter <simon.matter@invoca.ch>
# - make some cosmetic changes
#
# v1.3.4, Dec 22 2009 Simon Matter <simon.matter@invoca.ch>
# - add support for user_deny.db
VERSION=1.3.4
PIDFILE=/var/run/cyrus-master${INSTANCE}.pid
# instance config
CYRUSCONF=/etc/cyrus${INSTANCE}.conf
IMAPDCONF=/etc/imapd${INSTANCE}.conf
# make sure what we have is a valid instance
# and that config files are present
if [ -n "$INSTANCE" ]; then
[ -L /etc/rc.d/init.d/${BASENAME} ] || exit 0
fi
[ -f $CYRUSCONF ] || exit 0
[ -f $IMAPDCONF ] || exit 0
if [ -f $PIDFILE ]; then
read CYRUS_PID < $PIDFILE
if [ -n "$CYRUS_PID" ]; then
if ps -p $CYRUS_PID > /dev/null 2>&1; then
echo "ERROR: cyrus-master is running, unable to convert mailboxes!"
exit 1
fi
fi
fi
if [ ! -f $IMAPDCONF ]; then
echo "ERROR: configuration file '${IMAPDCONF}' not found, exiting!"
exit 1
fi
# fallback to su if runuser not available
if [ -x /sbin/runuser ]; then
RUNUSER=runuser
else
RUNUSER=su
fi
# force cyrus user for security reasons
if [ ! $(whoami) = "cyrus" ]; then
exec $RUNUSER - cyrus -c "cd $PWD < /dev/null ; INSTANCE=$INSTANCE $0 $*"
fi
# special function for migration
EXPORT=$1
# files get mode 0600
umask 166
# show version info in log files
echo "cvt_cyrusdb_all version: $VERSION"
# expand_config <path>
# handle "@include" sections from imapd style config file
expand_config() {
while read line; do
if printf "%s\n" "${line}" | grep -q '^@include:'; then
expand_config "$( printf "%s\n" "${line}" | cut -d : -f 2- | sed -e 's/^[\t ]*//' )"
else
printf "%s\n" "${line}"
fi
done < $1
}
# get_config <config> [<default>]
# extracts config option from config file
get_config() {
searchstr=$1
if config="$(expand_config $IMAPDCONF | egrep "^${searchstr}:")"; then
CFGVAL="$(printf "%s\n" "$config" | cut -d : -f 2- | sed -e 's/^[\t ]*//')"
else
if [ -z "$2" ]; then
echo "ERROR: config option '$1' not found in ${IMAPDCONF}, exiting!" 1>&2
return 1
fi
CFGVAL="$2"
fi
echo "get_config ${1}: $CFGVAL" 1>&2
echo "$CFGVAL"
}
# where to find files and directories
data_dir=/usr/share/cyrus-imapd/rpm
lib_dir=/usr/lib/cyrus-imapd
system_magic=$(file --version | awk '/magic file/ {print $4}')
cyrus_magic=${data_dir}/magic
cvt_cyrusdb=${lib_dir}/cvt_cyrusdb
sievec=${lib_dir}/sievec
masssievec=${lib_dir}/masssievec
imap_prefix=$(get_config configdirectory) || exit 1
sieve_dir=$(get_config sievedir) || exit 1
db_cfg=${data_dir}/db.cfg
db_current=${imap_prefix}/rpm/db.cfg.current
db_cache=${imap_prefix}/rpm/db.cfg.cache
# source default db backend config
. $db_cfg
# get configured db backend config
duplicate_db=$(get_config duplicate_db $duplicate_db) || exit 1
mboxlist_db=$(get_config mboxlist_db $mboxlist_db) || exit 1
seenstate_db=$(get_config seenstate_db $seenstate_db) || exit 1
subscription_db=$(get_config subscription_db $subscription_db) || exit 1
tlscache_db=$(get_config tlscache_db $tlscache_db) || exit 1
annotation_db=$(get_config annotation_db $annotation_db) || exit 1
mboxkey_db=$(get_config mboxkey_db $mboxkey_db) || exit 1
ptscache_db=$(get_config ptscache_db $ptscache_db) || exit 1
quota_db=$(get_config quota_db $quota_db) || exit 1
statuscache_db=$(get_config statuscache_db $statuscache_db) || exit 1
userdeny_db=$(get_config userdeny_db $userdeny_db) || exit 1
# remember current db backend config
{
echo "duplicate_db=${duplicate_db}"
echo "mboxlist_db=${mboxlist_db}"
echo "seenstate_db=${seenstate_db}"
echo "subscription_db=${subscription_db}"
echo "tlscache_db=${tlscache_db}"
echo "annotation_db=${annotation_db}"
echo "mboxkey_db=${mboxkey_db}"
echo "ptscache_db=${ptscache_db}"
echo "quota_db=${quota_db}"
echo "statuscache_db=${statuscache_db}"
echo "userdeny_db=${userdeny_db}"
echo "sieve_version=${sieve_version}"
} | sort > $db_current
# file_type <file>
file_type() {
this_type=$(file -b -m "${cyrus_magic}:${system_magic}" "$1" 2> /dev/null)
if echo "$this_type" | grep -qi skip > /dev/null 2>&1; then
echo skiplist
elif echo "$this_type" | grep -qi text > /dev/null 2>&1; then
echo flat
else
echo berkeley
fi
}
# cvt_file <file> <db>
cvt_file() {
target="$1"
new_db="$2"
if [ -s "$target" ]; then
old_db=$(file_type "$target")
if [ ! "$old_db" = "$new_db" ]; then
# The two-step conversion is paranoia against the filenames being encoded
# inside the database or logfiles (berkeley does this, for example).
rm -f "${target}.skiplist"
if [ "$old_db" = "skiplist" ]; then
cp -a "$target" "${target}.skiplist"
else
$cvt_cyrusdb -C $IMAPDCONF "$target" "$old_db" "${target}.skiplist" skiplist
fi
RETVAL=$?
ERRVAL=$(( $ERRVAL + $RETVAL ))
if [ $RETVAL -eq 0 ]; then
rm -f "$target"
if [ -s "${target}.skiplist" ]; then
if [ "$new_db" = "skiplist" ]; then
cp -a "${target}.skiplist" "$target"
else
$cvt_cyrusdb -C $IMAPDCONF "${target}.skiplist" skiplist "$target" "$new_db"
fi
fi
RETVAL=$?
ERRVAL=$(( $ERRVAL + $RETVAL ))
if [ $RETVAL -eq 0 ]; then
rm -f "${target}.skiplist"
else
echo "ERROR: unable to convert ${target}.skiplist from skiplist to $new_db"
fi
else
echo "ERROR: unable to convert $target from $old_db to skiplist"
fi
fi
fi
}
# cvt_to_utf8 <file>
cvt_to_utf8() {
target="$1"
if [ -s "$target" ]; then
if ! $sievec -C $IMAPDCONF "$target" "${target}.sievec"; then
iconv --from-code=ISO-8859-1 --to-code=UTF-8 --output="${target}.UTF-8" "$target"
if [ -s "${target}.UTF-8" ]; then
# preserve timestamp
touch --reference="${target}" "${target}.UTF-8"
mv -f "${target}.UTF-8" "$target"
else
ERRVAL=$(( $ERRVAL + 1 ))
fi
fi
rm -f "${target}.sievec"
fi
}
ERRVAL=0
# make sure our Berkeley databases are in a sane state
# wait for db_checkpoint to end successfully or kill it after a timeout
db_checkpoint -v -1 -h ${imap_prefix}/db &
DB_CHECK_PID=$!
CNT=0
while [ $CNT -lt 60 ]; do
if ! kill -0 $DB_CHECK_PID > /dev/null 2>&1; then
break
fi
sleep 1
let CNT+=1
done
if kill -0 $DB_CHECK_PID > /dev/null 2>&1; then
kill -USR1 $DB_CHECK_PID > /dev/null 2>&1
sleep 1
kill -KILL $DB_CHECK_PID > /dev/null 2>&1
wait $DB_CHECK_PID > /dev/null 2>&1
fi
# do a normal recovery
db_recover -v -h ${imap_prefix}/db
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
# try a catastrophic recovery instead of normal recovery
db_recover -v -c -h ${imap_prefix}/db
RETVAL=$?
ERRVAL=$(( $ERRVAL + $RETVAL ))
if [ $RETVAL -ne 0 ]; then
echo "ERROR: catastrophic recovery of Berkeley databases failed"
fi
fi
if [ "$EXPORT" = "export" ]; then
# convert all db files to portable format for migration
# TODO: quota_db, we don't touch it for now
cvt_file ${imap_prefix}/deliver.db "skiplist"
cvt_file ${imap_prefix}/mailboxes.db "skiplist"
cvt_file ${imap_prefix}/tls_sessions.db "skiplist"
cvt_file ${imap_prefix}/annotations.db "skiplist"
cvt_file ${imap_prefix}/ptclient/ptscache.db "skiplist"
cvt_file ${imap_prefix}/statuscache.db "skiplist"
cvt_file ${imap_prefix}/user_deny.db "flat"
rm -vf ${imap_prefix}/db/log.*
rm -vf ${imap_prefix}/db/__db.*
else
# always convert db files which have been converted to skiplist
# TODO: quota_db, we don't touch it for now
cvt_file ${imap_prefix}/deliver.db "$duplicate_db"
cvt_file ${imap_prefix}/mailboxes.db "$mboxlist_db"
cvt_file ${imap_prefix}/tls_sessions.db "$tlscache_db"
cvt_file ${imap_prefix}/annotations.db "$annotation_db"
cvt_file ${imap_prefix}/ptclient/ptscache.db "$ptscache_db"
cvt_file ${imap_prefix}/statuscache.db "$statuscache_db"
cvt_file ${imap_prefix}/user_deny.db "$userdeny_db"
# do we have to convert all databases?
if ! cmp -s $db_current $db_cache; then
# we treat sieve scripts the same way like db files
find ${sieve_dir}/ -name "*.script" -type f | while read db_file trash; do
cvt_to_utf8 "$db_file"
done
$masssievec $sievec $IMAPDCONF
# convert all db files left
find ${imap_prefix}/user/ -name "*.seen" -type f | while read db_file trash; do
cvt_file "$db_file" "$seenstate_db"
done
find ${imap_prefix}/user/ -name "*.sub" -type f | while read db_file trash; do
cvt_file "$db_file" "$subscription_db"
done
find ${imap_prefix}/user/ -name "*.mboxkey" -type f | while read db_file trash; do
cvt_file "$db_file" "$mboxkey_db"
done
fi
fi
# update the config cache file so we can check whether something has changed
if [ $ERRVAL -eq 0 ]; then
mv -f $db_current $db_cache
else
rm -f $db_cache
rm -f $db_current
fi
exit $ERRVAL

View file

@ -1,6 +1,6 @@
[Unit]
Description=Cyrus-imapd IMAP/POP3 email server
After=local-fs.target network-online.target
After=local-fs.target network.target
Requires=cyrus-imapd-init.service
After=cyrus-imapd-init.service
@ -9,7 +9,6 @@ After=cyrus-imapd-init.service
Type=simple
EnvironmentFile=/etc/sysconfig/cyrus-imapd
ExecStart=/usr/libexec/cyrus-imapd/master $CYRUSOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
PrivateTmp=true
# Cyrus may spawn many processes in normal operation. These figures are higher

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,5 @@
d /run/cyrus 0750 cyrus mail -
d /run/cyrus/db 0700 cyrus mail -
d /run/cyrus/lock 0700 cyrus mail -
d /run/cyrus/proc 0700 cyrus mail -
d /run/cyrus/socket 0750 cyrus mail -

View file

@ -1,17 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFU5pZUBCAC+m05W9nJnBkrfFO9I+iimF1WCsSZNFoASJ3WEeZxIkOQO9BZj
aKf8EP/nK7nEfNGZ2m+OrAtQU/+I8Sk1ppHuwZgENLvRzLsBGbv80kDKBw31Nd1f
sCpVQs4b8zlohXjq0UN8tT5NcGJnGE7ahoOHzJk/0Ll76oVmOZvSw+WHBp1945m2
Q8CbIbfmyuv7NF6GtGDVilPeIPsDnh5w5usjpKsxjYHKpy6Rtf4MbcCLtkRbHFra
KJD+xum0PgPdCAEEbQsSXQgwOd0TZ59avRVVef674PjWqIuudUGUhJ/f9OWOj7LG
6QgJR6yvCy7Bc2eAN4RnIIzaUZGaJDKDCNozABEBAAG0ImVsbGllIHRpbW9uZXkg
PGVsbGllQGZhc3RtYWlsLmNvbT6JATgEEwECACIFAlU5pZUCGwMGCwkIBwMCBhUI
AgkKCwQWAgMBAh4BAheAAAoJEFVPBP6zY3jgb9gH/3GPDLGybo7SYZMtBmfe+Udf
tcRkTtH+o2pf2rh6KwPhhEDuOXWVCIUPWXsWIVU2K5Y8AdBIHOEoSUp3n8juV57I
u9CfDI718/WaHgEpYrq5DqyROAFr+sGahcb6C40+V/CeUSAmKVhFGniuALUSAQ+B
XVj/i2EAFNg/5ALkPYDnDYDqm7Ak6odDbktYQz987y38sg3EMC/2wi2EoOG1VWeG
twFD8HKmXZw+u6cYtFh9K1hOBZm+PhLHr3h1MHTuWYeBKkT3YqaGtXMwi704LlNr
HU8beOHSNBSsVYJ61B4kgBA7p+qnx6xIpU2KfAJl8cgjCYwrq8yo+Lm9TazagfM=
=dIwC
-----END PGP PUBLIC KEY BLOCK-----

View file

@ -1,25 +0,0 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
#Rawhide
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
#gating rhel
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-public.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}

View file

@ -1,13 +0,0 @@
diff --git a/cassandane/Cassandane/BuildInfo.pm b/cassandane/Cassandane/BuildInfo.pm
index f98bf2d..19720ec 100644
--- a/cassandane/Cassandane/BuildInfo.pm
+++ b/cassandane/Cassandane/BuildInfo.pm
@@ -71,7 +71,7 @@ sub _read_buildinfo
my ($destdir, $prefix) = @_;
my $cyr_buildinfo;
- foreach my $bindir (qw(sbin cyrus/bin)) {
+ foreach my $bindir (qw(bin sbin cyrus/bin)) {
my $p = "$destdir$prefix/$bindir/cyr_buildinfo";
if (-x $p) {
$cyr_buildinfo = $p;

View file

@ -1,14 +1,14 @@
diff --git a/cassandane/utils/annotator.pl b/cassandane/utils/annotator.pl
index 265c73f..8af3d58 100755
--- a/cassandane/utils/annotator.pl
+++ b/cassandane/utils/annotator.pl
diff --git a/utils/annotator.pl b/utils/annotator.pl
index 94b84a2..0208831 100755
--- a/utils/annotator.pl
+++ b/utils/annotator.pl
@@ -140,6 +140,8 @@ GetOptions(
xlog "annotator $$ starting";
Cassandane::AnnotatorDaemon->run(
pid_file => $pidfile,
- port => $port
pid_file => $pidfile,
- port => $port
+ port => $port,
+ user => (getpwuid($<))[0],
+ group => (getgrgid($())[0],
+ user => (getpwuid($<))[0],
+ group => (getgrgid($())[0],
);
xlog "annotator $$ exiting";

View file

@ -1,8 +1,8 @@
diff --git a/cassandane/Cassandane/Util/Log.pm b/cassandane/Cassandane/Util/Log.pm
index a44005c..5bb5710 100644
--- a/cassandane/Cassandane/Util/Log.pm
+++ b/cassandane/Cassandane/Util/Log.pm
@@ -51,9 +51,6 @@ our @EXPORT = qw(
diff --git a/Cassandane/Util/Log.pm b/Cassandane/Util/Log.pm
index 9cd93d5..8d3b3c1 100644
--- a/Cassandane/Util/Log.pm
+++ b/Cassandane/Util/Log.pm
@@ -52,16 +52,12 @@ our @EXPORT = qw(
my $verbose = 0;
@ -11,69 +11,11 @@ index a44005c..5bb5710 100644
-
sub xlog
{
my $id;
@@ -87,7 +84,6 @@ sub xlog
else {
print STDERR "$msg\n";
}
my ($pkg, $file, $line) = caller;
$pkg =~ s/^Cassandane:://;
my $msg = "=====> " . $pkg . "[" . $line . "] " . join(' ', @_);
print STDERR "$msg\n";
- syslog(LOG_ERR, "$msg");
}
sub set_verbose
diff --git a/cassandane/utils/syslog.c b/cassandane/utils/syslog.c
index 20d3763..0238d82 100644
--- a/cassandane/utils/syslog.c
+++ b/cassandane/utils/syslog.c
@@ -116,14 +116,28 @@ EXPORTED void syslog(int priority, const char *format, ...)
va_start(ap, format);
fake_vsyslog(priority, format, ap);
va_end(ap);
+}
+
+EXPORTED void
+__attribute__((format(printf, 3, 4)))
+__syslog_chk(int priority, int whatever __attribute__((unused)),
+ const char *format, ...)
+{
+ va_list ap;
va_start(ap, format);
- real_vsyslog(priority, format, ap);
+ fake_vsyslog(priority, format, ap);
va_end(ap);
}
EXPORTED void vsyslog(int priority, const char *format, va_list ap)
{
fake_vsyslog(priority, format, ap);
- real_vsyslog(priority, format, ap);
+}
+
+EXPORTED void
+__attribute__((format(printf, 3, 0)))
+__vsyslog_chk(int priority, int whatever __attribute__((unused)), const char *format, va_list ap)
+{
+ fake_vsyslog(priority, format, ap);
}
diff --git a/cassandane/Cassandane/Instance.pm b/cassandane/Cassandane/Instance.pm
index 77ddd54..3162fc6 100644
--- a/cassandane/Cassandane/Instance.pm
+++ b/cassandane/Cassandane/Instance.pm
@@ -2347,17 +2347,6 @@ sub setup_syslog_replacement
return;
}
- # Can't reliably replace syslog when source fortification is in play,
- # and syslog_probe can't reliably detect whether the replacement has
- # worked or not in this case, so just turn syslog replacement off if
- # we detect source fortification
- if ($self->{buildinfo}->get('version', 'FORTIFY_LEVEL')) {
- xlog "Cyrus was built with -D_FORTIFY_SOURCE";
- xlog "tests will not examine syslog output";
- $self->{have_syslog_replacement} = 0;
- return;
- }
-
$self->{syslog_fname} = "$self->{basedir}/conf/log/syslog";
$self->{have_syslog_replacement} = 1;

View file

@ -0,0 +1,13 @@
diff --git a/Cassandane/Cyrus/JMAPCalendars.pm b/Cassandane/Cyrus/JMAPCalendars.pm
index 2179a26..2cf6fa6 100644
--- a/Cassandane/Cyrus/JMAPCalendars.pm
+++ b/Cassandane/Cyrus/JMAPCalendars.pm
@@ -1811,7 +1811,7 @@ sub test_setcalendarevents_move
"calendarId" => "nope",
}
}}, "R1"]]);
- $self->assert_str_equals($res->[0][1]{notUpdated}{$id}{type}, "calendarNotFound");
+ $self->assert_str_equals($res->[0][1]{notUpdated}{$id}{type}, "invalidProperties");
$self->assert_str_equals($res->[0][1]{newState}, $state);
xlog "get calendar $id from untouched calendar $calidA";

25
patch-clamav101 Normal file
View file

@ -0,0 +1,25 @@
diff --git a/imap/cyr_virusscan.c b/imap/cyr_virusscan.c
index 863a858..b6c8980 100644
--- a/imap/cyr_virusscan.c
+++ b/imap/cyr_virusscan.c
@@ -192,9 +192,19 @@ int clamav_scanfile(void *state, const char *fname,
struct clamav_state *st = (struct clamav_state *) state;
int r;
- /* scan file */
+#ifndef CL_SCAN_ARCHIVE /* clamav >= 0.101 */
+ struct cl_scan_options options;
+ memset(&options, 0, sizeof(struct cl_scan_options));
+ options.parse |= ~0; /* enable all parsers */
+ options.general |= CL_SCAN_GENERAL_HEURISTICS; /* enable heuristic alert options */
+
+ r = cl_scanfile(fname, virname, NULL, st->av_engine,
+ &options);
+
+#else
r = cl_scanfile(fname, virname, NULL, st->av_engine,
CL_SCAN_STDOPT);
+#endif
switch (r) {
case CL_CLEAN:

View file

@ -1,7 +1,8 @@
diff -uap cyrus-imapd-3.8.3/doc/examples/cyrus_conf/prefork.conf.2 cyrus-imapd-3.8.3/doc/examples/cyrus_conf/prefork.conf
--- cyrus-imapd-3.8.3/doc/examples/cyrus_conf/prefork.conf.2 2024-04-26 01:59:22.000000000 +0100
+++ cyrus-imapd-3.8.3/doc/examples/cyrus_conf/prefork.conf 2025-01-15 15:56:40.112544167 +0000
@@ -19,8 +19,8 @@ SERVICES {
diff --git a/doc/examples/cyrus_conf/prefork.conf b/doc/examples/cyrus_conf/prefork.conf
index 4ce2c0f..3b1e6d7 100644
--- a/doc/examples/cyrus_conf/prefork.conf
+++ b/doc/examples/cyrus_conf/prefork.conf
@@ -19,15 +19,15 @@ SERVICES {
# nntps cmd="nntpd -s" listen="nntps" prefork=1
# these are only necessary if using HTTP for CalDAV, CardDAV, or RSS
@ -12,16 +13,19 @@ diff -uap cyrus-imapd-3.8.3/doc/examples/cyrus_conf/prefork.conf.2 cyrus-imapd-3
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
@@ -51,5 +51,5 @@ EVENTS {
- lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=1
+ lmtpunix cmd="lmtpd" listen="/run/cyrus/socket/lmtp" prefork=1
DAEMON {
# this is only necessary if using idled for IMAP IDLE
-# idled cmd="idled"
+ idled cmd="idled"
# this is only necessary if using notifications
-# notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
+# notify cmd="notifyd" listen="/run/cyrus/socket/notify" proto="udp" prefork=1
}
diff -uap cyrus-imapd-3.8.3/doc/examples/imapd_conf/normal.conf.2 cyrus-imapd-3.8.3/doc/examples/imapd_conf/normal.conf
--- cyrus-imapd-3.8.3/doc/examples/imapd_conf/normal.conf.2 2024-04-08 04:46:02.000000000 +0100
+++ cyrus-imapd-3.8.3/doc/examples/imapd_conf/normal.conf 2025-01-15 15:55:44.361093153 +0000
EVENTS {
diff --git a/doc/examples/imapd_conf/normal.conf b/doc/examples/imapd_conf/normal.conf
index 95b54e9..3935b77 100644
--- a/doc/examples/imapd_conf/normal.conf
+++ b/doc/examples/imapd_conf/normal.conf
@@ -10,7 +10,7 @@ admins: cyrus
###################################################################
@ -63,8 +67,8 @@ diff -uap cyrus-imapd-3.8.3/doc/examples/imapd_conf/normal.conf.2 cyrus-imapd-3.
-#
-# Allowed values: caldav, carddav, domainkey, ischedule, rss
-httpmodules: caldav carddav
+# Fedora default: enable all modules besides admin and tzdist
+httpmodules: caldav carddav domainkey freebusy ischedule jmap rss webdav
+# Fedora default: enable all modules besides admin
+httpmodules: caldav carddav domainkey freebusy ischedule jmap rss tzdist webdav
# If enabled, the partitions will also be hashed, in addition to the
# hashing done on configuration directories. This is recommended if one

View file

@ -0,0 +1,13 @@
diff --git a/perl/sieve/managesieve/Makefile.PL.in b/perl/sieve/managesieve/Makefile.PL.in
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_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,13 +0,0 @@
diff --git a/lib/util.c b/lib/util.c
index a2eae15..ef8c25b 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -1188,7 +1188,7 @@ EXPORTED int buf_getline(struct buf *buf, FILE *fp)
#ifdef HAVE_DECLARE_OPTIMIZE
EXPORTED inline size_t buf_len(const struct buf *buf)
- __attribute__((always_inline, optimize("-O3")));
+ __attribute__((optimize("-O3")));
#endif
EXPORTED inline size_t buf_len(const struct buf *buf)
{

View file

@ -1,40 +0,0 @@
diff --git a/Makefile.am b/Makefile.am
index 71333b0..52317da 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2092,14 +2092,14 @@ endif
## The @$(MKDIR_P) line is added due to a bug in Automake 1.10 and can be removed if using Automake 1.12.
@$(MKDIR_P) $(DESTDIR)$(bindir)
cd $(DESTDIR)$(bindir) && \
- $(LN_S) -f imtest httptest && \
- $(LN_S) -f imtest lmtptest && \
- $(LN_S) -f imtest mupdatetest && \
- $(LN_S) -f imtest nntptest && \
- $(LN_S) -f imtest pop3test && \
- $(LN_S) -f imtest sivtest && \
- $(LN_S) -f imtest smtptest && \
- $(LN_S) -f imtest synctest
+ $(LN_S) -f cyr_imtest httptest && \
+ $(LN_S) -f cyr_imtest lmtptest && \
+ $(LN_S) -f cyr_imtest mupdatetest && \
+ $(LN_S) -f cyr_imtest nntptest && \
+ $(LN_S) -f cyr_imtest pop3test && \
+ $(LN_S) -f cyr_imtest sivtest && \
+ $(LN_S) -f cyr_imtest smtptest && \
+ $(LN_S) -f cyr_imtest synctest
uninstall-hook: cyrus-makemaker-uninstall-workaround
if PERL
diff --git a/imtest/imtest.c b/imtest/imtest.c
index 725ff62..d9406e1 100644
--- a/imtest/imtest.c
+++ b/imtest/imtest.c
@@ -3040,7 +3040,7 @@ int main(int argc, char **argv)
}
if (!*prot) {
- if (!strcasecmp(prog, "imtest"))
+ if (!strcasecmp(prog, "cyr_imtest"))
prot = "imap";
else if (!strcasecmp(prog, "pop3test"))
prot = "pop3";

View file

@ -1,13 +0,0 @@
diff --git a/imap/imapd.c b/imap/imapd.c
index 3cc75f5..a22a356 100644
--- a/imap/imapd.c
+++ b/imap/imapd.c
@@ -8022,7 +8022,7 @@ static void cmd_reconstruct(const char *tag, const char *name, int recursive)
fclose(stdout);
fclose(stderr);
- ret = snprintf(buf, sizeof(buf), "%s/quota", SBIN_DIR);
+ ret = snprintf(buf, sizeof(buf), "%s/cyr_quota", SBIN_DIR);
if(ret < 0 || ret >= (int) sizeof(buf)) {
/* in child, so fatailing won't disconnect our user */
fatal("quota buffer not sufficiently big", EX_CONFIG);

View file

@ -7,7 +7,7 @@ index 46dc358..ca37f22 100644
/* Each test gets a maximum of 20 seconds. */
-#define TEST_TIMEOUT_MS (20*1000)
+#define TEST_TIMEOUT_MS (300*1000)
+#define TEST_TIMEOUT_MS (30*1000)
static jmp_buf jbuf;
static const char *code;

25
patch-vzic-proper-cflags Normal file
View file

@ -0,0 +1,25 @@
diff --git a/tools/vzic/Makefile b/tools/vzic/Makefile
index 8ae6afa..3882998 100644
--- a/tools/vzic/Makefile
+++ b/tools/vzic/Makefile
@@ -45,17 +45,17 @@ LIBICAL_LDADD = -lical
GLIB_CFLAGS = `pkg-config --cflags glib-2.0`
GLIB_LDADD = `pkg-config --libs glib-2.0`
-CFLAGS = -g -I../.. -DOLSON_DIR=\"$(OLSON_DIR)\" -DPRODUCT_ID='"$(PRODUCT_ID)"' -DTZID_PREFIX='"$(TZID_PREFIX)"' $(GLIB_CFLAGS) $(LIBICAL_CFLAGS)
+CFLAGS += -I../.. -DOLSON_DIR=\"$(OLSON_DIR)\" -DPRODUCT_ID='"$(PRODUCT_ID)"' -DTZID_PREFIX='"$(TZID_PREFIX)"' $(GLIB_CFLAGS) $(LIBICAL_CFLAGS)
OBJECTS = vzic.o vzic-parse.o vzic-dump.o vzic-output.o
all: vzic
vzic: $(OBJECTS)
- $(CC) $(OBJECTS) $(GLIB_LDADD) -o vzic
+ $(CC) $(LDFLAGS) $(OBJECTS) $(GLIB_LDADD) -o vzic
test-vzic: test-vzic.o
- $(CC) test-vzic.o $(LIBICAL_LDADD) -o test-vzic
+ $(CC) $(LDFLAGS) test-vzic.o $(LIBICAL_LDADD) -o test-vzic
# Dependencies.
$(OBJECTS): vzic.h

View file

@ -1,35 +0,0 @@
/tier1-internal:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/cyrus-imapd.git
name: /plans/tier1/internal
/tier1-public:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/cyrus-imapd.git
name: /plans/tier1/public
/tier2-tier3-internal:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/cyrus-imapd.git
name: /plans/tier2-tier3/internal
/tier2-tier3-public:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/cyrus-imapd.git
name: /plans/tier2-tier3/public
/others-internal:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/cyrus-imapd.git
name: /plans/others/internal
/others-public:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/cyrus-imapd.git
name: /plans/others/public

View file

@ -1,10 +0,0 @@
---
badfuncs:
allowed:
# mupdate uses gethostbyname (safely) to check if the IP address
# of the given hostname is local.
/usr/libexec/cyrus-imapd/mupdate:
- gethostbyname
# smmapd uses gethostbyname (safely) to verify user's host.
/usr/libexec/cyrus-imapd/smmapd:
- gethostbyname

View file

@ -1,2 +1,4 @@
SHA512 (cyrus-imapd-3.12.1.tar.gz) = ec2727eb0567ebf978ff4db9e9086bc01fdc2739b6e06cad73cf74f9af990c30a70130aa2474d822d8ca078e1012a60179101de90845bf40f7a9b47a8b5e4d92
SHA512 (cyrus-imapd-3.12.1.tar.gz.sig) = a548769b7443a179cbfeabd20fce113d94b9ccbf134aab3c6aa5197edcad41f1a73f1d28ba8e2b80046457053949344385ca68b22489d47721d4760e42cd4dd4
SHA512 (cassandane-6d33978.tar.gz) = aafc2a98d49f86b00f5b1af649ce63157c8d0652502248271ca14e6f000aebf6eca8931a6e33cc068e37fdd086e9dc4cdc90cf7eccfdda63dfd73c733d75fc40
SHA512 (cassandane-testdata-20170523.tar.gz) = 705f5af6a31fe3b8d6e8027bbddbedb2f64d65997f8a06620ec07fcd30a95d98ac3f3fbef7af5080684ee21be1c5b8bcad2374b2749f0571099e780355a04420
SHA512 (cyrus-imapd-3.0.5.tar.gz) = 262806729d5ee5d753732603aa7af33c6f96bc5145b7a951b8668ffdee0dcd4a90bd287da0949e85c4596cccb471a688f7f8b6f3e39194e1cff311950d4d4410
SHA512 (cassandane-6bd697c.tar.gz) = aadeb8c1899db17d482ffa0571bb6d308fc35beccb04e093ad1c9c6a6aa542fa8a9004c9f1772eb9f2f066c1ab1a562512f1f8d328342dd2e90e4b014aac0850

View file

@ -1,4 +0,0 @@
#Type Name ID GECOS Home directory Shell
g saslauth 76
u cyrus 76:mail "Cyrus IMAP Server" /var/lib/imap /sbin/nologin
m cyrus saslauth

View file

@ -1,21 +0,0 @@
d /run/cyrus 0750 cyrus mail -
d /run/cyrus/db 0700 cyrus mail -
d /run/cyrus/lock 0700 cyrus mail -
d /run/cyrus/proc 0700 cyrus mail -
d /run/cyrus/socket 0750 cyrus mail -
d /var/lib/imap 0750 cyrus mail -
d /var/lib/imap/backup 0700 cyrus mail -
d /var/lib/imap/db 0700 cyrus mail -
d /var/lib/imap/log 0700 cyrus mail -
d /var/lib/imap/meta 0700 cyrus mail -
d /var/lib/imap/md5 0700 cyrus mail -
d /var/lib/imap/msg 0700 cyrus mail -
d /var/lib/imap/proc 0700 cyrus mail -
d /var/lib/imap/ptclient 0700 cyrus mail -
d /var/lib/imap/quota 0700 cyrus mail -
d /var/lib/imap/rpm 0700 cyrus mail -
d /var/lib/imap/sieve 0700 cyrus mail -
d /var/lib/imap/socket 0750 cyrus mail -
d /var/lib/imap/sync 0700 cyrus mail -
d /var/lib/imap/user 0700 cyrus mail -
d /var/spool/imap 0700 cyrus mail -