Diff for /servers/slapd/root_dse.c between versions 1.115 and 1.116

version 1.115, 2006/04/13 12:46:16 version 1.116, 2006/05/10 11:03:42
Line 1 Line 1
 /* root_dse.c - Provides the Root DSA-Specific Entry */  /* root_dse.c - Provides the Root DSA-Specific Entry */
 /* $OpenLDAP: pkg/ldap/servers/slapd/root_dse.c,v 1.114 2006/04/06 19:29:38 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/root_dse.c,v 1.115 2006/04/13 12:46:16 ando Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
  * Copyright 1999-2006 The OpenLDAP Foundation.   * Copyright 1999-2006 The OpenLDAP Foundation.
Line 235  root_dse_info( Line 235  root_dse_info(
         /* FIXME: is this really needed? */          /* FIXME: is this really needed? */
         BER_BVSTR( &val, "top" );          BER_BVSTR( &val, "top" );
         if( attr_merge_one( e, ad_objectClass, &val, NULL ) ) {          if( attr_merge_one( e, ad_objectClass, &val, NULL ) ) {
   fail:
                   entry_free( e );
                 return LDAP_OTHER;                  return LDAP_OTHER;
         }          }
   
         BER_BVSTR( &val, "OpenLDAProotDSE" );          BER_BVSTR( &val, "OpenLDAProotDSE" );
         if( attr_merge_one( e, ad_objectClass, &val, NULL ) ) {          if( attr_merge_one( e, ad_objectClass, &val, NULL ) ) {
                 return LDAP_OTHER;                  goto fail;
         }          }
         if( attr_merge_one( e, ad_structuralObjectClass, &val, NULL ) ) {          if( attr_merge_one( e, ad_structuralObjectClass, &val, NULL ) ) {
                 return LDAP_OTHER;                  goto fail;
         }          }
   
         LDAP_STAILQ_FOREACH( be, &backendDB, be_next ) {          LDAP_STAILQ_FOREACH( be, &backendDB, be_next ) {
Line 257  root_dse_info( Line 259  root_dse_info(
                                         &be->be_suffix[0],                                          &be->be_suffix[0],
                                         &be->be_nsuffix[0] ) )                                          &be->be_nsuffix[0] ) )
                         {                          {
                                 return LDAP_OTHER;                                  goto fail;
                         }                          }
                         continue;                          continue;
                 }                  }
Line 266  root_dse_info( Line 268  root_dse_info(
                                         &be->be_suffix[0],                                          &be->be_suffix[0],
                                         & be->be_nsuffix[0] ) )                                          & be->be_nsuffix[0] ) )
                         {                          {
                                 return LDAP_OTHER;                                  goto fail;
                         }                          }
                         continue;                          continue;
                 }                  }
Line 278  root_dse_info( Line 280  root_dse_info(
                                         &be->be_suffix[j],                                          &be->be_suffix[j],
                                         &be->be_nsuffix[0] ) )                                          &be->be_nsuffix[0] ) )
                         {                          {
                                 return LDAP_OTHER;                                  goto fail;
                         }                          }
                 }                  }
         }          }
Line 287  root_dse_info( Line 289  root_dse_info(
   
         /* supportedControl */          /* supportedControl */
         if ( controls_root_dse_info( e ) != 0 ) {          if ( controls_root_dse_info( e ) != 0 ) {
                 return LDAP_OTHER;                  goto fail;
         }          }
   
         /* supportedExtension */          /* supportedExtension */
         if ( exop_root_dse_info( e ) != 0 ) {          if ( exop_root_dse_info( e ) != 0 ) {
                 return LDAP_OTHER;                  goto fail;
         }          }
   
 #ifdef LDAP_SLAPI  #ifdef LDAP_SLAPI
         /* netscape supportedExtension */          /* netscape supportedExtension */
         for ( i = 0; (bv = slapi_int_get_supported_extop(i)) != NULL; i++ ) {          for ( i = 0; (bv = slapi_int_get_supported_extop(i)) != NULL; i++ ) {
                 if( attr_merge_one( e, ad_supportedExtension, bv, NULL ) ) {                  if( attr_merge_one( e, ad_supportedExtension, bv, NULL ) ) {
                         return LDAP_OTHER;                          goto fail;
                 }                  }
         }          }
 #endif /* LDAP_SLAPI */  #endif /* LDAP_SLAPI */
Line 310  root_dse_info( Line 312  root_dse_info(
         }          }
   
         if( attr_merge( e, ad_supportedFeatures, supportedFeatures, NULL ) ) {          if( attr_merge( e, ad_supportedFeatures, supportedFeatures, NULL ) ) {
                 return LDAP_OTHER;                  goto fail;
         }          }
   
         /* supportedLDAPVersion */          /* supportedLDAPVersion */
Line 325  root_dse_info( Line 327  root_dse_info(
                 val.bv_val = buf;                  val.bv_val = buf;
                 val.bv_len = strlen( val.bv_val );                  val.bv_len = strlen( val.bv_val );
                 if( attr_merge_one( e, ad_supportedLDAPVersion, &val, NULL ) ) {                  if( attr_merge_one( e, ad_supportedLDAPVersion, &val, NULL ) ) {
                         return LDAP_OTHER;                          goto fail;
                 }                  }
         }          }
   
Line 337  root_dse_info( Line 339  root_dse_info(
                         val.bv_val = supportedSASLMechanisms[i];                          val.bv_val = supportedSASLMechanisms[i];
                         val.bv_len = strlen( val.bv_val );                          val.bv_len = strlen( val.bv_val );
                         if( attr_merge_one( e, ad_supportedSASLMechanisms, &val, NULL ) ) {                          if( attr_merge_one( e, ad_supportedSASLMechanisms, &val, NULL ) ) {
                                 return LDAP_OTHER;                                  ldap_charray_free( supportedSASLMechanisms );
                                   goto fail;
                         }                          }
                 }                  }
                 ldap_charray_free( supportedSASLMechanisms );                  ldap_charray_free( supportedSASLMechanisms );
Line 345  root_dse_info( Line 348  root_dse_info(
   
         if ( default_referral != NULL ) {          if ( default_referral != NULL ) {
                 if( attr_merge( e, ad_ref, default_referral, NULL /* FIXME */ ) ) {                  if( attr_merge( e, ad_ref, default_referral, NULL /* FIXME */ ) ) {
                         return LDAP_OTHER;                          goto fail;
                 }                  }
         }          }
   
Line 355  root_dse_info( Line 358  root_dse_info(
                         if( attr_merge( e, a->a_desc, a->a_vals,                          if( attr_merge( e, a->a_desc, a->a_vals,
                                 (a->a_nvals == a->a_vals) ? NULL : a->a_nvals ) )                                  (a->a_nvals == a->a_vals) ? NULL : a->a_nvals ) )
                         {                          {
                                 return LDAP_OTHER;                                  goto fail;
                         }                          }
                 }                  }
         }          }

Removed from v.1.115  
changed lines
  Added in v.1.116


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org