]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backend.c
place old schema codes behind -DSLAPD_SCHEMA_COMPAT
[openldap] / servers / slapd / backend.c
index d1a71cc491897d95866572383a44b9eb2e9b9a2c..9aa6568a60b74c7114b5b6d75a4c268c1b55b687 100644 (file)
@@ -509,11 +509,15 @@ be_isroot_pw( Backend *be, const char *ndn, struct berval *cred )
                return 0;
        }
 
+       if( be->be_root_pw.bv_len == 0 ) {
+               return 0;
+       }
+
 #ifdef SLAPD_CRYPT
        ldap_pvt_thread_mutex_lock( &crypt_mutex );
 #endif
 
-       result = lutil_passwd( be->be_root_pw, cred->bv_val, NULL );
+       result = lutil_passwd( &be->be_root_pw, cred, NULL );
 
 #ifdef SLAPD_CRYPT
        ldap_pvt_thread_mutex_unlock( &crypt_mutex );
@@ -627,7 +631,11 @@ backend_group(
 #ifdef SLAPD_SCHEMA_DN
 Attribute *backend_subschemasubentry( Backend *be )
 {
+       /*
+        * This routine returns points to STATIC data!!!
+        */
        /* should be backend specific */
+
        static struct berval ss_val = {
                sizeof(SLAPD_SCHEMA_DN)-1,
                SLAPD_SCHEMA_DN };
@@ -635,7 +643,9 @@ Attribute *backend_subschemasubentry( Backend *be )
        static Attribute ss_attr = {
                "subschemasubentry",
                ss_vals,
+#ifdef SLAPD_SCHEMA_COMPAT
                SYNTAX_DN | SYNTAX_CIS,
+#endif
                NULL
        };