diff --git a/cyrus-imapd-2.3.15-qos.patch b/cyrus-imapd-2.3.15-qos.patch deleted file mode 100644 index 1bb28c8..0000000 --- a/cyrus-imapd-2.3.15-qos.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- cyrus-imapd-2.3.15/lib/imapoptions.orig 2009-06-29 10:21:06.000000000 -0700 -+++ cyrus-imapd-2.3.15/lib/imapoptions 2009-12-14 13:40:56.000000000 -0800 -@@ -854,6 +854,10 @@ are listed with ``''. - strip the default realm from the userid (this does not affect the stripping - of realms specified by the afspts_localrealms option) */ - -+{ "qosmarking", "cs0", ENUM("cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7", "af11", "af12", "af13", "af21", "af22", "af23", "af31", "af32", "af33", "af41", "af42", "af43", "ef") } -+/* This specifies the Class Selector or Differentiated Services Code Point -+ designation on IP headers (in the ToS field). */ -+ - { "quota_db", "quotalegacy", STRINGLIST("flat", "berkeley", "berkeley-hash", "skiplist", "sql", "quotalegacy")} - /* The cyrusdb backend to use for quotas. */ - ---- cyrus-imapd-2.3.15/lib/libconfig.c.orig 2009-08-20 08:26:15.000000000 -0700 -+++ cyrus-imapd-2.3.15/lib/libconfig.c 2009-12-13 23:37:20.000000000 -0800 -@@ -82,6 +82,7 @@ enum enum_value config_virtdomains; - enum enum_value config_mupdate_config; /* IMAP_ENUM_MUPDATE_CONFIG_STANDARD */ - int config_maxword; - int config_maxquoted; -+int config_qosmarking; - - /* declared in each binary that uses libconfig */ - extern const int config_need_data; -@@ -210,11 +211,21 @@ static void config_ispartition(const cha - if (!strncmp("partition-", key, 10)) *found = 1; - } - -+static const unsigned char qos[] = { -+/* cs0..cs7 */ 0x00, 0x20, 0x40, 0x60, 0x80, 0xa0, 0xc0, 0xe0, -+/* af11..af13 */ 0x28, 0x30, 0x38, -+/* af21..af23 */ 0x48, 0x50, 0x58, -+/* af31..af33 */ 0x68, 0x70, 0x78, -+/* af41..af43 */ 0x88, 0x90, 0x98, -+/* ef */ 0xb8 -+}; -+ - void config_read(const char *alt_config) - { - enum imapopt opt = IMAPOPT_ZERO; - char buf[4096]; - char *p; -+ int ival; - - /* xxx this is leaked, this may be able to be better in 2.2 (cyrus_done) */ - if(alt_config) config_filename = xstrdup(alt_config); -@@ -328,6 +339,9 @@ void config_read(const char *alt_config) - /* set some limits */ - config_maxquoted = config_getint(IMAPOPT_MAXQUOTED); - config_maxword = config_getint(IMAPOPT_MAXWORD); -+ -+ ival = config_getenum(IMAPOPT_QOSMARKING); -+ config_qosmarking = qos[ival]; - } - - #define GROWSIZE 4096 ---- cyrus-imapd-2.3.15/lib/libconfig.h.orig 2008-09-23 10:34:38.000000000 -0700 -+++ cyrus-imapd-2.3.15/lib/libconfig.h 2009-12-13 23:19:40.000000000 -0800 -@@ -80,6 +80,7 @@ extern enum enum_value config_virtdomain - extern enum enum_value config_mupdate_config; - extern int config_maxquoted; - extern int config_maxword; -+extern int config_qosmarking; - - /* config requirement flags */ - #define CONFIG_NEED_PARTITION_DATA (1<<0) ---- cyrus-imapd-2.3.15/master/master.c.orig 2009-03-30 21:11:23.000000000 -0700 -+++ cyrus-imapd-2.3.15/master/master.c 2009-12-14 14:18:24.000000000 -0800 -@@ -439,6 +439,15 @@ void service_create(struct service *s) - } - #endif - -+ /* set IP ToS if supported */ -+#if defined(SOL_IP) && defined(IP_TOS) -+ r = setsockopt(s->socket, SOL_IP, IP_TOS, -+ (void *) &config_qosmarking, sizeof(config_qosmarking)); -+ if (r < 0) { -+ syslog(LOG_WARNING, "unable to setsocketopt(IP_TOS): %m"); -+ } -+#endif -+ - oldumask = umask((mode_t) 0); /* for linux */ - r = bind(s->socket, res->ai_addr, res->ai_addrlen); - umask(oldumask); diff --git a/cyrus-imapd-2.3.16-nodenny.patch b/cyrus-imapd-2.3.16-nodenny.patch deleted file mode 100644 index e91579d..0000000 --- a/cyrus-imapd-2.3.16-nodenny.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up cyrus-imapd-2.3.16/imap/global.c.nodenny cyrus-imapd-2.3.16/imap/global.c ---- cyrus-imapd-2.3.16/imap/global.c.nodenny 2009-10-13 17:10:36.000000000 +0200 -+++ cyrus-imapd-2.3.16/imap/global.c 2010-01-14 14:00:10.455808186 +0100 -@@ -542,14 +542,22 @@ static int acl_ok(const char *user, stru - int access_ok(const char *user, const char *service, char *msgbuf, int size) - { - static char *fname = NULL; -+ static int nodb = 0; - struct db *db = NULL; - int r, ret = 1; /* access always granted by default */ - -+ if (nodb) return ret; -+ - if (!fname) { -+ struct stat s; - /* create path to database */ - fname = xmalloc(strlen(config_dir) + sizeof(FNAME_USERDENYDB) + 1); - strcpy(fname, config_dir); - strcat(fname, FNAME_USERDENYDB); -+ if (stat(fname, &s) == -1 && errno==ENOENT) { -+ nodb = 1; -+ return ret; -+ } - } - - /* try to open database */ diff --git a/cyrus-imapd-perl5.14.patch b/cyrus-imapd-perl5.14.patch deleted file mode 100644 index ddc04bf..0000000 --- a/cyrus-imapd-perl5.14.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff -up cyrus-imapd-2.4.8/perl/imap/IMAP.xs.perl5.14 cyrus-imapd-2.4.8/perl/imap/IMAP.xs ---- cyrus-imapd-2.4.8/perl/imap/IMAP.xs.perl5.14 2011-04-13 16:35:22.000000000 +0200 -+++ cyrus-imapd-2.4.8/perl/imap/IMAP.xs 2011-06-21 08:08:16.841989447 +0200 -@@ -125,10 +125,10 @@ void imclient_xs_cb(struct imclient *cli - SAVETMPS; - PUSHMARK(SP); - XPUSHs(sv_2mortal(newSVpv("-client", 0))); -- rv = newSVsv(&sv_undef); -+ rv = newSVsv(&PL_sv_undef); - sv_setref_pv(rv, NULL, (void *) rock->client); - XPUSHs(rv); -- if (rock->prock != &sv_undef) { -+ if (rock->prock != &PL_sv_undef) { - XPUSHs(sv_2mortal(newSVpv("-rock", 0))); - XPUSHs(sv_mortalcopy(rock->prock)); - } -@@ -393,7 +393,7 @@ CODE: - ST(0) = sv_newmortal(); - - if(client->authenticated) { -- ST(0) = &sv_no; -+ ST(0) = &PL_sv_no; - return; - } - -@@ -415,10 +415,10 @@ CODE: - rc = imclient_authenticate(client->imclient, mechlist, service, user, - minssf, maxssf); - if (rc) -- ST(0) = &sv_no; -+ ST(0) = &PL_sv_no; - else { - client->authenticated = 1; -- ST(0) = &sv_yes; -+ ST(0) = &PL_sv_yes; - } - - int -@@ -450,12 +450,12 @@ CODE: - #ifdef HAVE_SSL - rc = imclient_starttls(client->imclient, tls_cert_file, tls_key_file, CAfile, CApath); - if (rc) -- ST(0) = &sv_no; -+ ST(0) = &PL_sv_no; - else { -- ST(0) = &sv_yes; -+ ST(0) = &PL_sv_yes; - } - #else -- ST(0) = &sv_no; -+ ST(0) = &PL_sv_no; - #endif /* HAVE_SSL */ - - void -@@ -515,7 +515,7 @@ PPCODE: - (val = hv_fetch(cb, "Rock", 4, 0))) - prock = *val; - else -- prock = &sv_undef; -+ prock = &PL_sv_undef; - /* - * build our internal rock, which is used by our internal - * callback handler to invoke the Perl callback -@@ -526,7 +526,7 @@ PPCODE: - rock = (struct xsccb *) safemalloc(sizeof *rock); - /* bump refcounts on these so they don't go away */ - rock->pcb = SvREFCNT_inc(pcb); -- if (!prock) prock = &sv_undef; -+ if (!prock) prock = &PL_sv_undef; - rock->prock = SvREFCNT_inc(prock); - rock->client = client; - rock->autofree = 0; -@@ -653,9 +653,9 @@ PPCODE: - EXTEND(SP, 1); - pcb = av_shift(av); - if (strcmp(SvPV(pcb, arg), "OK") == 0) -- PUSHs(&sv_yes); -+ PUSHs(&PL_sv_yes); - else -- PUSHs(&sv_no); -+ PUSHs(&PL_sv_no); - pcb = perl_get_sv("@", TRUE); - sv_setsv(pcb, av_shift(av)); - if (av_len(av) != -1) { -@@ -688,9 +688,9 @@ PPCODE: - EXTEND(SP, 2); - PUSHs(sv_2mortal(newSViv(fd))); - if (writep) -- PUSHs(&sv_yes); -+ PUSHs(&PL_sv_yes); - else -- PUSHs(&sv_no); -+ PUSHs(&PL_sv_no); - - void - imclient_fromURL(client,url) diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 494a39c..6b05a20 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -39,9 +39,6 @@ Patch4: cyrus-imapd-2.3.1-authid_normalize.patch # fedora/rhel specific, find current db lib, rhbz#461875 Patch6: cyrus-imapd-2.3.12p2-current-db.patch -# temporary workaround, rhbz#553011, https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=3206 -Patch7: cyrus-imapd-2.3.16-nodenny.patch - # for c-i <= 2.4.12 Patch8: cyrus-imapd-2.4.12-debugopt.patch @@ -230,7 +227,7 @@ install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install -p -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/%{name} install -p -m 755 %{SOURCE10} %{buildroot}%{_sysconfdir}/cron.daily/%{name} -install -p -D -m 644 %{SOURCE12} %{buildroot}/lib/systemd/system/cyrus-imapd.service +install -p -D -m 644 %{SOURCE12} %{buildroot}%{_unitdir}/cyrus-imapd.service install -p -D -m 755 %{SOURCE13} %{buildroot}%{_cyrexecdir}/cyr_systemd_helper # Cleanup of doc dir @@ -360,7 +357,7 @@ fi %config(noreplace) %{_sysconfdir}/pam.d/csync %config(noreplace) %{_sysconfdir}/pam.d/nntp %{_sysconfdir}/cron.daily/%{name} -/lib/systemd/system/cyrus-imapd.service +%{_unitdir}/cyrus-imapd.service %dir %{_cyrexecdir} %{_cyrexecdir}/cyr_systemd_helper %{_cyrexecdir}/arbitron @@ -499,7 +496,7 @@ fi * Tue Nov 22 2011 Michal Hlavinka - 2.4.12-4 - reduce noisy logging, add option to turn on LOG_DEBUG syslog - messages again (thanks Philip Prindeville) (#754940) + messages again (thanks Philip Prindeville) (#754940) * Mon Oct 24 2011 Michal Hlavinka - 2.4.12-3 - add login and digest-md5 as part of default auth mechanisms (#748278)