aboutsummaryrefslogtreecommitdiff
path: root/src/jail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jail.c')
-rw-r--r--src/jail.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/jail.c b/src/jail.c
index 3f77dfd..3a93f3b 100644
--- a/src/jail.c
+++ b/src/jail.c
@@ -91,6 +91,12 @@ int jail_validate_ctx(const jail_ctx *ctx)
assert(ctx);
assert(ctx->fwd_ctx.sock.addr_len > 0);
assert(ctx->stack_ptr);
+ assert(ctx->newroot);
+
+ if (access(ctx->newroot, R_OK|X_OK)) {
+ E_STRERR("new root directory access to '%s'", ctx->newroot);
+ return 1;
+ }
return 0;
}