mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 10:09:43 -05:00
Fix addition of dynamic operational attributes (subschemaSubentry)
This commit is contained in:
parent
466b281426
commit
df4b2a443e
2 changed files with 10 additions and 9 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue