Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
fixup! [GSC] Allow in-kernel Intel SGX driver; improve GSC testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dimakuv committed Feb 19, 2021
1 parent 96466a4 commit 5562abd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Tools/gsc/finalize_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@ def is_utf8(filename_bytes):


def generate_trusted_files(root_dir):
cwd = os.getcwd() if os.getcwd() != '/' else ''
excluded_paths_regex = (r'^/('
r'boot/.*'
r'|dev/.*'
r'|etc/rc(\d|.)\.d/.*'
r'|graphene/python/.*'
r'|finalize_manifest\.py'
r'|proc/.*'
r'|sys/.*'
r'|var/.*)'
f'|^{cwd}/('
r'.*\.manifest'
r'|finalize_manifest\.py)$')
r'|var/.*)$')
exclude_re = re.compile(excluded_paths_regex)

num_trusted = 0
Expand Down Expand Up @@ -87,7 +84,7 @@ def main(args=None):
env = jinja2.Environment(loader=jinja2.FileSystemLoader('/'))
env.globals.update({'library_paths': generate_library_paths(), 'env_path': os.getenv('PATH')})

manifest = 'entrypoint.manifest'
manifest = '/entrypoint.manifest'
rendered_manifest = env.get_template(manifest).render()
trusted_files = generate_trusted_files(args.dir)
with open(manifest, 'wb') as manifest_file:
Expand Down

0 comments on commit 5562abd

Please sign in to comment.