]> git.sur5r.net Git - openldap/blobdiff - clients/ud/main.c
Don't depend error handling on exact resultCode.
[openldap] / clients / ud / main.c
index 80428fec8f7d42f0778328743360bfa0a31bc073..794b77d38cdda474e138a7b0ed5bffc7de3ac2ef 100644 (file)
@@ -280,7 +280,7 @@ do_commands( void )
        printf(" Thank you!\n");
        
        ldap_unbind(ld);
-#ifdef HAVE_KERBEROS
+#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
        destroy_tickets();
 #endif
        exit( EXIT_SUCCESS );
@@ -435,7 +435,7 @@ change_base( int type, char **base, char *s )
                 *  the user if they want to see more.  They can also just
                 *  type a number at that point too.
                 */
-               if (ldap_search_s(ld, *base, LDAP_SCOPE_ONELEVEL, "(|(objectClass=quipuNonLeafObject)(objectClass=externalNonLeafObject))", attrs, FALSE, &mp) != LDAP_SUCCESS) {
+               if (ldap_search_s(ld, *base, LDAP_SCOPE_ONELEVEL, NULL, attrs, FALSE, &mp) != LDAP_SUCCESS) {
                        int ld_errno = 0;
                        ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
                        if ((ld_errno == LDAP_TIMELIMIT_EXCEEDED) ||
@@ -660,12 +660,7 @@ initialize_client( void )
        }
        if (ldap_bind_s(ld, (char *) default_bind_object, NULL,
            LDAP_AUTH_SIMPLE) != LDAP_SUCCESS) {
-               int ld_errno = 0;
-               ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
-
-               fprintf(stderr, "  The LDAP Directory is temporarily unavailable.  Please try again later.\n");
-               if (ld_errno != LDAP_UNAVAILABLE)
-                       ldap_perror(ld, "  ldap_bind_s");
+               ldap_perror(ld, "  ldap_bind_s");
                exit( EXIT_FAILURE );
                /* NOTREACHED */
        }