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 */
a->a_vals[1] = NULL;
a->a_next = NULL;
+#endif
return a;
}
-#endif
/* 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;
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,