Commit df4b2a44 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix addition of dynamic operational attributes (subschemaSubentry)

parent 466b2814
......@@ -643,12 +643,14 @@ backend_group(
return LDAP_UNWILLING_TO_PERFORM;
}
#ifdef SLAPD_SCHEMA_DN
Attribute *backend_operational(
Backend *be,
Entry *e )
{
Attribute *a = ch_malloc( sizeof( Attribute ) );
Attribute *a = NULL;
#ifdef SLAPD_SCHEMA_DN
a = ch_malloc( sizeof( Attribute ) );
a->a_desc = ad_dup( slap_schema.si_ad_subschemaSubentry );
/* Should be backend specific */
......@@ -657,7 +659,7 @@ Attribute *backend_operational(
a->a_vals[1] = NULL;
a->a_next = NULL;
#endif
return a;
}
#endif
......@@ -760,20 +760,18 @@ send_search_entry(
/* only have subschemaSubentry implemented */
aa = backend_operational( be, e );
for (a = aa ; a == NULL; a = a->a_next ) {
for (a = aa ; a != NULL; a = a->a_next ) {
AttributeDescription *desc = a->a_desc;
if ( attrs == NULL ) {
/* all addrs request, skip operational attributes */
if( is_at_operational( desc->ad_type ) )
{
if( is_at_operational( desc->ad_type ) ) {
continue;
}
} else {
/* specific addrs requested */
if( is_at_operational( desc->ad_type ) )
{
if( is_at_operational( desc->ad_type ) ) {
if( !opattrs && !ad_inlist( desc, attrs ) )
{
continue;
......@@ -792,7 +790,8 @@ send_search_entry(
continue;
}
if (( rc = ber_printf( ber, "{s[" /*]}*/ , desc )) == -1 ) {
rc = ber_printf( ber, "{s[" /*]}*/ , desc->ad_cname->bv_val );
if ( rc == -1 ) {
Debug( LDAP_DEBUG_ANY, "ber_printf failed\n", 0, 0, 0 );
ber_free( ber, 1 );
send_ldap_result( conn, op, LDAP_OTHER,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment