bool ldb_kv_key_is_normal_record(struct ldb_val key)
{
	if (key.length < 4) {
		return false;
	}

	/*
	 * @ records are not normal records, we don't want to index
	 * them nor search on them
	 */
	if (key.length > 4 &&
	    memcmp(key.data, "DN=@", 4) == 0) {
		return false;
	}

	/* All other DN= records are however */
	if (memcmp(key.data, "DN=", 3) == 0) {
		return true;
	}

	if (memcmp(key.data, "ID=", 3) == 0) {
		return true;
	}

	if (key.length < sizeof(LDB_KV_GUID_KEY_PREFIX)) {
		return false;
	}

	if (memcmp(key.data, LDB_KV_GUID_KEY_PREFIX,
		   sizeof(LDB_KV_GUID_KEY_PREFIX) - 1) == 0) {
		return true;
	}

	return false;
}
bool ldb_kv_key_is_normal_record(struct ldb_val key)
{
	if (key.length < 4) {
		return false;
	}

	 
	if (key.length > 4 &&
	    memcmp(key.data, "DN=@", 4) == 0) {
		return false;
	}

	 
	if (memcmp(key.data, "DN=", 3) == 0) {
		return true;
	}

	if (memcmp(key.data, "ID=", 3) == 0) {
		return true;
	}

	if (key.length < sizeof(LDB_KV_GUID_KEY_PREFIX)) {
		return false;
	}

	if (memcmp(key.data, LDB_KV_GUID_KEY_PREFIX,
		   sizeof(LDB_KV_GUID_KEY_PREFIX) - 1) == 0) {
		return true;
	}

	return false;
}