[389-commits] ldap/include ldap/servers

Nathan Kinder nkinder at fedoraproject.org
Tue Nov 23 20:54:09 UTC 2010


 ldap/include/ldaplog.h                       |   31 ---------------------------
 ldap/servers/plugins/syntaxes/syntax.h       |    2 -
 ldap/servers/slapd/back-ldbm/back-ldbm.h     |    2 -
 ldap/servers/slapd/back-ldif/back-ldif.h     |    2 -
 ldap/servers/slapd/slap.h                    |    1 
 ldap/servers/slapd/test-plugins/testpostop.c |    1 
 6 files changed, 39 deletions(-)

New commits:
commit 36dbaf11b149ecabc96095b0cb3324b8ee162f11
Author: Nathan Kinder <nkinder at redhat.com>
Date:   Tue Nov 23 12:18:26 2010 -0800

    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.

diff --git a/ldap/include/ldaplog.h b/ldap/include/ldaplog.h
index 5676726..f9f73cc 100644
--- a/ldap/include/ldaplog.h
+++ b/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
diff --git a/ldap/servers/plugins/syntaxes/syntax.h b/ldap/servers/plugins/syntaxes/syntax.h
index 64942ec..0a9c738 100644
--- a/ldap/servers/plugins/syntaxes/syntax.h
+++ b/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"
 
diff --git a/ldap/servers/slapd/back-ldbm/back-ldbm.h b/ldap/servers/slapd/back-ldbm/back-ldbm.h
index 8f3a154..a0e1f1b 100644
--- a/ldap/servers/slapd/back-ldbm/back-ldbm.h
+++ b/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
diff --git a/ldap/servers/slapd/back-ldif/back-ldif.h b/ldap/servers/slapd/back-ldif/back-ldif.h
index 964c58a..a286898 100644
--- a/ldap/servers/slapd/back-ldif/back-ldif.h
+++ b/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>
diff --git a/ldap/servers/slapd/slap.h b/ldap/servers/slapd/slap.h
index cac60eb..d71367f 100644
--- a/ldap/servers/slapd/slap.h
+++ b/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
 
diff --git a/ldap/servers/slapd/test-plugins/testpostop.c b/ldap/servers/slapd/test-plugins/testpostop.c
index c600adf..f18f4ab 100644
--- a/ldap/servers/slapd/test-plugins/testpostop.c
+++ b/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




More information about the 389-commits mailing list