*ad = *desc;
- ad->ad_cname = ber_bvdup( ad->ad_cname );
- ad->ad_lang = ch_strdup( ad->ad_lang );
+ if( ad->ad_cname != NULL ) {
+ ad->ad_cname = ber_bvdup( ad->ad_cname );
+ }
+
+ if( ad->ad_lang != NULL ) {
+ ad->ad_lang = ch_strdup( ad->ad_lang );
+ }
return ad;
}
{
if( ad == NULL ) return;
- ber_bvfree( ad->ad_cname );
+ if( ad->ad_cname != NULL ) {
+ ber_bvfree( ad->ad_cname );
+ }
+
free( ad->ad_lang );
if( freeit ) free( ad );
{
Attribute *a = ch_malloc( sizeof( Attribute ) );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
- /* not yet implemented */
+ a->a_desc = slap_schema.si_ad_subschemaSubentry;
#else
a->a_type = ch_strdup("subschemasubentry");
a->a_syntax = SYNTAX_DN | SYNTAX_CIS;
for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
#ifdef SLAPD_SCHEMA_NOT_COMPAT
AttributeDescription *desc = a->a_desc;
+ char *type = desc->ad_cname->bv_val;
#else
char *desc = a->a_type;
+ char *type = a->a_type;
#endif
if ( attrs == NULL ) {
continue;
}
- if (( rc = ber_printf( ber, "{s[" /*]}*/ , desc )) == -1 ) {
+ if (( rc = ber_printf( ber, "{s[" /*]}*/ , type )) == -1 ) {
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
ber_free( ber, 1 );
send_ldap_result( conn, op, LDAP_OTHER,
offsetof(struct slap_internal_schema, si_ad_modifiersName) },
{ "modifyTimestamp",
offsetof(struct slap_internal_schema, si_ad_modifyTimestamp) },
+
+ { "subschemaSubentry",
+ offsetof(struct slap_internal_schema, si_ad_subschemaSubentry) },
+
{ "namingContexts",
offsetof(struct slap_internal_schema, si_ad_namingContexts) },
{ "supportedControl",