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:
2e73848
)
jail: unnamed jails can not have netns (fix segfault)
author
Leonardo Mörlein
<me@irrelefant.net>
Fri, 8 May 2020 00:58:25 +0000
(
02:58
+0200)
committer
Daniel Golle
<daniel@makrotopia.org>
Fri, 15 May 2020 18:10:43 +0000
(19:10 +0100)
Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
jail/jail.c
patch
|
blob
|
history
diff --git
a/jail/jail.c
b/jail/jail.c
index 67d4cadd4f2d887f5a77da04081d9ddbd098423e..a52c264c3fc2f90587541b6db1eb0b9557b56091 100644
(file)
--- a/
jail/jail.c
+++ b/
jail/jail.c
@@
-841,6
+841,10
@@
int main(int argc, char **argv)
}
if (opts.namespace & CLONE_NEWNET) {
+ if (!opts.name) {
+ ERROR("netns needs a named jail\n");
+ return -1;
+ }
netns_fd = netns_open_pid(jail_process.pid);
netns_updown(jail_process.pid, true);
}