From 3209176e052154933f7cd09a6672a4c188993333 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Fri, 1 Jun 2018 17:37:02 -0500 Subject: [PATCH] Add patch to call cyr_quota. quota was renamed to cyr_quota ages ago. One place in the imap code, in the implementation of the RECONSTRUCT command, will actually exec that binary and so it must be patched to match. --- cyrus-imapd.spec | 7 ++++++- patch-cyrus-rename-quota | 13 +++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 patch-cyrus-rename-quota diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index d2a8f90..f243ecc 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -35,8 +35,13 @@ Patch1: patch-cyrus-managesieve-linking # Fedora-specific patch for the default configuration file Patch2: patch-cyrus-default-configs +# We rename quota to cyr_quota to avoid a conflict with /usr/bin/quota; one +# place in the source must be patched to match. +Patch3: patch-cyrus-rename-quota + # vzic uses an old makefile that needs hacks to use the proper flags -Patch3: patch-vzic-proper-cflags +Patch4: patch-vzic-proper-cflags + Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config diff --git a/patch-cyrus-rename-quota b/patch-cyrus-rename-quota new file mode 100644 index 0000000..d994e29 --- /dev/null +++ b/patch-cyrus-rename-quota @@ -0,0 +1,13 @@ +diff --git a/imap/imapd.c b/imap/imapd.c +index 586c9ad..efe00fc 100644 +--- a/imap/imapd.c ++++ b/imap/imapd.c +@@ -7636,7 +7636,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", EC_CONFIG);