From e46136d6cb44c8f0f268fb8445f790134d1f4bd0 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 17 Jan 2001 02:27:53 +0000 Subject: [PATCH] Update start tls error reporting --- clients/tools/ldapdelete.c | 3 +-- clients/tools/ldapmodify.c | 3 +-- clients/tools/ldapmodrdn.c | 3 +-- clients/tools/ldappasswd.c | 3 +-- clients/tools/ldapsearch.c | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c index 2bbb3c826f..4bcd7923b5 100644 --- a/clients/tools/ldapdelete.c +++ b/clients/tools/ldapdelete.c @@ -546,11 +546,10 @@ main( int argc, char **argv ) } if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { + ldap_perror( ld, "ldap_start_tls" ); if ( use_tls > 1 ) { - ldap_perror( ld, "ldap_start_tls" ); return EXIT_FAILURE; } - fprintf( stderr, "WARNING: could not start TLS\n" ); } if (want_bindpw) { diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 99b00da122..48dd7f960c 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -612,11 +612,10 @@ main( int argc, char **argv ) } if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { + ldap_perror( ld, "ldap_start_tls" ); if ( use_tls > 1 ) { - ldap_perror( ld, "ldap_start_tls" ); return( EXIT_FAILURE ); } - fprintf( stderr, "WARNING: could not start TLS\n" ); } if (want_bindpw) { diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index e4fbcc9448..f2de59185a 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -583,11 +583,10 @@ main(int argc, char **argv) } if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { + ldap_perror( ld, "ldap_start_tls" ); if ( use_tls > 1 ) { - ldap_perror( ld, "ldap_start_tls" ); return( EXIT_FAILURE ); } - fprintf( stderr, "WARNING: could not start TLS\n" ); } if (want_bindpw) { diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 667d10ec39..8f42c016fd 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -597,11 +597,10 @@ main( int argc, char *argv[] ) } if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { + ldap_perror( ld, "ldap_start_tls" ); if ( use_tls > 1 ) { - ldap_perror( ld, "ldap_start_tls" ); return( EXIT_FAILURE ); } - fprintf( stderr, "WARNING: could not start TLS\n" ); } if ( authmethod == LDAP_AUTH_SASL ) { diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index a5557f58b6..41f1cfc424 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -729,11 +729,10 @@ main( int argc, char **argv ) } if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { + ldap_perror( ld, "ldap_start_tls" ); if ( use_tls > 1 ) { - ldap_perror( ld, "ldap_start_tls" ); return EXIT_FAILURE; } - fprintf( stderr, "WARNING: could not start TLS\n" ); } if (want_bindpw) { -- 2.47.2