From 1a862732eee6c21cf97d9b58570a1e0e4587d5c4 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 25 Jun 2000 18:17:47 +0000 Subject: [PATCH] Fail if ldap_set_option fails --- clients/tools/ldapmodify.c | 1 + clients/tools/ldapmodrdn.c | 1 + clients/tools/ldappasswd.c | 1 + 3 files changed, 3 insertions(+) diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index f6f71033cd..6bc5c5354a 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -376,6 +376,7 @@ main( int argc, char **argv ) { fprintf( stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n", version ); + return EXIT_FAILURE; } if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index 1927cbd850..bf49074499 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -365,6 +365,7 @@ main(int argc, char **argv) { fprintf( stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n", version ); + return EXIT_FAILURE; } if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 1a8c8984e2..ad084ae8cf 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -326,6 +326,7 @@ main( int argc, char *argv[] ) if(rc != LDAP_OPT_SUCCESS ) { fprintf( stderr, "Could not set LDAP_OPT_PROTOCOL_VERSION %d\n", version ); + return EXIT_FAILURE; } if ( use_tls && ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS ) { -- 2.39.5