From 9779ac14e035bf12a2314e6d3aa6c15745dfdcd9 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 10 Aug 2002 00:15:55 +0000 Subject: [PATCH] only add subschemaSubentry when requested --- servers/slapd/backend.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 ); } -- 2.39.5