diff options
author | manu <manu@pkgsrc.org> | 2016-10-30 05:04:09 +0000 |
---|---|---|
committer | manu <manu@pkgsrc.org> | 2016-10-30 05:04:09 +0000 |
commit | 54e100ba4f10092ba4759995d8d001a88c32f2fd (patch) | |
tree | e85be63c419322b82bd8fa1a578775aabbd3e4cc /databases | |
parent | e9d75b109534904ef1c3256b8aef4cb48fc1ee44 (diff) | |
download | pkgsrc-54e100ba4f10092ba4759995d8d001a88c32f2fd.tar.gz |
Use newer DES API so that smbk5pwd loads with newer OpenSSL
OpenSSL removed old DES API which used des_* functions.
https://github.com/openssl/openssl/commit/24956ca00f014a917fb181a8abc39b349f3f316f
In order to link with libcrypto from recent OpenSSL releases, we need
to replace the older API des_* functions by the newer API DES_* functions.
Submitted upstream as ITS#8525
http://www.openldap.org/its/index.cgi/Incoming?id=8525
Diffstat (limited to 'databases')
-rw-r--r-- | databases/openldap-smbk5pwd/Makefile | 4 | ||||
-rw-r--r-- | databases/openldap/distinfo | 3 | ||||
-rw-r--r-- | databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c | 54 |
3 files changed, 58 insertions, 3 deletions
diff --git a/databases/openldap-smbk5pwd/Makefile b/databases/openldap-smbk5pwd/Makefile index aaed6d94f36..3edfa68a051 100644 --- a/databases/openldap-smbk5pwd/Makefile +++ b/databases/openldap-smbk5pwd/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.19 2016/03/05 11:28:12 jperkin Exp $ +# $NetBSD: Makefile,v 1.20 2016/10/30 05:04:09 manu Exp $ PKGNAME= ${DISTNAME:S/-/-smbk5pwd-/} -PKGREVISION= 1 +PKGREVISION= 2 COMMENT= Samba and Kerberos password sync for OpenLDAP CONFLICTS+= openldap<2.3.23nb1 diff --git a/databases/openldap/distinfo b/databases/openldap/distinfo index c83dcbdb770..f48dffcf017 100644 --- a/databases/openldap/distinfo +++ b/databases/openldap/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.106 2016/06/17 14:01:58 jperkin Exp $ +$NetBSD: distinfo,v 1.107 2016/10/30 05:04:09 manu Exp $ SHA1 (openldap-2.4.44.tgz) = 016a738d050a68d388602a74b5e991035cdba149 RMD160 (openldap-2.4.44.tgz) = 6ea3139f630e93c6e0af60638672d88d6c535a6a @@ -13,6 +13,7 @@ SHA1 (patch-aj) = 857bbf14855d7d2a2911457bc6373d8beb69b751 SHA1 (patch-am) = fb8f3e7699f8b2ef55c066cdc6216522c101c7f3 SHA1 (patch-an) = 3e904d05a3e69930259329ca821d3bbf7dd54eb2 SHA1 (patch-ao) = 4fcbbfd4d6be792392e3646123022aeaf25923e3 +SHA1 (patch-contrib_modules_smbk5pwd-smbk5pwd.c) = c31fc75f94778c93dfb20e7b7fc6ab8c74212942 SHA1 (patch-contrib_slapd-modules_cloak_Makefile) = 47c81def0c013a360acb549ed69e9042f0bc1be3 SHA1 (patch-contrib_slapd-modules_nops_Makefile) = c51bccf34c3f3112232a134038622d31b6315628 SHA1 (patch-contrib_slapd-modules_nops_slapo-nops.5) = f32352f19361b7e9aa5b038ae8578def7c08fa47 diff --git a/databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c b/databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c new file mode 100644 index 00000000000..2e7f48928df --- /dev/null +++ b/databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c @@ -0,0 +1,54 @@ +$NetBSD: patch-contrib_modules_smbk5pwd-smbk5pwd.c,v 1.1 2016/10/30 05:04:09 manu Exp $ + +Submitted upstream as ITS#8525 +http://www.openldap.org/its/index.cgi/Incoming?id=8525 + +From 1aad89bbdd1f58f3b2d794067cc8c4a60876f584 Mon Sep 17 00:00:00 2001 +From: Emmanuel Dreyfus <manu@netbsd.org> +Date: Sun, 30 Oct 2016 05:34:58 +0100 +Subject: [PATCH] Use newer DES API so that smbk5pwd loads with newer OpenSSL + +OpenSSL removed old DES API which used des_* functions. +https://github.com/openssl/openssl/commit/24956ca00f014a917fb181a8abc39b349f3f316f + +In order to link with libcrypto from recent OpenSSL releases, we need +to replace the older API des_* functions by the newer API DES_* functions. + +Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> +--- + contrib/slapd-modules/smbk5pwd/smbk5pwd.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git contrib/slapd-modules/smbk5pwd/smbk5pwd.c contrib/slapd-modules/smbk5pwd/smbk5pwd.c +index bec5e1b..97e0055 100644 +--- contrib/slapd-modules/smbk5pwd/smbk5pwd.c ++++ contrib/slapd-modules/smbk5pwd/smbk5pwd.c +@@ -154,7 +154,7 @@ static void lmPasswd_to_key( + k[7] = ((lpw[6]&0x7F)<<1); + + #ifdef HAVE_OPENSSL +- des_set_odd_parity( key ); ++ DES_set_odd_parity( key ); + #endif + } + +@@ -210,12 +210,12 @@ static void lmhash( + des_set_key( &ctx, key ); + des_encrypt( &ctx, sizeof(key), hbuf[1], StdText ); + #elif defined(HAVE_OPENSSL) +- des_set_key_unchecked( &key, schedule ); +- des_ecb_encrypt( &StdText, &hbuf[0], schedule , DES_ENCRYPT ); ++ DES_set_key_unchecked( &key, &schedule ); ++ DES_ecb_encrypt( &StdText, &hbuf[0], &schedule , DES_ENCRYPT ); + + lmPasswd_to_key( &UcasePassword[7], &key ); +- des_set_key_unchecked( &key, schedule ); +- des_ecb_encrypt( &StdText, &hbuf[1], schedule , DES_ENCRYPT ); ++ DES_set_key_unchecked( &key, &schedule ); ++ DES_ecb_encrypt( &StdText, &hbuf[1], &schedule , DES_ENCRYPT ); + #endif + + hexify( (char *)hbuf, hash ); +-- +2.3.2 + |