Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 620854 - net-nds/openldap-2.4.44[libressl samba] error: unknown type name ‘des_cblock’ - error: subscripted value is neither array nor pointer nor vector
Summary: net-nds/openldap-2.4.44[libressl samba] error: unknown type name ‘des_cblock...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo LDAP project
URL: https://www.openldap.org/lists/openld...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: libressl-support
  Show dependency tree
 
Reported: 2017-06-05 00:53 UTC by Alessandro Barbieri
Modified: 2018-04-21 00:20 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
info (info,13.36 KB, text/plain)
2017-06-05 00:55 UTC, Alessandro Barbieri
Details
openldap-2.4.44:20170604-234033.log (openldap-2.4.44:20170604-234033.log,79.56 KB, text/plain)
2017-06-05 00:58 UTC, Alessandro Barbieri
Details
libressl.patch (libressl.patch,5.84 KB, patch)
2017-06-05 00:59 UTC, Alessandro Barbieri
Details | Diff
Complete DES changes (openldap_des_change_complete-dwok.diff,5.81 KB, patch)
2017-06-27 19:35 UTC, Attila Tóth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Barbieri 2017-06-05 00:53:43 UTC
see log for the other error
upstream will (?) fix this in version 2.5, for now I found a patch in the openldap mailing list that will fix this (applied locally and build)

gcc -Os -pipe -march=native -mtune=native -fomit-frame-pointer -mfpmath=sse -Wformat -Wformat-security -Wl,-O1 -Wl,--as-needed -Wl,-O2 -Wl,-fuse-ld=gold -Wl,-z,now -Wl,
-z,relro -lpthread -lgomp -fweb -fgcse-after-reload -fivopts -fopenmp -Wno-error=implicit-function-declaration -pthread -I../../include        -I/var/tmp/portage/net-nd
s/openldap-2.4.44/work/openldap-2.4.44/include   -D_REENTRANT -DLDAP_CONNECTIONLESS -I/usr/include/db5.3 -I/usr/include/iodbc   -D_REENTRANT -DLDAP_CONNECTIONLESS  -c -
o passwd.o /var/tmp/portage/net-nds/openldap-2.4.44/work/openldap-2.4.44/libraries/liblutil/passwd.c
/var/tmp/portage/net-nds/openldap-2.4.44/work/openldap-2.4.44/libraries/liblutil/passwd.c:41:9: error: unknown type name ‘des_cblock’
 typedef des_cblock des_key;
         ^
/var/tmp/portage/net-nds/openldap-2.4.44/work/openldap-2.4.44/libraries/liblutil/passwd.c:42:9: error: unknown type name ‘des_cblock’
 typedef des_cblock des_data_block;
         ^
/var/tmp/portage/net-nds/openldap-2.4.44/work/openldap-2.4.44/libraries/liblutil/passwd.c:43:9: error: unknown type name ‘des_key_schedule’
 typedef des_key_schedule des_context;
         ^
Comment 1 Alessandro Barbieri 2017-06-05 00:55:06 UTC
Created attachment 475192 [details]
info

info
Comment 2 Alessandro Barbieri 2017-06-05 00:58:49 UTC
Created attachment 475196 [details]
openldap-2.4.44:20170604-234033.log

log
Comment 3 Alessandro Barbieri 2017-06-05 00:59:40 UTC
Created attachment 475198 [details, diff]
libressl.patch

patch
Comment 4 crabbed halo ablution 2017-06-27 03:56:30 UTC
Could you put in a diff for the ebuild? on 2.4.45 I'm getting patch errors when applying this patch last.
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2017-06-27 04:17:19 UTC
ya, iirc some of the DES capitalization changes were done in another patch change.

can someone on the libressl team verify this patch?
Comment 6 Attila Tóth 2017-06-27 19:32:46 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #5)
> ya, iirc some of the DES capitalization changes were done in another patch
> change.
> 
> can someone on the libressl team verify this patch?

openldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch also makes relevant changes:

@@ -51,6 +51,26 @@ typedef unsigned char des_data_block[8];
 typedef PK11Context *des_context[1];
 #define DES_ENCRYPT CKA_ENCRYPT

+#elif defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
+#      include <gcrypt.h>
+static int gcrypt_init = 0;
+
+typedef const void* des_key;
+typedef unsigned char DES_cblock[8];
+typedef des_cblock des_data_block;
+typedef int DES_key_schedule; /* unused */
+typedef DES_key_schedule des_context; /* unused */
+#define des_failed(encrypted) 0
+#define des_finish(key, schedule)
+
+#define DES_set_key_unchecked( key, key_sched ) \
+  gcry_cipher_setkey( hd, key, 8 )
+
+#define DES_ecb_encrypt( input, output, key_sched, enc ) \
+  gcry_cipher_encrypt( hd, *output, 8, *input, 8 )
+
+#define DES_set_odd_parity( key ) do {} while(0)
+
 #endif

 #endif /* SLAPD_LMHASH */
Comment 7 Attila Tóth 2017-06-27 19:35:03 UTC
Created attachment 478246 [details, diff]
Complete DES changes

Note, that I have problems compiling openldap with USE=gnutls. It seems the DES related changes are incomplete. I crafted this patch to address the problem. BR: Dw.
Comment 8 Aaron Bauman (RETIRED) gentoo-dev 2018-04-21 00:20:26 UTC
I have tested this USE flag combination with net-nds/openldap-2.4.44 against dev-libs/libressl-{2.6.4,2.7.2}.  I am unable to reproduce.  Everything builds and runs fine.
Comment 9 Aaron Bauman (RETIRED) gentoo-dev 2018-04-21 00:20:59 UTC
Sorry, meant to make it a test-request.