pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases Use newer DES API so that smbk5pwd loads wit...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d8ebe9cd9aa5
branches:  trunk
changeset: 354431:d8ebe9cd9aa5
user:      manu <manu%pkgsrc.org@localhost>
date:      Sun Oct 30 05:04:09 2016 +0000

description:
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:

 databases/openldap-smbk5pwd/Makefile                                 |   4 +-
 databases/openldap/distinfo                                          |   3 +-
 databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c |  54 ++++++++++
 3 files changed, 58 insertions(+), 3 deletions(-)

diffs (88 lines):

diff -r 0dc7eefec532 -r d8ebe9cd9aa5 databases/openldap-smbk5pwd/Makefile
--- a/databases/openldap-smbk5pwd/Makefile      Sun Oct 30 01:10:10 2016 +0000
+++ b/databases/openldap-smbk5pwd/Makefile      Sun Oct 30 05:04:09 2016 +0000
@@ -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 -r 0dc7eefec532 -r d8ebe9cd9aa5 databases/openldap/distinfo
--- a/databases/openldap/distinfo       Sun Oct 30 01:10:10 2016 +0000
+++ b/databases/openldap/distinfo       Sun Oct 30 05:04:09 2016 +0000
@@ -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-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 -r 0dc7eefec532 -r d8ebe9cd9aa5 databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/openldap/patches/patch-contrib_modules_smbk5pwd-smbk5pwd.c      Sun Oct 30 05:04:09 2016 +0000
@@ -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@localhost>
+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@localhost>
+---
+ 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
+



Home | Main Index | Thread Index | Old Index