From 435972ef79dbfee5a9a1cb93de1f899c791a1148 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Jan 24 2013 01:38:21 +0000 Subject: Ticket #505 - use lock-free access name2asi and oid2asi tables (additional) Bug description: commit 9c36be0540beebaca2be300b53c63b1c238ba4a7 introduced "lazy attribute type initialization". When searching, operational attributes in the returned entry had no chance to get initialized with the syntax, where the fact that the attribute is operational is set. Due to the missing info, the operational attributes are unconditionally returned to the client. Fix description: This patch adds the attribute type initialization to slapi_vattr_list_attrs, which is called from the sending search result code. https://fedorahosted.org/389/ticket/505 Reviewed by Rich and Ludwig (Thank you!!) --- diff --git a/ldap/servers/slapd/vattr.c b/ldap/servers/slapd/vattr.c index 56c348d..3360852 100644 --- a/ldap/servers/slapd/vattr.c +++ b/ldap/servers/slapd/vattr.c @@ -1256,6 +1256,10 @@ int slapi_vattr_list_attrs(/* Entry we're interested in */ Slapi_Entry *e, mypointer = slapi_ch_strdup(current_attr->a_type); list_is_copies = 1; } + if (NULL == current_attr->a_plugin) { + /* could be lazy plugin initialization, get it now */ + slapi_attr_init_syntax(current_attr); + } result_array[i].type_flags = current_attr->a_flags; result_array[i++].type_name = mypointer; }