Refactor code into a component class.

BUG=chromium:630421
TEST=emerge-${BOARD} imageloader

Change-Id: I66c8a39da6067776abd0dbb05ae4311895782a7c
Reviewed-on: https://chromium-review.googlesource.com/413146
Commit-Ready: Greg Kerr <kerrnel@chromium.org>
Tested-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
22 files changed
tree: ea67cc8f1449570119aa7b60095cd25bda6bbf0a
  1. public_keys/
  2. testdata/
  3. .presubmitignore
  4. component.cc
  5. component.h
  6. component_unittest.cc
  7. imageloadclient-glue.xml
  8. imageloadclient.cc
  9. imageloadclient.h
  10. imageloader-glue.xml
  11. imageloader-seccomp-amd64.policy
  12. imageloader-seccomp-arm.policy
  13. imageloader-seccomp-x86.policy
  14. imageloader.conf
  15. imageloader.gyp
  16. imageloader.h
  17. imageloader_common.cc
  18. imageloader_common.h
  19. imageloader_impl.cc
  20. imageloader_impl.h
  21. imageloader_main.cc
  22. imageloader_unittest.cc
  23. imageloader_wrapper
  24. mock_verity_mounter.h
  25. org.chromium.ImageLoader.conf
  26. org.chromium.ImageLoader.service
  27. README.md
  28. run_tests.cc
  29. test_utilities.cc
  30. test_utilities.h
  31. verity_mounter.cc
  32. verity_mounter.h
README.md

src/platform/imageloader

This aims to provide a generic utility to load (mount) and unload (unmount) verified disk images through DBus IPC.

Binaries

  • imageloader
  • imageloadclient

imageloader can be run as root and can handle mounting and unmounting of disk images. imageloadclient is a simple client (intended to be run as chronos) that can talk to imageloader and ask it to mount and unmount stuff. When imageloader is not running, DBus can invoke it via the one time run option (imageloader -o) and get the task done.