From: Leonardo Mörlein Date: Fri, 8 May 2020 00:58:25 +0000 (+0200) Subject: jail: unnamed jails can not have netns (fix segfault) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7e150f68e666e331e6b970e2ceae1a6a88743bfd;p=oweals%2Fprocd.git jail: unnamed jails can not have netns (fix segfault) Signed-off-by: Leonardo Mörlein --- diff --git a/jail/jail.c b/jail/jail.c index 67d4cad..a52c264 100644 --- 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); }