projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42a6217
)
jail: actually chdir into OCI defined CWD
author
Daniel Golle
<daniel@makrotopia.org>
Mon, 13 Jul 2020 11:11:32 +0000
(12:11 +0100)
committer
Daniel Golle
<daniel@makrotopia.org>
Mon, 13 Jul 2020 11:14:49 +0000
(12:14 +0100)
Current working directory was parsed by never applied. Apply it just
before executing user process.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/jail.c
patch
|
blob
|
history
diff --git
a/jail/jail.c
b/jail/jail.c
index 5018fcc09fce13e6c22c3d161b3be0ef4e545def..1650534b1887ae16c85d6b0b6ce67801b50a480a 100644
(file)
--- 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);