Add build and package support to minijail
Packaging:
- Adds packaging for minijail
- Adds support for building minijail in the chroot (libcap-dev)
- Fixes libcap2 versioning to be compatible with libcap-dev in the repo
- Build minijail as part of the platform packages
Code:
- Fixed an initialization check bug in minijail and unittests
Review URL: http://codereview.chromium.org/465106
diff --git a/interface.cc b/interface.cc
index 4cabff0..7686330 100644
--- a/interface.cc
+++ b/interface.cc
@@ -13,7 +13,14 @@
namespace minijail {
bool Interface::Run() const {
- LOG_IF(FATAL, !options()->executable_path()) << "No executable path given.";
+ if (!options() || !options()->env()) {
+ LOG(ERROR) << "Initialize() not called or called with bad Env";
+ return false;
+ }
+ if (!options()->executable_path()) {
+ LOG(ERROR) << "No executable path given.";
+ return false;
+ }
return options()->env()->Run(options()->executable_path(),
options()->arguments(),
options()->environment());