summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle2020-11-26 16:34:38 +0000
committerDaniel Golle2020-11-27 01:06:09 +0000
commit31e0a46ded22a517c03cb899f890207f0db75fb8 (patch)
tree1dcb8cbcb75deb6d348b7e348bffcd71471cb9d3
parentb275b11d89beff3664d0c30b07e8d83b6098be71 (diff)
downloadprocd-31e0a46ded22a517c03cb899f890207f0db75fb8.tar.gz
jail: properly initialize timens_fd
So we are safe for the future. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--jail/jail.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/jail/jail.c b/jail/jail.c
index 7ec6cd8..82ba4a5 100644
--- a/jail/jail.c
+++ b/jail/jail.c
@@ -2775,6 +2775,8 @@ static void post_main(struct uloop_timeout *t)
if (opts.setns.time != -1) {
timens_fd = ns_open_pid("time", getpid());
setns_open(CLONE_NEWTIME);
+ } else {
+ timens_fd = -1;
}
#endif