]> git.sur5r.net Git - openldap/commitdiff
ITS#2764, #2781 revert backend.c patch, just catch the NULL referral
authorHoward Chu <hyc@openldap.org>
Tue, 2 Dec 2003 03:01:49 +0000 (03:01 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 2 Dec 2003 03:01:49 +0000 (03:01 +0000)
case in extended_op

servers/slapd/backend.c
servers/slapd/extended.c

index 6b6f4e41d7f2e54355a23fe17165ab994f622e08..a9462bb7406ce40585d235c69b599e5a92b03d54 100644 (file)
@@ -353,26 +353,6 @@ int backend_startup(Backend *be)
 
        /* open each backend database */
        for( i = 0; i < nBackendDB; i++ ) {
-#ifndef SLAPD_MULTIMASTER
-               if ( backendDB[i].be_update_ndn.bv_val && (
-                       !backendDB[i].be_update_refs &&
-                       LDAP_STAILQ_EMPTY( &backendDB[i].be_syncinfo ) &&
-                       !default_referral ) )
-               {
-#ifdef NEW_LOGGING
-                       LDAP_LOG( BACKEND, CRIT, 
-                               "backend_startup: slave \"%s\" updateref missing\n",
-                               backendDB[i].be_suffix[0].bv_val, 0, 0 );
-                               
-#else
-                       Debug( LDAP_DEBUG_ANY,
-                               "backend_startup: slave \"%s\" updateref missing\n",
-                               backendDB[i].be_suffix[0].bv_val, 0, 0 );
-#endif
-                       return -1;
-               }
-#endif
-
                /* append global access controls */
                acl_append( &backendDB[i].be_acl, global_acl );
 
index 7c2efda7bf4736ec09840d6eac9dfd1dca775c70..9f70744e5047d9f70f896bbb9f5f15e18ea9bbd8 100644 (file)
@@ -314,6 +314,11 @@ done2:;
                        if ( rs->sr_err == LDAP_REFERRAL && rs->sr_ref == NULL ) {
                                rs->sr_ref = referral_rewrite( default_referral,
                                        NULL, NULL, LDAP_SCOPE_DEFAULT );
+                               if ( !rs->sr_ref ) rs->sr_ref = default_referral;
+                               if ( !rs->sr_ref ) {
+                                       rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
+                                       rs->sr_text = "referral missing";
+                               }
                        }
 
                        send_ldap_extended( op, rs );