From: Kurt Zeilenga Date: Sat, 10 Aug 2002 00:15:55 +0000 (+0000) Subject: only add subschemaSubentry when requested X-Git-Tag: OPENLDAP_REL_ENG_2_1_4~48 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9779ac14e035bf12a2314e6d3aa6c15745dfdcd9;p=openldap only add subschemaSubentry when requested --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 3389fceddd..133f9fd82e 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -1105,16 +1105,18 @@ Attribute *backend_operational( { Attribute *a = NULL, **ap = &a; -#ifdef SLAPD_SCHEMA_DN - *ap = slap_operational_subschemaSubentry(); - ap = &(*ap)->a_next; -#endif - /* * If operational attributes (allegedly) are required, * and the backend supports specific operational attributes, * add them to the attribute list */ +#ifdef SLAPD_SCHEMA_DN + if ( opattrs || ( attrs && + ad_inlist( slap_schema.si_ad_subschemaSubentry, attrs )) ) { + *ap = slap_operational_subschemaSubentry(); + ap = &(*ap)->a_next; + } +#endif if ( ( opattrs || attrs ) && be && be->be_operational != NULL ) { ( void )be->be_operational( be, conn, op, e, attrs, opattrs, ap ); }