int dsdb_dc_functional_level(struct ldb_context *ldb)
{
	int *dcFunctionality =
		talloc_get_type(ldb_get_opaque(ldb, "domainFunctionality"), int);
	if (!dcFunctionality) {
		/* this is expected during initial provision */
		DEBUG(4,(__location__ ": WARNING: domainControllerFunctionality not setup\n"));
		return DS_DOMAIN_FUNCTION_2008_R2;
	}
	return *dcFunctionality;
}
int dsdb_dc_functional_level(struct ldb_context *ldb)
{
	int *dcFunctionality =
		talloc_get_type(ldb_get_opaque(ldb, "domainFunctionality"), int);
	if (!dcFunctionality) {
		 
		DEBUG(4,(__location__ ": WARNING: domainControllerFunctionality not setup\n"));
		return DS_DOMAIN_FUNCTION_2008_R2;
	}
	return *dcFunctionality;
}