summaryrefslogtreecommitdiff
path: root/srcx/util.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2007-06-26 23:56:21 +0000
committerStef Walter <stef@memberwebs.com>2007-06-26 23:56:21 +0000
commit35b75975ece6f7e40447efdecbb6163d79e0323d (patch)
treebef8caf6f1d13740c796dc317b77d392abaeccf9 /srcx/util.c
parent92829f531e52776eb91800597eda2907e8d66bf0 (diff)
Make restarting the jail from within actually work.
Diffstat (limited to 'srcx/util.c')
-rw-r--r--srcx/util.c4
1 files changed, 2 insertions, 2 deletions
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 */