File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ use std::{
2626use tar:: HeaderMode ;
2727use vsock:: { VsockAddr , VsockListener , VMADDR_CID_ANY } ;
2828
29+ const KRUN_NITRO_EIF_PATH_ENV_VAR : & str = "KRUN_NITRO_EIF_PATH" ;
30+ const KRUN_NITRO_EIF_PATH_DEFAULT : & str = "/usr/share/krun-nitro/krun-nitro.eif" ;
31+
2932/// Directories within the configured rootfs that will be ignored when writing to the enclave. The
3033/// enclave is responsible for initializing these directories within the guest operating system.
3134const ROOTFS_DIR_DENYLIST : [ & str ; 6 ] = [
@@ -119,8 +122,8 @@ impl NitroEnclave {
119122 fn start ( & mut self ) -> Result < ( u32 , PollTimeout ) , StartError > {
120123 // Read the cached EIF file required to run the enclave.
121124 let eif = {
122- let path = env:: var ( "KRUN_NITRO_EIF_PATH" )
123- . unwrap_or ( "/usr/share/krun-nitro/krun-nitro.eif" . to_string ( ) ) ;
125+ let path = env:: var ( KRUN_NITRO_EIF_PATH_ENV_VAR )
126+ . unwrap_or ( KRUN_NITRO_EIF_PATH_DEFAULT . to_string ( ) ) ;
124127
125128 fs:: read ( path) . map_err ( StartError :: EifRead )
126129 } ?;
You can’t perform that action at this time.
0 commit comments