bool samdb_is_pdc(struct ldb_context *ldb)
{
	int ret;
	bool is_pdc;

	ret = samdb_reference_dn_is_our_ntdsa(ldb, ldb_get_default_basedn(ldb), "fsmoRoleOwner", 
					      &is_pdc);
	if (ret != LDB_SUCCESS) {
		DEBUG(1,("Failed to find if we are the PDC for this ldb: Searching for fSMORoleOwner in %s failed: %s\n", 
			 ldb_dn_get_linearized(ldb_get_default_basedn(ldb)), 
			 ldb_errstring(ldb)));
		return false;
	}

	return is_pdc;
}
bool samdb_is_pdc(struct ldb_context *ldb)
{
	int ret;
	bool is_pdc;

	ret = samdb_reference_dn_is_our_ntdsa(ldb, ldb_get_default_basedn(ldb), "fsmoRoleOwner", 
					      &is_pdc);
	if (ret != LDB_SUCCESS) {
		DEBUG(1,("Failed to find if we are the PDC for this ldb: Searching for fSMORoleOwner in %s failed: %s\n", 
			 ldb_dn_get_linearized(ldb_get_default_basedn(ldb)), 
			 ldb_errstring(ldb)));
		return false;
	}

	return is_pdc;
}