Issue 6232 - OpenLDAP 2.4.17 fails to compile with --with-tls=gnutls
Summary: OpenLDAP 2.4.17 fails to compile with --with-tls=gnutls
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.17
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-28 14:07 UTC by steffen.hau@rz.uni-mannheim.de
Modified: 2014-08-01 21:03 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description steffen.hau@rz.uni-mannheim.de 2009-07-28 14:07:17 UTC
Full_Name: Steffen Hau
Version: 2.4.17
OS: gentoo
URL: 
Submission from: (NULL) (134.155.35.13)


Gentoo prefers gnutls usage over openssl when compiling openldap. But if
with-tls=gnutls and enable-lmpasswd set, neither HAVE_OPENSSL nor NAVE_MOZNSS is
defined and passwd.c failes to compile with:

passwd.c:813: error: expected declaration specifiers or �...� before �des_key�
passwd.c: In function �lmPasswd_to_key�:
passwd.c:828: error: �key� undeclared (first use in this function)
passwd.c:828: error: (Each undeclared identifier is reported only once
passwd.c:828: error: for each function it appears in.)
passwd.c: In function �chk_lanman�:
passwd.c:839: error: �des_key� undeclared (first use in this function)
passwd.c:839: error: expected �;� before �key�
passwd.c:840: error: �des_context� undeclared (first use in this function)
passwd.c:840: error: expected �;� before �schedule�
passwd.c:841: error: �des_data_block� undeclared (first use in this function)
passwd.c:841: error: expected �;� before �StdText�
passwd.c:842: error: expected �;� before �PasswordHash1�
passwd.c:859: error: �key� undeclared (first use in this function)
passwd.c:859: error: too many arguments to function �lmPasswd_to_key�
passwd.c:860: error: �schedule� undeclared (first use in this function)
passwd.c:861: error: �StdText� undeclared (first use in this function)
passwd.c:861: error: �PasswordHash1� undeclared (first use in this function)
passwd.c:861: error: �DES_ENCRYPT� undeclared (first use in this function)
passwd.c:867: error: too many arguments to function �lmPasswd_to_key�
passwd.c:869: error: �PasswordHash2� undeclared (first use in this function)
passwd.c: In function �hash_lanman�:
passwd.c:1135: error: �des_key� undeclared (first use in this function)
passwd.c:1135: error: expected �;� before �key�
passwd.c:1136: error: �des_context� undeclared (first use in this function)
passwd.c:1136: error: expected �;� before �schedule�
passwd.c:1137: error: �des_data_block� undeclared (first use in this function)
passwd.c:1137: error: expected �;� before �StdText�
passwd.c:1138: error: expected �;� before �PasswordHash1�
passwd.c:1155: error: �key� undeclared (first use in this function)
passwd.c:1155: error: too many arguments to function �lmPasswd_to_key�
passwd.c:1156: error: �schedule� undeclared (first use in this function)
passwd.c:1157: error: �StdText� undeclared (first use in this function)
passwd.c:1157: error: �PasswordHash1� undeclared (first use in this function)
passwd.c:1157: error: �DES_ENCRYPT� undeclared (first use in this function)
passwd.c:1159: error: too many arguments to function �lmPasswd_to_key�
passwd.c:1161: error: �PasswordHash2� undeclared (first use in this function)
make[2]: *** [passwd.o] Error 1

I took a look in the passwd.c file, and because of neither HAVE_OPENSSL nor
HAVE_MOZNSS is defined, des_key isn't defined also. There is already a check in
the configure script, if tls is set when lmpasswd is set. The failure message
for it explains, that there has to be openssl installed in order to use lm
passwords. Perhaps this test has to be changed in a manner that it's checked,
what implementation is used for tls, and only activates lm passwords only, if
tls is either openssl or moznss.

Please let me know if you need further information.

Best regards,
Steffen Hau
Comment 1 Howard Chu 2009-07-28 19:45:19 UTC
steffen.hau@rz.uni-mannheim.de wrote:
> Full_Name: Steffen Hau
> Version: 2.4.17
> OS: gentoo
> URL:
> Submission from: (NULL) (134.155.35.13)
>
>
> Gentoo prefers gnutls usage over openssl when compiling openldap. But if
> with-tls=gnutls and enable-lmpasswd set, neither HAVE_OPENSSL nor NAVE_MOZNSS is
> defined and passwd.c failes to compile with:

See ITS #4997. There is a patch for this in the debian bug tracker, but until 
someone with appropriate authorization (i.e., the patch author) contributes it 
to the ITS with the requisite Rights statements attached, we cannot 
incorporate it.

> passwd.c:813: error: expected declaration specifiers or ‘...’ before ‘des_key’
> passwd.c: In function ‘lmPasswd_to_key’:
> passwd.c:828: error: ‘key’ undeclared (first use in this function)
> passwd.c:828: error: (Each undeclared identifier is reported only once
> passwd.c:828: error: for each function it appears in.)
> passwd.c: In function ‘chk_lanman’:
> passwd.c:839: error: ‘des_key’ undeclared (first use in this function)
> passwd.c:839: error: expected ‘;’ before ‘key’
> passwd.c:840: error: ‘des_context’ undeclared (first use in this function)
> passwd.c:840: error: expected ‘;’ before ‘schedule’
> passwd.c:841: error: ‘des_data_block’ undeclared (first use in this function)
> passwd.c:841: error: expected ‘;’ before ‘StdText’
> passwd.c:842: error: expected ‘;’ before ‘PasswordHash1’
> passwd.c:859: error: ‘key’ undeclared (first use in this function)
> passwd.c:859: error: too many arguments to function ‘lmPasswd_to_key’
> passwd.c:860: error: ‘schedule’ undeclared (first use in this function)
> passwd.c:861: error: ‘StdText’ undeclared (first use in this function)
> passwd.c:861: error: ‘PasswordHash1’ undeclared (first use in this function)
> passwd.c:861: error: ‘DES_ENCRYPT’ undeclared (first use in this function)
> passwd.c:867: error: too many arguments to function ‘lmPasswd_to_key’
> passwd.c:869: error: ‘PasswordHash2’ undeclared (first use in this function)
> passwd.c: In function ‘hash_lanman’:
> passwd.c:1135: error: ‘des_key’ undeclared (first use in this function)
> passwd.c:1135: error: expected ‘;’ before ‘key’
> passwd.c:1136: error: ‘des_context’ undeclared (first use in this function)
> passwd.c:1136: error: expected ‘;’ before ‘schedule’
> passwd.c:1137: error: ‘des_data_block’ undeclared (first use in this function)
> passwd.c:1137: error: expected ‘;’ before ‘StdText’
> passwd.c:1138: error: expected ‘;’ before ‘PasswordHash1’
> passwd.c:1155: error: ‘key’ undeclared (first use in this function)
> passwd.c:1155: error: too many arguments to function ‘lmPasswd_to_key’
> passwd.c:1156: error: ‘schedule’ undeclared (first use in this function)
> passwd.c:1157: error: ‘StdText’ undeclared (first use in this function)
> passwd.c:1157: error: ‘PasswordHash1’ undeclared (first use in this function)
> passwd.c:1157: error: ‘DES_ENCRYPT’ undeclared (first use in this function)
> passwd.c:1159: error: too many arguments to function ‘lmPasswd_to_key’
> passwd.c:1161: error: ‘PasswordHash2’ undeclared (first use in this function)
> make[2]: *** [passwd.o] Error 1
>
> I took a look in the passwd.c file, and because of neither HAVE_OPENSSL nor
> HAVE_MOZNSS is defined, des_key isn't defined also. There is already a check in
> the configure script, if tls is set when lmpasswd is set. The failure message
> for it explains, that there has to be openssl installed in order to use lm
> passwords. Perhaps this test has to be changed in a manner that it's checked,
> what implementation is used for tls, and only activates lm passwords only, if
> tls is either openssl or moznss.
>
> Please let me know if you need further information.
>
> Best regards,
> Steffen Hau
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Howard Chu 2009-07-28 19:46:08 UTC
changed notes
changed state Open to Closed
Comment 3 Steffen Hau 2009-07-29 12:49:57 UTC
Dear Howard,

please have a look at http://bugs.gentoo.org/show_bug.cgi?id=233633 . 
The provided patch in the Debian bug tracker does not fix the compiling 
issue of passwd.c as the defines and typedefs are inserted *after* the 
first occurrence of "des_key". I've modified this patch, and it's 
already included in gentoo's ebuild for OpenLDAP 2.4.17. I don't know if 
I'm authorized to contribute it to the ITS, as I've only modified the 
original patch. I would do it of course, if 'm allowed to, since there 
is no employer, who would prevent me to do it, as I'm doing it in my 
freetime.

Comment 4 OpenLDAP project 2014-08-01 21:03:39 UTC
dup ITS#4997