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. .presubmitignore
  2. README.md
  3. component.cc
  4. component.h
  5. component_unittest.cc
  6. imageloadclient-glue.xml
  7. imageloadclient.cc
  8. imageloadclient.h
  9. imageloader-glue.xml
  10. imageloader-seccomp-amd64.policy
  11. imageloader-seccomp-arm.policy
  12. imageloader-seccomp-x86.policy
  13. imageloader.conf
  14. imageloader.gyp
  15. imageloader.h
  16. imageloader_common.cc
  17. imageloader_common.h
  18. imageloader_impl.cc
  19. imageloader_impl.h
  20. imageloader_main.cc
  21. imageloader_unittest.cc
  22. imageloader_wrapper
  23. mock_verity_mounter.h
  24. org.chromium.ImageLoader.conf
  25. org.chromium.ImageLoader.service
  26. public_keys/
  27. run_tests.cc
  28. test_utilities.cc
  29. test_utilities.h
  30. testdata/
  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.