diff options
| author | Daniel Golle | 2020-07-13 11:11:32 +0000 |
|---|---|---|
| committer | Daniel Golle | 2020-07-13 11:14:49 +0000 |
| commit | 83f4b72ab196d418b9b1edd0655a9a96acfa753b (patch) | |
| tree | 720eef0b1dd37f08647f3b4f57eee6e10b52afc6 | |
| parent | 42a6217d42f9305f5b25a93188fed480ae4abc3d (diff) | |
| download | procd-83f4b72ab196d418b9b1edd0655a9a96acfa753b.tar.gz | |
jail: actually chdir into OCI defined CWD
Current working directory was parsed by never applied. Apply it just
before executing user process.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
| -rw-r--r-- | jail/jail.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/jail/jail.c b/jail/jail.c index 5018fcc..1650534 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -710,6 +710,9 @@ static int exec_jail(void *pipes_ptr) if (!envp) exit(EXIT_FAILURE); + if (opts.cwd && chdir(opts.cwd)) + exit(EXIT_FAILURE); + if (opts.ociseccomp && applyOCIlinuxseccomp(opts.ociseccomp)) exit(EXIT_FAILURE); |