From aba0eacaeea2f1d4acb078ff9ed1f8fc1c12a7a3 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 11 Jan 2007 20:57:43 +0000 Subject: [PATCH] don't list (other) structural classes --- servers/slapd/overlays/dynlist.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/servers/slapd/overlays/dynlist.c b/servers/slapd/overlays/dynlist.c index 100afb1b40..cf461b6bc0 100644 --- a/servers/slapd/overlays/dynlist.c +++ b/servers/slapd/overlays/dynlist.c @@ -198,7 +198,8 @@ dynlist_sc_update( Operation *op, SlapReply *rs ) for ( a = rs->sr_entry->e_attrs; a != NULL; a = a->a_next ) { BerVarray vals, nvals = NULL; - int i, j; + int i, j, + is_oc = a->a_desc == slap_schema.si_ad_objectClass; /* if attribute is not requested, skip it */ if ( rs->sr_attrs == NULL ) { @@ -247,6 +248,14 @@ dynlist_sc_update( Operation *op, SlapReply *rs ) } for ( i = 0, j = 0; !BER_BVISNULL( &a->a_vals[i] ); i++ ) { + if ( is_oc ) { + ObjectClass *soc = oc_bvfind( &a->a_vals[i] ); + + if ( soc->soc_kind == LDAP_SCHEMA_STRUCTURAL ) { + continue; + } + } + if ( access_allowed( op, rs->sr_entry, a->a_desc, &a->a_nvals[i], ACL_READ, &acl_state ) ) { -- 2.39.5