SLAPD_SCHEMA_NOT_COMPAT: simple Root DSE search WORKS!

This commit is contained in:
Kurt Zeilenga 2000-05-15 22:07:10 +00:00
parent 19becc614f
commit aa08287e29
4 changed files with 19 additions and 5 deletions

View File

@ -32,8 +32,13 @@ AttributeDescription *ad_dup(
*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;
}
@ -43,7 +48,10 @@ ad_free( AttributeDescription *ad, int freeit )
{
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 );

View File

@ -657,7 +657,7 @@ Attribute *backend_operational(
{
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;

View File

@ -677,8 +677,10 @@ send_search_entry(
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 ) {
@ -716,7 +718,7 @@ send_search_entry(
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,

View File

@ -635,6 +635,10 @@ struct slap_schema_ad_map {
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",