From 6ba3b26c090e2166fec4eb53f745c6384a3ed5d8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 5 Dec 2001 03:13:50 +0000 Subject: [PATCH] Enhance error messages from Walter.Mueller@uibk.ac.at --- clients/tools/ldapmodify.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 004bfb4a53..08319972f7 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -1109,7 +1109,9 @@ domodify( i = ldap_modify_s( ld, dn, pmods ); } if ( i != LDAP_SUCCESS ) { - ldap_perror( ld, newentry ? "ldap_add" : "ldap_modify" ); + /* print error message about failed update including DN */ + fprintf( stderr, "%s: update failed: %s\n", prog, dn ); + ldap_perror( ld, newentry ? "ldap_add" : "ldap_modify" ); } else if ( verbose ) { printf( "modify complete\n" ); } @@ -1132,7 +1134,8 @@ dodelete( printf( "%sdeleting entry \"%s\"\n", not ? "!" : "", dn ); if ( !not ) { if (( rc = ldap_delete_s( ld, dn )) != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_delete" ); + fprintf( stderr, "%s: delete failed: %s\n", prog, dn ); + ldap_perror( ld, "ldap_delete" ); } else if ( verbose ) { printf( "delete complete" ); } @@ -1163,8 +1166,10 @@ dorename( } if ( !not ) { if (( rc = ldap_rename2_s( ld, dn, newrdn, newsup, deleteoldrdn )) - != LDAP_SUCCESS ) { - ldap_perror( ld, "ldap_modrdn" ); + != LDAP_SUCCESS ) + { + fprintf( stderr, "%s: rename failed: %s\n", prog, dn ); + ldap_perror( ld, "ldap_modrdn" ); } else { printf( "modrdn completed\n" ); } -- 2.39.5