]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backend.c
Fix previous commit
[openldap] / servers / slapd / backend.c
index 530410362cc165631370bde305185b41f1baa2bd..d2d3f5976c4c50ca73b0cf411ca9ca9844c3a562 100644 (file)
@@ -272,11 +272,11 @@ int backend_startup(Backend *be)
                if(rc != 0) {
 #ifdef NEW_LOGGING
                        LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
-                                  "backend_startup: bi_db_open failed!\n" ));
+                               "backend_startup: bi_db_open failed! (%d)\n", rc ));
 #else
                        Debug( LDAP_DEBUG_ANY,
-                               "backend_startup: bi_db_open failed!\n",
-                               0, 0, 0 );
+                               "backend_startup: bi_db_open failed! (%d)\n",
+                               rc, 0, 0 );
 #endif
                        return rc;
                }
@@ -322,11 +322,12 @@ int backend_startup(Backend *be)
                if(rc != 0) {
 #ifdef NEW_LOGGING
                        LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
-                                  "backend_startup: bi_db_open %d failed!\n", i ));
+                               "backend_startup: bi_db_open(%d) failed! (%d)\n",
+                               i, rc ));
 #else
                        Debug( LDAP_DEBUG_ANY,
-                               "backend_startup: bi_db_open %d failed!\n",
-                               i, 0, 0 );
+                               "backend_startup: bi_db_open(%d) failed! (%d)\n",
+                               i, rc, 0 );
 #endif
                        return rc;
                }
@@ -489,6 +490,7 @@ backend_db_init(
 
        be->be_restrictops = global_restrictops;
        be->be_requires = global_requires;
+       be->be_ssf_set = global_ssf_set;
 
        /* assign a default depth limit for alias deref */
        be->be_max_deref_depth = SLAPD_DEFAULT_MAXDEREFDEPTH; 
@@ -577,17 +579,13 @@ select_backend(
 int
 be_issuffix(
     Backend    *be,
-    const char *suffix
+    struct berval      *bvsuffix
 )
 {
        int     i;
-       size_t len = strlen(suffix);
 
        for ( i = 0; be->be_nsuffix != NULL && be->be_nsuffix[i] != NULL; i++ ) {
-               if ( len != be->be_nsuffix[i]->bv_len ) {
-                       continue;
-               }
-               if ( strcmp( be->be_nsuffix[i]->bv_val, suffix ) == 0 ) {
+               if ( ber_bvcmp( be->be_nsuffix[i], bvsuffix ) == 0 ) {
                        return( 1 );
                }
        }
@@ -748,7 +746,7 @@ backend_check_controls(
                if( (*ctrls)->ldctl_iscritical &&
                        !charray_inlist( be->be_controls, (*ctrls)->ldctl_oid ) )
                {
-                       *text = "control unavailable in NamingContext";
+                       *text = "control unavailable in context";
                        return LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
                }
        }