" -D binddn bind DN\n"
" -f file read operations from `file'\n"
" -h host LDAP server\n"
+" -H URI LDAP Uniform Resource Indentifier(s)\n"
" -I use SASL Interactive mode\n"
" -k use Kerberos authentication\n"
" -K like -k, but do only step 1 of the Kerberos bind\n"
(void) ldap_initialize( &ld, ldapuri );
}
- if( ld != NULL ) {
- fprintf( stderr, "Could not create LDAP session handle (%d): %s\n", rc );
+ if( ld == NULL ) {
+ fprintf( stderr, "Could not create LDAP session handle (%d): %s\n",
+ rc, ldap_err2string(rc) );
return EXIT_FAILURE;
}