Index: src/trusted/service_runtime/sel_main_chrome.c |
diff --git a/src/trusted/service_runtime/sel_main_chrome.c b/src/trusted/service_runtime/sel_main_chrome.c |
index 3047b2b70e3733c73c11c1883141a69955a4ee4b..f57ce99822186013d8aa79f096e6feba9332a4cf 100644 |
--- a/src/trusted/service_runtime/sel_main_chrome.c |
+++ b/src/trusted/service_runtime/sel_main_chrome.c |
@@ -38,6 +38,7 @@ int verbosity = 0; |
static int g_irt_file_desc = -1; |
+static struct NaClValidationCache *g_validation_cache = NULL; |
void NaClSetIrtFileDesc(int fd) { |
CHECK(g_irt_file_desc == -1); |
@@ -77,6 +78,11 @@ static void NaClLoadIrt(struct NaClApp *nap) { |
(*NACL_VTBL(Gio, gio_desc)->Dtor)(gio_desc); |
} |
+/* TODO(ncbray) consolidate Chrome's sel_ldr setup to a single function. */ |
+void NaClSetValidationCache(struct NaClValidationCache *cache) { |
+ g_validation_cache = cache; |
+} |
+ |
void NaClMainForChromium(int handle_count, const NaClHandle *handles, |
int debug) { |
char *av[1]; |
@@ -112,6 +118,9 @@ void NaClMainForChromium(int handle_count, const NaClHandle *handles, |
errcode = LOAD_OK; |
+ /* Inject the validation caching interface, if it exists. */ |
+ nap->validation_cache = g_validation_cache; |
+ |
NaClAppInitialDescriptorHookup(nap); |
/* |