- Attribute **ap;
- int rc = 0;
- BackendDB *be_orig;
-
- for ( ap = &rs->sr_operational_attrs; *ap; ap = &(*ap)->a_next )
- /* just count them */ ;
-
- /*
- * If operational attributes (allegedly) are required,
- * and the backend supports specific operational attributes,
- * add them to the attribute list
- */
- if ( SLAP_OPATTRS( rs->sr_attr_flags ) || ( rs->sr_attrs &&
- ad_inlist( slap_schema.si_ad_entryDN, rs->sr_attrs ) ) )
- {
- *ap = slap_operational_entryDN( rs->sr_entry );
- ap = &(*ap)->a_next;
+ BackendDB *bd;
+ int rc = LDAP_NO_SUCH_OBJECT;
+
+ bd = op->o_bd;
+ op->o_bd = select_backend( ndn, 0 );
+ if ( op->o_bd != NULL ) {
+ if ( op->o_bd->be_fetch ) {
+ rc = op->o_bd->be_fetch( op, ndn, oc, at, rw, e );
+ }