From 33d59c308fbc4993b1ed0e6917b9b6b69c98500e Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 10 Nov 2015 08:46:06 +0000 Subject: Fix the OTP plugin on 32 bit machines and add SHA2 support Submitted upstream as https://bugzilla.cyrusimap.org/show_bug.cgi?id=3914 --- security/cy2-otp/Makefile | 4 ++-- security/cyrus-sasl/distinfo | 3 ++- security/cyrus-sasl/patches/patch-plugins_otp.c | 31 +++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 security/cyrus-sasl/patches/patch-plugins_otp.c (limited to 'security') diff --git a/security/cy2-otp/Makefile b/security/cy2-otp/Makefile index c4f99f43b05..a8171cd2f73 100644 --- a/security/cy2-otp/Makefile +++ b/security/cy2-otp/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.18 2014/02/12 23:18:31 tron Exp $ +# $NetBSD: Makefile,v 1.19 2015/11/10 08:46:06 manu Exp $ PKGNAME= ${DISTNAME:S/cyrus-sasl/cy2-otp/} -PKGREVISION= 2 +PKGREVISION= 3 COMMENT= Cyrus SASL OTP authentication plugin SASL_PLUGIN= yes diff --git a/security/cyrus-sasl/distinfo b/security/cyrus-sasl/distinfo index 0b054d7ffe9..90f04b65a96 100644 --- a/security/cyrus-sasl/distinfo +++ b/security/cyrus-sasl/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.31 2015/11/04 01:17:43 agc Exp $ +$NetBSD: distinfo,v 1.32 2015/11/10 08:46:06 manu Exp $ SHA1 (cyrus-sasl-2.1.26.tar.gz) = d6669fb91434192529bd13ee95737a8a5040241c RMD160 (cyrus-sasl-2.1.26.tar.gz) = 861a06d663cf3da37a198d0f971d99b249b5f4b8 @@ -12,6 +12,7 @@ SHA1 (patch-configure) = 473e4bb41d6e5c6ac136288b673880bd123853cf SHA1 (patch-configure.in) = c1bc731ea44e13943dc3952c46a0e588364c1dc7 SHA1 (patch-include_sasl.h) = 315e9e8236108b49955dbf304a56b17cd028a8d6 SHA1 (patch-libsasl2.pc.in) = ef5679feef7afb12429071020892d88ecd7c43e6 +SHA1 (patch-plugins_otp.c) = ac06dcf61f822630c371b7791d9c3014e1bd1e38 SHA1 (patch-saslauthd_Makefile.in) = b7962486aef16ec1e5b27a05a3405d79540f8e20 SHA1 (patch-saslauthd_auth__rimap.c) = cc3e04ae0cf049eeb507df3226a2098528afaaab SHA1 (patch-saslauthd_md5global.h) = fc200c6aee12bf58877c7a755c121441ebaa1bde diff --git a/security/cyrus-sasl/patches/patch-plugins_otp.c b/security/cyrus-sasl/patches/patch-plugins_otp.c new file mode 100644 index 00000000000..0928bfea8af --- /dev/null +++ b/security/cyrus-sasl/patches/patch-plugins_otp.c @@ -0,0 +1,31 @@ +$NetBSD: patch-plugins_otp.c,v 1.1 2015/11/10 08:46:06 manu Exp $ + +Fix the OTP plugin on 32 bit machines and add SHA2 support +Submitted upstream as https://bugzilla.cyrusimap.org/show_bug.cgi?id=3914 + +--- plugins/otp.c.orig 2012-10-12 16:05:48.000000000 +0200 ++++ plugins/otp.c 2015-11-07 15:19:43.000000000 +0100 +@@ -92,8 +92,12 @@ + static algorithm_option_t algorithm_options[] = { + {"md4", 0, "md4"}, + {"md5", 0, "md5"}, + {"sha1", 4, "sha1"}, ++ {"sha224", 4, "sha224"}, ++ {"sha256", 4, "sha256"}, ++ {"sha384", 4, "sha384"}, ++ {"sha512", 4, "sha512"}, + {NULL, 0, NULL} + }; + + /* Convert the binary data into ASCII hex */ +@@ -675,9 +679,9 @@ + SETERROR(utils, "OTP secret too short"); + return SASL_FAIL; + } + +- sscanf(secret, "%s\t%04d\t%s\t%s\t%020ld", ++ sscanf(secret, "%s\t%04d\t%s\t%s\t%020lu", + alg, seq, seed, buf, timeout); + + hex2bin(buf, otp, OTP_HASH_SIZE); + -- cgit v1.2.3