Diff for /servers/slapd/root_dse.c between versions 1.42 and 1.48

version 1.42, 2001/11/05 22:14:42 version 1.48, 2001/12/21 03:44:35
Line 1 Line 1
 /* $OpenLDAP: pkg/ldap/servers/slapd/root_dse.c,v 1.41 2001/10/23 21:29:41 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/root_dse.c,v 1.47 2001/12/19 21:41:00 kurt Exp $ */
 /* root_dse.c - Provides the ROOT DSA-Specific Entry  /* root_dse.c - Provides the ROOT DSA-Specific Entry
  *   *
  * Copyright 1999-2000 The OpenLDAP Foundation.   * Copyright 1999-2000 The OpenLDAP Foundation.
Line 16 Line 16
 #include <ac/string.h>  #include <ac/string.h>
   
 #include "slap.h"  #include "slap.h"
   #include <ldif.h>
   
 static char *supportedFeatures[] = {  static char *supportedFeatures[] = {
         "1.3.6.1.4.1.4203.1.5.1", /* All Operational Attributes ("+") */          "1.3.6.1.4.1.4203.1.5.1", /* All Operational Attributes ("+") */
           "1.3.6.1.4.1.4203.1.5.2", /* OCs in Attributes List */
         NULL          NULL
 };  };
   
Line 37  root_dse_info( Line 39  root_dse_info(
         int             i, j;          int             i, j;
         char ** supportedSASLMechanisms;          char ** supportedSASLMechanisms;
   
         AttributeDescription *ad_objectClass = slap_schema.si_ad_objectClass;          AttributeDescription *ad_structuralObjectClass
         AttributeDescription *ad_namingContexts = slap_schema.si_ad_namingContexts;                  = slap_schema.si_ad_structuralObjectClass;
         AttributeDescription *ad_supportedControl = slap_schema.si_ad_supportedControl;          AttributeDescription *ad_objectClass
         AttributeDescription *ad_supportedExtension = slap_schema.si_ad_supportedExtension;                  = slap_schema.si_ad_objectClass;
         AttributeDescription *ad_supportedLDAPVersion = slap_schema.si_ad_supportedLDAPVersion;          AttributeDescription *ad_namingContexts
         AttributeDescription *ad_supportedSASLMechanisms = slap_schema.si_ad_supportedSASLMechanisms;                  = slap_schema.si_ad_namingContexts;
         AttributeDescription *ad_supportedFeatures = slap_schema.si_ad_supportedFeatures;          AttributeDescription *ad_supportedControl
         AttributeDescription *ad_ref = slap_schema.si_ad_ref;                  = slap_schema.si_ad_supportedControl;
           AttributeDescription *ad_supportedExtension
                   = slap_schema.si_ad_supportedExtension;
           AttributeDescription *ad_supportedLDAPVersion
                   = slap_schema.si_ad_supportedLDAPVersion;
           AttributeDescription *ad_supportedSASLMechanisms
                   = slap_schema.si_ad_supportedSASLMechanisms;
           AttributeDescription *ad_supportedFeatures
                   = slap_schema.si_ad_supportedFeatures;
           AttributeDescription *ad_ref
                   = slap_schema.si_ad_ref;
   
         Attribute *a;          Attribute *a;
   
Line 59  root_dse_info( Line 71  root_dse_info(
         (void) dn_normalize( e->e_ndn );          (void) dn_normalize( e->e_ndn );
         e->e_private = NULL;          e->e_private = NULL;
   
           val.bv_val = "OpenLDAProotDSE";
           val.bv_len = sizeof("OpenLDAProotDSE")-1;
           attr_merge( e, ad_structuralObjectClass, vals );
   
         val.bv_val = "top";          val.bv_val = "top";
         val.bv_len = sizeof("top")-1;          val.bv_len = sizeof("top")-1;
         attr_merge( e, ad_objectClass, vals );          attr_merge( e, ad_objectClass, vals );
Line 68  root_dse_info( Line 84  root_dse_info(
         attr_merge( e, ad_objectClass, vals );          attr_merge( e, ad_objectClass, vals );
   
         for ( i = 0; i < nbackends; i++ ) {          for ( i = 0; i < nbackends; i++ ) {
                   if ( backends[i].be_glueflags & SLAP_GLUE_SUBORDINATE )
                           continue;
                 for ( j = 0; backends[i].be_suffix[j] != NULL; j++ ) {                  for ( j = 0; backends[i].be_suffix[j] != NULL; j++ ) {
                         val.bv_val = backends[i].be_suffix[j];                          val.bv_val = backends[i].be_suffix[j];
                         val.bv_len = strlen( val.bv_val );                          val.bv_len = strlen( val.bv_val );
Line 99  root_dse_info( Line 117  root_dse_info(
   
         /* supportedLDAPVersion */          /* supportedLDAPVersion */
         for ( i=LDAP_VERSION_MIN; i<=LDAP_VERSION_MAX; i++ ) {          for ( i=LDAP_VERSION_MIN; i<=LDAP_VERSION_MAX; i++ ) {
                 if (( global_disallows & SLAP_DISALLOW_BIND_V2 ) &&                  if (!( global_allows & SLAP_ALLOW_BIND_V2 ) &&
                         ( i < LDAP_VERSION3 ) )                          ( i < LDAP_VERSION3 ) )
                 {                  {
                         /* version 2 and lower are disallowed */                          /* version 2 and lower are disallowed */
Line 146  root_dse_info( Line 164  root_dse_info(
 int read_root_dse_file( const char *fname )  int read_root_dse_file( const char *fname )
 {  {
         FILE    *fp;          FILE    *fp;
         char    *line, *savefname, *saveline;  
         int rc = 0, lineno = 0, lmax = 0;          int rc = 0, lineno = 0, lmax = 0;
         char    *buf = NULL;          char    *buf = NULL;
   
Line 164  int read_root_dse_file( const char *fnam Line 181  int read_root_dse_file( const char *fnam
         usr_attr->e_attrs = NULL;          usr_attr->e_attrs = NULL;
   
         while( ldif_read_record( fp, &lineno, &buf, &lmax ) ) {          while( ldif_read_record( fp, &lineno, &buf, &lmax ) ) {
                 ID id;  
                 Entry *e = str2entry( buf );                  Entry *e = str2entry( buf );
   
                 if( e == NULL ) {                  if( e == NULL ) {

Removed from v.1.42  
changed lines
  Added in v.1.48


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