static bool pdb_samba_dsdb_next_entry(struct pdb_search *search,
			       struct samr_displayentry *entry)
{
	struct pdb_samba_dsdb_search_state *state = talloc_get_type_abort(
		search->private_data, struct pdb_samba_dsdb_search_state);

	if (state->current == state->num_entries) {
		return false;
	}

	entry->idx = state->entries[state->current].idx;
	entry->rid = state->entries[state->current].rid;
	entry->acct_flags = state->entries[state->current].acct_flags;

	entry->account_name = talloc_strdup(
		search, state->entries[state->current].account_name);
	entry->fullname = talloc_strdup(
		search, state->entries[state->current].fullname);
	entry->description = talloc_strdup(
		search, state->entries[state->current].description);

	state->current += 1;
	return true;
}
static bool pdb_samba_dsdb_next_entry(struct pdb_search *search,
			       struct samr_displayentry *entry)
{
	struct pdb_samba_dsdb_search_state *state = talloc_get_type_abort(
		search->private_data, struct pdb_samba_dsdb_search_state);

	if (state->current == state->num_entries) {
		return false;
	}

	entry->idx = state->entries[state->current].idx;
	entry->rid = state->entries[state->current].rid;
	entry->acct_flags = state->entries[state->current].acct_flags;

	entry->account_name = talloc_strdup(
		search, state->entries[state->current].account_name);
	entry->fullname = talloc_strdup(
		search, state->entries[state->current].fullname);
	entry->description = talloc_strdup(
		search, state->entries[state->current].description);

	state->current += 1;
	return true;
}