From 35b75975ece6f7e40447efdecbb6163d79e0323d Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 26 Jun 2007 23:56:21 +0000 Subject: Make restarting the jail from within actually work. --- srcx/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'srcx/util.c') diff --git a/srcx/util.c b/srcx/util.c index 59226fd..214707e 100644 --- a/srcx/util.c +++ b/srcx/util.c @@ -403,9 +403,9 @@ int run_dup_command(const char* jail, const char* cmd, char* env[], /* Okay, now run whatever command it was */ if(args) - execve(cmd, args, env); + execve(cmd, args, env ? env : environ); else - execle(cmd, cmd, NULL, env); + execle(cmd, cmd, NULL, env ? env : environ); /* In case it returns then have to do this to get children to disconnect from stdout */ -- cgit v1.2.3