summaryrefslogtreecommitdiff
path: root/user/dovecot/apop.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-09-15 15:30:16 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-09-15 15:30:16 +0000
commit5f54b96b9055e7a0b320fa8794151c6845126ee5 (patch)
tree243d823b40136af7755dfabe4c5d8c60e42ecd56 /user/dovecot/apop.patch
parentdb49432374e0e3ed11d99c831d1349f3ddc74a33 (diff)
downloadpackages-5f54b96b9055e7a0b320fa8794151c6845126ee5.tar.gz
packages-5f54b96b9055e7a0b320fa8794151c6845126ee5.tar.bz2
packages-5f54b96b9055e7a0b320fa8794151c6845126ee5.tar.xz
packages-5f54b96b9055e7a0b320fa8794151c6845126ee5.zip
user/dovecot: Fix two issues on 32-bit systems
Diffstat (limited to 'user/dovecot/apop.patch')
-rw-r--r--user/dovecot/apop.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/user/dovecot/apop.patch b/user/dovecot/apop.patch
new file mode 100644
index 000000000..a75c770e5
--- /dev/null
+++ b/user/dovecot/apop.patch
@@ -0,0 +1,40 @@
+From d1c5d356f36aaf9c32708cc6960fcaebe1cf6e63 Mon Sep 17 00:00:00 2001
+From: Paul Howarth <paul@city-fan.org>
+Date: Sun, 16 Aug 2020 20:32:03 +0100
+Subject: [PATCH] Fix APOP test failure on 32-bit systems
+
+The challenge timestamp is read as a hex number in mech_apop_auth_initial()
+so it should be written as hex, not decimal.
+
+Also fix compiler warnings for 32-bit architectures.
+---
+ src/auth/test-mech.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/auth/test-mech.c b/src/auth/test-mech.c
+index cf05370035..db9f85ccfc 100644
+--- a/src/auth/test-mech.c
++++ b/src/auth/test-mech.c
+@@ -192,11 +192,11 @@ static void test_mech_handle_challenge(struct auth_request *request,
+ }
+
+ static inline const unsigned char *
+-test_mech_construct_apop_challenge(unsigned int connect_uid, unsigned long *len_r)
++test_mech_construct_apop_challenge(unsigned int connect_uid, size_t *len_r)
+ {
+ string_t *apop_challenge = t_str_new(128);
+
+- str_printfa(apop_challenge,"<%lx.%u.%"PRIdTIME_T"", (unsigned long) getpid(),
++ str_printfa(apop_challenge,"<%lx.%u.%"PRIxTIME_T"", (unsigned long) getpid(),
+ connect_uid, process_start_time+10);
+ str_append_data(apop_challenge, "\0testuser\0responseoflen16-", 26);
+ *len_r = apop_challenge->used;
+@@ -323,7 +323,7 @@ static void test_mechs(void)
+ struct test_case *test_case = &tests[running_test];
+ const struct mech_module *mech = test_case->mech;
+ struct auth_request *request;
+- const char *testname = t_strdup_printf("auth mech %s %d/%lu",
++ const char *testname = t_strdup_printf("auth mech %s %d/%zu",
+ mech->mech_name,
+ running_test+1,
+ N_ELEMENTS(tests));