open-nomad/drivers
Tim Gross eabbcebdd4
exec: allow running commands from host volume (#14851)
The exec driver and other drivers derived from the shared executor check the
path of the command before handing off to libcontainer to ensure that the
command doesn't escape the sandbox. But we don't check any host volume mounts,
which should be safe to use as a source for executables if we're letting the
user mount them to the container in the first place.

Check the mount config to verify the executable lives in the mount's host path,
but then return an absolute path within the mount's task path so that we can hand
that off to libcontainer to run.

Includes a good bit of refactoring here because the anchoring of the final task
path has different code paths for inside the task dir vs inside a mount. But
I've fleshed out the test coverage of this a good bit to ensure we haven't
created any regressions in the process.
2022-11-11 09:51:15 -05:00
..
docker Data race fixes in tests and a new semgrep rule (#14594) 2022-09-15 10:35:08 -07:00
exec chore: remove use of "err" a log line context key for errors. (#14433) 2022-09-01 15:06:10 +02:00
java chore: remove use of "err" a log line context key for errors. (#14433) 2022-09-01 15:06:10 +02:00
mock Merge branch 'main' into tlefebvre/fix-wrong-drivernetworkmanager-interface 2022-03-17 09:38:13 +01:00
qemu chore: remove use of "err" a log line context key for errors. (#14433) 2022-09-01 15:06:10 +02:00
rawexec chore: remove use of "err" a log line context key for errors. (#14433) 2022-09-01 15:06:10 +02:00
shared exec: allow running commands from host volume (#14851) 2022-11-11 09:51:15 -05:00