static int samldb_check_sAMAccountName(struct samldb_ctx *ac)
{
	int ret;

	if (ldb_msg_find_element(ac->msg, "sAMAccountName") == NULL) {
		ret = samldb_generate_sAMAccountName(ac, ac->msg);
		if (ret != LDB_SUCCESS) {
			return ret;
		}
	}

	ret = samldb_sam_accountname_valid_check(ac);
	if (ret != LDB_SUCCESS) {
		return ret;
	}

	return samldb_next_step(ac);
}
static int samldb_check_sAMAccountName(struct samldb_ctx *ac)
{
	int ret;

	if (ldb_msg_find_element(ac->msg, "sAMAccountName") == NULL) {
		ret = samldb_generate_sAMAccountName(ac, ac->msg);
		if (ret != LDB_SUCCESS) {
			return ret;
		}
	}

	ret = samldb_sam_accountname_valid_check(ac);
	if (ret != LDB_SUCCESS) {
		return ret;
	}

	return samldb_next_step(ac);
}