瀏覽代碼

Bug 656392 - Remove calls to ber_err_print()

The LDAPDebug macros call the ber_err_print() function in cases
where SLAPD_LOGGING is not defined.  This function exists as a
private function in MozLDAP, but it does not exist in the OpenLDAP
client libraries.  This results in the server aborting when built
against OpenLDAP due to an unresolved symbol.

This patch removes the code that calls ber_err_print().  I removed
the entire SLAPD_LOGGING define from the code, as it was only used
to switch between logging to stderr or the errors log subsystem.
This code was very old.  We should only be logging to the errors
log subsystem.
Nathan Kinder 15 年之前
父節點
當前提交
36dbaf11b1

+ 0 - 31
ldap/include/ldaplog.h

@@ -85,8 +85,6 @@ extern "C" {
 #  undef LDAPDebug2Args
 #  undef LDAPDebugLevelIsSet
 
-/* SLAPD_LOGGING should not be on for WINSOCK (16-bit Windows) */
-#  if defined(SLAPD_LOGGING)
 #    ifdef _WIN32
 #      ifndef DONT_DECLARE_SLAPD_LDAP_DEBUG /* see libglobs.c for info */
        extern __declspec(dllimport) int	slapd_ldap_debug;
@@ -144,35 +142,6 @@ extern "C" {
        }
 #      define LDAPDebugLevelIsSet( level ) (0 != (slapd_ldap_debug & level))
 #    endif /* Win32 */
-#  else /* no SLAPD_LOGGING */
-     extern void ber_err_print( char * );
-     extern int	slapd_ldap_debug;
-#    define LDAPDebug( level, fmt, arg1, arg2, arg3 ) \
-		if ( slapd_ldap_debug & level ) { \
-			char msg[256]; \
-			PR_snprintf( msg, sizeof(msg), fmt, arg1, arg2, arg3 ); \
-			ber_err_print( msg ); \
-		}
-#    define LDAPDebug0Args( level, fmt ) \
-		if ( slapd_ldap_debug & level ) { \
-			char msg[256]; \
-			PR_snprintf( msg, sizeof(msg), fmt ); \
-			ber_err_print( msg ); \
-		}
-#    define LDAPDebug1Arg( level, fmt, arg )  \
-		if ( slapd_ldap_debug & level ) { \
-			char msg[256]; \
-			PR_snprintf( msg, sizeof(msg), fmt, arg );  \
-			ber_err_print( msg ); \
-		}
-#    define LDAPDebug2Args( level, fmt, arg1, arg2 ) \
-		if ( slapd_ldap_debug & level ) { \
-			char msg[256]; \
-			PR_snprintf( msg, sizeof(msg), fmt, arg1, arg2 );    \
-			ber_err_print( msg ); \
-		}
-#    define LDAPDebugLevelIsSet( level )	(0 != (slapd_ldap_debug & level))
-#  endif /* SLAPD_LOGGING */
 #endif /* LDAP_DEBUG */
 
 #ifdef __cplusplus

+ 0 - 2
ldap/servers/plugins/syntaxes/syntax.h

@@ -45,8 +45,6 @@
 #ifndef _LIBSYNTAX_H_
 #define _LIBSYNTAX_H_
 
-#define SLAPD_LOGGING	1
-
 #include "slap.h"
 #include "slapi-plugin.h"
 

+ 0 - 2
ldap/servers/slapd/back-ldbm/back-ldbm.h

@@ -45,8 +45,6 @@
 #ifndef _BACK_LDBM_H_
 #define _BACK_LDBM_H_
 
-#define	SLAPD_LOGGING	1
-
 #if defined(irix) || defined(AIX) || defined(HPUX11) || defined(OS_solaris) || defined(linux)
 /* built-in 64-bit file I/O support */
 #define DB_USE_64LFS

+ 0 - 2
ldap/servers/slapd/back-ldif/back-ldif.h

@@ -47,8 +47,6 @@
  *  for the data structures used in the ldif backend database
  */
 
-#define	SLAPD_LOGGING	1
-
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>

+ 0 - 1
ldap/servers/slapd/slap.h

@@ -149,7 +149,6 @@ typedef struct symbol_t {
 #define SLAPD_SSLCLIENTAUTH_REQUIRED 2 /* server will refuse SSL session unless client sends cert */
 #define SLAPD_SSLCLIENTAUTH_DEFAULT  SLAPD_SSLCLIENTAUTH_ALLOWED
 
-#define	SLAPD_LOGGING	1
 #define NUM_SNMP_INT_TBL_ROWS 5
 #define SNMP_FIELD_LENGTH 100
 

+ 0 - 1
ldap/servers/slapd/test-plugins/testpostop.c

@@ -86,7 +86,6 @@
 #include <time.h>
 #include "slapi-plugin.h"
 
-#define SLAPD_LOGGING 1
 #define	_ADD	0
 #define _MOD	1
 #define _DEL	2