]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/bind.c
Add start of discussion of strings in LDAP/X.500 and OpenLDAP.
[openldap] / servers / slapd / back-ldap / bind.c
index c0e532930a884995f4ddb0b0b37b2248651037fd..92d5856fa1ff00c248a15e707f036e3d4ad69d10 100644 (file)
@@ -84,8 +84,8 @@ ldap_back_bind(
                        mdn.bv_val = ( char * )dn->bv_val;
                }
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
-                               "[rw] bindDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val ));
+               LDAP_LOG( BACK_LDAP, DETAIL1, 
+                       "[rw] bindDn: \"%s\" -> \"%s\"\n", dn->bv_val, mdn.bv_val, 0 );
 #else /* !NEW_LOGGING */
                Debug( LDAP_DEBUG_ARGS, "rw> bindDn: \"%s\" -> \"%s\"\n%s",
                                dn->bv_val, mdn.bv_val, "" );
@@ -98,7 +98,7 @@ ldap_back_bind(
                return( -1 );
 
        case REWRITE_REGEXEC_ERR:
-               send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
+               send_ldap_result( conn, op, LDAP_OTHER,
                                NULL, "Operations error", NULL, NULL );
                return( -1 );
        }
@@ -258,11 +258,11 @@ ldap_back_getconn(struct ldapinfo *li, Connection *conn, Operation *op)
                                        ber_dupbv( &lc->bound_dn, &lc->conn->c_dn );
                                }
 #ifdef NEW_LOGGING
-                               LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
-                                               "[rw] bindDn: \"%s\" ->"
+                               LDAP_LOG( BACK_LDAP, DETAIL1, 
+                                               "[rw] bindDn: \"%s\" ->" 
                                                " \"%s\"\n%s",
-                                               lc->conn->c_dn.bv_val,
-                                               lc->bound_dn.bv_val ));
+                                               lc->conn->c_dn.bv_val, 
+                                               lc->bound_dn.bv_val, "" );
 #else /* !NEW_LOGGING */
                                Debug( LDAP_DEBUG_ARGS,
                                                "rw> bindDn: \"%s\" ->"
@@ -281,7 +281,7 @@ ldap_back_getconn(struct ldapinfo *li, Connection *conn, Operation *op)
                                
                        case REWRITE_REGEXEC_ERR:
                                send_ldap_result( conn, op,
-                                               LDAP_OPERATIONS_ERROR,
+                                               LDAP_OTHER,
                                                NULL, "Operations error",
                                                NULL, NULL );
                                return( NULL );
@@ -312,9 +312,8 @@ ldap_back_getconn(struct ldapinfo *li, Connection *conn, Operation *op)
                ldap_pvt_thread_mutex_unlock( &li->conn_mutex );
 
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
-                               "ldap_back_getconn: conn %ld inserted\n",
-                               lc->conn->c_connid ));
+               LDAP_LOG( BACK_LDAP, INFO, 
+                       "ldap_back_getconn: conn %ld inserted\n", lc->conn->c_connid, 0, 0);
 #else /* !NEW_LOGGING */
                Debug( LDAP_DEBUG_TRACE,
                        "=>ldap_back_getconn: conn %ld inserted\n%s%s",
@@ -323,16 +322,16 @@ ldap_back_getconn(struct ldapinfo *li, Connection *conn, Operation *op)
                
                /* Err could be -1 in case a duplicate ldapconn is inserted */
                if ( err != 0 ) {
-                       send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
+                       send_ldap_result( conn, op, LDAP_OTHER,
                        NULL, "internal server error", NULL, NULL );
                        /* better destroy the ldapconn struct? */
                        return( NULL );
                }
        } else {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
-                               "ldap_back_getconn: conn %ld inserted\n",
-                               lc->conn->c_connid ));
+               LDAP_LOG( BACK_LDAP, INFO, 
+                       "ldap_back_getconn: conn %ld inserted\n", 
+                       lc->conn->c_connid, 0, 0 );
 #else /* !NEW_LOGGING */
                Debug( LDAP_DEBUG_TRACE,
                        "=>ldap_back_getconn: conn %ld fetched%s%s\n",
@@ -390,7 +389,7 @@ ldap_back_map_result(int err)
        case LDAP_SERVER_DOWN:
                return LDAP_UNAVAILABLE;
        case LDAP_LOCAL_ERROR:
-               return LDAP_OPERATIONS_ERROR;
+               return LDAP_OTHER;
        case LDAP_ENCODING_ERROR:
        case LDAP_DECODING_ERROR:
                return LDAP_PROTOCOL_ERROR;
@@ -399,13 +398,13 @@ ldap_back_map_result(int err)
        case LDAP_AUTH_UNKNOWN:
                return LDAP_AUTH_METHOD_NOT_SUPPORTED;
        case LDAP_FILTER_ERROR:
-               return LDAP_OPERATIONS_ERROR;
+               return LDAP_OTHER;
        case LDAP_USER_CANCELLED:
-               return LDAP_OPERATIONS_ERROR;
+               return LDAP_OTHER;
        case LDAP_PARAM_ERROR:
                return LDAP_PROTOCOL_ERROR;
        case LDAP_NO_MEMORY:
-               return LDAP_OPERATIONS_ERROR;
+               return LDAP_OTHER;
        case LDAP_CONNECT_ERROR:
                return LDAP_UNAVAILABLE;
        case LDAP_NOT_SUPPORTED: