static int replmd_add_backlink(struct ldb_module *module,
			       struct replmd_private *replmd_private,
			       const struct dsdb_schema *schema,
			       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;
	int ret;
	
	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 = forward_dn;
	bl.target_guid = *target_guid;
	bl.active = active;

	ret = replmd_process_backlink(module, &bl, parent);
	return ret;
}
static int replmd_add_backlink(struct ldb_module *module,
			       struct replmd_private *replmd_private,
			       const struct dsdb_schema *schema,
			       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;
	int ret;
	
	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 = forward_dn;
	bl.target_guid = *target_guid;
	bl.active = active;

	ret = replmd_process_backlink(module, &bl, parent);
	return ret;
}