From a8a7f14849b55bf5ca1ff2c40fab13e630065e97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Thu, 16 Jan 2025 15:35:06 +0000 Subject: [PATCH] ITS#10279 Let client notify when LDAP_DEBUG is disabled but -d specified --- clients/tools/common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clients/tools/common.c b/clients/tools/common.c index 1c6513e8a9..4823202775 100644 --- a/clients/tools/common.c +++ b/clients/tools/common.c @@ -1166,6 +1166,7 @@ tool_conn_setup( int dont, void (*private_setup)( LDAP * ) ) LDAP *ld = NULL; if ( debug ) { +#ifdef LDAP_DEBUG if( ber_set_option( NULL, LBER_OPT_DEBUG_LEVEL, &debug ) != LBER_OPT_SUCCESS ) { @@ -1178,6 +1179,10 @@ tool_conn_setup( int dont, void (*private_setup)( LDAP * ) ) fprintf( stderr, "Could not set LDAP_OPT_DEBUG_LEVEL %d\n", debug ); } +#else /* !LDAP_DEBUG */ + fprintf( stderr, + "Must compile with LDAP_DEBUG for debugging\n", prog ); +#endif /* !LDAP_DEBUG */ } #ifdef SIGPIPE -- 2.47.2