1
0
Эх сурвалжийг харах

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!!)
Noriko Hosoi 13 жил өмнө
parent
commit
435972ef79

+ 4 - 0
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;
 		}