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..e34b63ef200b972ef68189f1f2034d38f69850b5 100644 |
--- a/src/trusted/service_runtime/sel_main_chrome.c |
+++ b/src/trusted/service_runtime/sel_main_chrome.c |
@@ -31,6 +31,7 @@ |
#include "native_client/src/trusted/service_runtime/sel_ldr.h" |
#include "native_client/src/trusted/service_runtime/sel_qualify.h" |
#include "native_client/src/trusted/service_runtime/win/exception_patch/ntdll_patch.h" |
+#include "native_client/src/trusted/validator/validation_cache.h" |
static int const kSrpcFd = 5; |
@@ -38,6 +39,7 @@ int verbosity = 0; |
static int g_irt_file_desc = -1; |
+static NaClValidationCache *g_validation_cache = NULL; |
void NaClSetIrtFileDesc(int fd) { |
CHECK(g_irt_file_desc == -1); |
@@ -77,6 +79,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(NaClValidationCache *cache) { |
+ g_validation_cache = cache; |
+} |
+ |
void NaClMainForChromium(int handle_count, const NaClHandle *handles, |
int debug) { |
char *av[1]; |
@@ -112,6 +119,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); |
/* |