static int replmd_defer_add_backlink(struct ldb_module *module,
				     struct replmd_private *replmd_private,
				     const struct dsdb_schema *schema,
				     struct replmd_replicated_request *ac,
				     struct ldb_dn *forward_dn,
				     struct GUID *target_guid, bool active,
				     const struct dsdb_attribute *schema_attr,
				     struct ldb_request *parent)
{
	const struct dsdb_attribute *target_attr;
	struct la_backlink *bl;
	
	bl = talloc(ac, struct la_backlink);
	if (bl == NULL) {
		ldb_module_oom(module);
		return LDB_ERR_OPERATIONS_ERROR;
	}

	target_attr = dsdb_attribute_by_linkID(schema, schema_attr->linkID ^ 1);
	if (!target_attr) {
		/*
		 * windows 2003 has a broken schema where the
		 * definition of msDS-IsDomainFor is missing (which is
		 * supposed to be the backlink of the
		 * msDS-HasDomainNCs attribute
		 */
		return LDB_SUCCESS;
	}

	bl->attr_name = target_attr->lDAPDisplayName;
	bl->forward_dn = talloc_steal(bl, forward_dn);
	bl->target_guid = *target_guid;
	bl->active = active;

	DLIST_ADD(ac->la_backlinks, bl);

	return LDB_SUCCESS;
}
static int replmd_defer_add_backlink(struct ldb_module *module,
				     struct replmd_private *replmd_private,
				     const struct dsdb_schema *schema,
				     struct replmd_replicated_request *ac,
				     struct ldb_dn *forward_dn,
				     struct GUID *target_guid, bool active,
				     const struct dsdb_attribute *schema_attr,
				     struct ldb_request *parent)
{
	const struct dsdb_attribute *target_attr;
	struct la_backlink *bl;
	
	bl = talloc(ac, struct la_backlink);
	if (bl == NULL) {
		ldb_module_oom(module);
		return LDB_ERR_OPERATIONS_ERROR;
	}

	target_attr = dsdb_attribute_by_linkID(schema, schema_attr->linkID ^ 1);
	if (!target_attr) {
		 
		return LDB_SUCCESS;
	}

	bl->attr_name = target_attr->lDAPDisplayName;
	bl->forward_dn = talloc_steal(bl, forward_dn);
	bl->target_guid = *target_guid;
	bl->active = active;

	DLIST_ADD(ac->la_backlinks, bl);

	return LDB_SUCCESS;
}