+ char **ptrArray;
+ GList *node;
+ gint cnt, i;
+ g_return_val_if_fail( ctl != NULL, NULL );
+
+ node = ctl->listCriteria;
+ cnt = g_list_length( ctl->listCriteria );
+ ptrArray = g_new0( char *, 1 + cnt );
+ i = 0;
+ while( node ) {
+ ptrArray[ i++ ] = node->data;
+ /*debug_print("adding search attribute: %s\n", (gchar *) node->data);*/
+ node = g_list_next( node );
+ }
+ ptrArray[ i ] = NULL;
+ return ptrArray;
+}
+
+/**
+ * Return array of pointers to attributes for LDAP query.
+ * \param ctl Control object to process.
+ * \return NULL terminated list.
+ */
+char **ldapctl_full_attribute_array( LdapControl *ctl ) {