Diff for /servers/slapd/root_dse.c between versions 1.117 and 1.119

version 1.117, 2006/08/19 03:47:05 version 1.119, 2006/08/28 23:43:24
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.116 2006/05/10 11:03:42 hyc Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/root_dse.c,v 1.118 2006/08/25 18:05:14 kurt 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 213  root_dse_info( Line 213  root_dse_info(
         AttributeDescription *ad_ref          AttributeDescription *ad_ref
                 = slap_schema.si_ad_ref;                  = slap_schema.si_ad_ref;
   
         e = (Entry *) SLAP_CALLOC( 1, sizeof(Entry) );          e = entry_alloc();
         if( e == NULL ) {          if( e == NULL ) {
                 Debug( LDAP_DEBUG_ANY,                  Debug( LDAP_DEBUG_ANY,
                         "root_dse_info: SLAP_CALLOC failed", 0, 0, 0 );                          "root_dse_info: entry_alloc failed", 0, 0, 0 );
                 return LDAP_OTHER;                  return LDAP_OTHER;
         }          }
   
Line 322  fail: Line 322  fail:
                  * clients.                   * clients.
                  */                   */
         for ( i=LDAP_VERSION3; i<=LDAP_VERSION_MAX; i++ ) {          for ( i=LDAP_VERSION3; i<=LDAP_VERSION_MAX; i++ ) {
                 char buf[BUFSIZ];                  char buf[sizeof("255")];
                 snprintf(buf, sizeof buf, "%d", i);                  snprintf(buf, sizeof buf, "%d", i);
                 val.bv_val = buf;                  val.bv_val = buf;
                 val.bv_len = strlen( val.bv_val );                  val.bv_len = strlen( val.bv_val );
Line 395  int read_root_dse_file( const char *fnam Line 395  int read_root_dse_file( const char *fnam
                 return EXIT_FAILURE;                  return EXIT_FAILURE;
         }          }
   
         usr_attr = (Entry *) SLAP_CALLOC( 1, sizeof(Entry) );          usr_attr = entry_alloc();
         if( usr_attr == NULL ) {          if( usr_attr == NULL ) {
                 Debug( LDAP_DEBUG_ANY,                  Debug( LDAP_DEBUG_ANY,
                         "read_root_dse_file: SLAP_CALLOC failed", 0, 0, 0 );                          "read_root_dse_file: entry_alloc failed", 0, 0, 0 );
                 ldif_close( fp );                  ldif_close( fp );
                 return LDAP_OTHER;                  return LDAP_OTHER;
         }          }

Removed from v.1.117  
changed lines
  Added in v.1.119


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