From e586d28ce9d3a188b82dbca493d71d2a3d5da7f9 Mon Sep 17 00:00:00 2001 From: Danny Wood Date: Tue, 26 Nov 2019 14:03:03 +0000 Subject: [PATCH] mobicore: allow loading trustlets from the vendor folder Change-Id: I471a76d03636859d78b7fb9582c7fb7c9769ca7a --- mobicore/daemon/Registry/PrivateRegistry.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mobicore/daemon/Registry/PrivateRegistry.cpp b/mobicore/daemon/Registry/PrivateRegistry.cpp index 694ed15..ed28389 100644 --- a/mobicore/daemon/Registry/PrivateRegistry.cpp +++ b/mobicore/daemon/Registry/PrivateRegistry.cpp @@ -72,6 +72,7 @@ #define MC_REGISTRY_CONTAINER_PATH "/data/app/mcRegistry" #define MC_REGISTRY_DEFAULT_PATH "/system/app/mcRegistry" +#define MC_REGISTRY_VENDOR_PATH "/vendor/app/mcRegistry" #define MC_REGISTRY_FALLBACK_PATH "/data/app/mcRegistry" #define AUTH_TOKEN_FILE_NAME "00000000.authtokcont" #define ENV_MC_AUTH_TOKEN_PATH "MC_AUTH_TOKEN_PATH" @@ -138,8 +139,12 @@ string getTlRegistryPath() if (doesDirExist(MC_REGISTRY_DEFAULT_PATH)) { registryPath = MC_REGISTRY_DEFAULT_PATH; LOG_I(" Using MC_REGISTRY_PATH %s", registryPath.c_str()); + } else if (doesDirExist(MC_REGISTRY_VENDOR_PATH)) { + // Second, attempt to use regular registry environment variable. + registryPath = MC_REGISTRY_VENDOR_PATH; + LOG_I(" Using MC_REGISTRY_VENDOR_PATH %s", registryPath.c_str()); } else if (doesDirExist(MC_REGISTRY_FALLBACK_PATH)) { - // Second, attempt to use fallback registry environment variable. + // Third, attempt to use fallback registry environment variable. registryPath = MC_REGISTRY_FALLBACK_PATH; LOG_I(" Using MC_REGISTRY_FALLBACK_PATH %s", registryPath.c_str()); } -- 2.20.1