]> git.sur5r.net Git - openldap/commitdiff
More for ITS#5421
authorQuanah Gibson-Mount <quanah@openldap.org>
Wed, 26 Jan 2011 19:32:52 +0000 (19:32 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 26 Jan 2011 19:32:52 +0000 (19:32 +0000)
include/ldap_log.h
libraries/libldap/ldap-int.h
libraries/librewrite/rewrite-int.h
servers/slapd/back-ldap/bind.c
servers/slapd/back-ldap/config.c
servers/slapd/back-ldap/search.c
servers/slapd/back-meta/bind.c
servers/slapd/back-meta/config.c
servers/slapd/back-meta/map.c
servers/slapd/back-meta/search.c

index f1088ed6c48c1bd932e02173e50ece3a9350cdbe..0523c3c6375d4ac0d81a31b928f71b4d1e6d8d37 100644 (file)
@@ -242,12 +242,27 @@ extern void eb_syslog(int pri, const char *fmt, ...);
 #define LogTest(level) ( 0 )
 #endif /* ! LDAP_DEBUG */
 
+/* Actually now in liblber/debug.c */
 LDAP_LUTIL_F(int) lutil_debug_file LDAP_P(( FILE *file ));
 
 LDAP_LUTIL_F(void) lutil_debug LDAP_P((
        int debug, int level,
        const char* fmt, ... )) LDAP_GCCATTR((format(printf, 3, 4)));
 
+#ifdef LDAP_DEFINE_LDAP_DEBUG
+/* This struct matches the head of ldapoptions in <ldap-int.h> */
+struct ldapoptions_prefix {
+       short   ldo_valid;
+       int             ldo_debug;
+};
+#define ldap_debug \
+       (*(int *) ((char *)&ldap_int_global_options \
+                + offsetof(struct ldapoptions_prefix, ldo_debug)))
+
+struct ldapoptions;
+LDAP_V ( struct ldapoptions ) ldap_int_global_options;
+#endif /* LDAP_DEFINE_LDAP_DEBUG */
+
 LDAP_END_DECL
 
 #endif /* LDAP_LOG_H */
index da485e887852cc34e8aa0c8fd46a3a1709159dc3..e284ea820f122615890f63ff9852865e522c9387 100644 (file)
@@ -175,6 +175,7 @@ typedef struct ldaplist {
  * structure representing get/set'able options
  * which have global defaults.
  * Protect access to this struct with ldo_mutex
+ * ldap_log.h:ldapoptions_prefix must match the head of this struct.
  */
 struct ldapoptions {
        short ldo_valid;
index 72ad664f95eee7fe598b26c44b073c6d260a3a42..0f4d4c054fd1133bc842692751ca7057fca8dcfb 100644 (file)
@@ -33,7 +33,8 @@
 
 #include <lber.h>
 #include <ldap.h>
-#include "../libldap/ldap-int.h"
+#define LDAP_DEFINE_LDAP_DEBUG
+#include <ldap_log.h>
 #include <lutil.h>
 #include <avl.h>
 
index c8beb3a8460605e4b06c3f4bb8bf4d9443eba64e..42e95049256eb132207a74b61fdf1010a35cc41a 100644 (file)
@@ -33,9 +33,6 @@
 #include "slap.h"
 #include "back-ldap.h"
 #include "lutil.h"
-#undef ldap_debug      /* silence a warning in ldap-int.h */
-#include "../../../libraries/libldap/ldap-int.h"
-
 #include "lutil_ldap.h"
 
 #define LDAP_CONTROL_OBSOLETE_PROXY_AUTHZ      "2.16.840.1.113730.3.4.12"
index a94862fb18f3b1a556517c2567e790d5d970091b..8dba7b0942fe12f954af373f627ff77a39b0fe15 100644 (file)
@@ -34,9 +34,6 @@
 #include "back-ldap.h"
 #include "lutil.h"
 #include "ldif.h"
-#undef ldap_debug
-/* for advanced URL parsing */
-#include "../../../libraries/libldap/ldap-int.h"
 
 static SLAP_EXTOP_MAIN_FN ldap_back_exop_whoami;
 
index e58641cff1222909c3fca85af440cbb24bd3f401..e4fe3eade45c8479601f83b67867269b3ff8919c 100644 (file)
@@ -31,8 +31,7 @@
 
 #include "slap.h"
 #include "back-ldap.h"
-#undef ldap_debug      /* silence a warning in ldap-int.h */
-#include "../../../libraries/libldap/ldap-int.h"
+#include "../../../libraries/liblber/lber-int.h"
 
 #include "lutil.h"
 
index 11d69ee70abf7c7e92cde53c264371bd19bd819a..24272b2aca89a620004fd9bc9cedecf98f71a474 100644 (file)
@@ -33,8 +33,6 @@
 #include "slap.h"
 #include "../back-ldap/back-ldap.h"
 #include "back-meta.h"
-#undef ldap_debug      /* silence a warning in ldap-int.h */
-#include "../../../libraries/libldap/ldap-int.h"
 
 #include "lutil_ldap.h"
 
index ca9be988c5994e39b9a62dbe1872cbf52d46c22d..a6a660f3e911e7bf604ccc94cb9becb333929ca2 100644 (file)
@@ -30,8 +30,6 @@
 #include "slap.h"
 #include "lutil.h"
 #include "../back-ldap/back-ldap.h"
-#undef ldap_debug       /* silence a warning in ldap-int.h */
-#include "../../../libraries/libldap/ldap-int.h"
 #include "back-meta.h"
 
 static int
index 9e42a32225d3da05ae45b2104643ad9949eb21a8..c8686fede91fe49ae3ed8afaec91ce9169067135 100644 (file)
@@ -61,9 +61,6 @@
 #include "../back-ldap/back-ldap.h"
 #include "back-meta.h"
 
-#undef ldap_debug      /* silence a warning in ldap-int.h */
-#include "../../../libraries/libldap/ldap-int.h"
-
 int
 mapping_cmp ( const void *c1, const void *c2 )
 {
index 41f29346cc6860e30ab4335e7420093ebfc37551..2ea5645fc92fa2190a670e66b118354cea2c34e6 100644 (file)
@@ -32,9 +32,7 @@
 #include "slap.h"
 #include "../back-ldap/back-ldap.h"
 #include "back-meta.h"
-#undef ldap_debug      /* silence a warning in ldap-int.h */
-#include "ldap_log.h"
-#include "../../../libraries/libldap/ldap-int.h"
+#include "../../../libraries/liblber/lber-int.h"
 
 /* IGNORE means that target does not (no longer) participate
  * in the search;