Issue 5421 - slapd vs LDAP_R_COMPILE
Summary: slapd vs LDAP_R_COMPILE
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-13 17:13 UTC by Hallvard Furuseth
Modified: 2020-09-01 22:52 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 Hallvard Furuseth 2008-03-13 17:13:28 UTC
Full_Name: Hallvard B Furuseth
Version: HEAD, RE23, RE24
OS: 
URL: 
Submission from: (NULL) (129.240.6.233)
Submitted by: hallvard


Some slapd source files include libldap/ldap-int.h, which contains
	#ifdef LDAP_R_COMPILE
in structs.  slapd links libldap_r but does not define LDAP_R_COMPILE,
so these files have access to bad struct definitions.  A quick grep
doesn't show any use cases though.  Anyway:

Either #ifdef LDAP_R_COMPILE in libldap(_r)should be something else,
or we should define LDAP_R_COMPILE in slapd - maybe like this:
--- slap.h	13 Mar 2008 13:37:07
+++ slap.h	13 Mar 2008 16:40:25
@@ -28,4 +28,10 @@
 #define _SLAP_H_
 
+#if defined _LDAP_INT_H
+# error include slap.h before ldap-int.h
+#elif !defined NO_THREADS
+# define LDAP_R_COMPILE 1
+#endif
+
 #include "ldap_defaults.h"
 


Comment 1 Howard Chu 2008-04-09 10:25:57 UTC
moved from Incoming to Development
Comment 2 Hallvard Furuseth 2010-11-23 05:21:46 UTC
changed notes
Comment 3 Hallvard Furuseth 2010-11-23 14:24:02 UTC
Taken to this thread:

   http://www.openldap.org/lists/openldap-devel/201011/msg00013.html
   librewrite & co vs. logging & ldap-int.h

Since this ITS now depends on the ldap_debug hack in ldap_log.h,
I'm removing some unnecessary '#include <ldap_log.h>'s for clarity.

-- 
Hallvard

Comment 4 Quanah Gibson-Mount 2011-01-06 10:42:23 UTC
changed notes
changed state Open to Partial
Comment 5 Howard Chu 2011-01-19 12:32:51 UTC
changed notes
changed state Partial to Test
Comment 6 Howard Chu 2011-01-19 20:32:23 UTC
h.b.furuseth@usit.uio.no wrote:
> Taken to this thread:
>
>     http://www.openldap.org/lists/openldap-devel/201011/msg00013.html
>     librewrite&  co vs. logging&  ldap-int.h
>
> Since this ITS now depends on the ldap_debug hack in ldap_log.h,
> I'm removing some unnecessary '#include<ldap_log.h>'s for clarity.
>
I've committed the fix suggested in the email linked above.

-- 
   -- 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 7 Quanah Gibson-Mount 2011-01-26 15:56:23 UTC
changed notes
changed state Test to Release
Comment 8 Quanah Gibson-Mount 2011-02-14 12:35:44 UTC
changed notes
changed state Release to Closed
Comment 9 OpenLDAP project 2014-08-01 21:05:02 UTC
See openldap-devel "librewrite & co vs. logging & ldap-int.h", nov 2010
fixed in HEAD
some work done in RE24