const struct ldb_val *ldb_msg_find_ldb_val(const struct ldb_message *msg,
					   const char *attr_name)
{
	struct ldb_message_element *el = ldb_msg_find_element(msg, attr_name);
	if (!el || el->num_values == 0) {
		return NULL;
	}
	return &el->values[0];
}
const struct ldb_val *ldb_msg_find_ldb_val(const struct ldb_message *msg,
					   const char *attr_name)
{
	struct ldb_message_element *el = ldb_msg_find_element(msg, attr_name);
	if (!el || el->num_values == 0) {
		return NULL;
	}
	return &el->values[0];
}