#include #include #include #include "jail.h" int jail_init(jail_ctx **ctx, size_t stacksize) { assert(ctx); if (stacksize > BUFSIZ) stacksize = BUFSIZ; if (!*ctx) *ctx = calloc(1, sizeof(**ctx)); assert(*ctx); (*ctx)->stacksize = stacksize; (*ctx)->stack_ptr = (unsigned char *) calloc(1, (*ctx)->stacksize) + (*ctx)->stacksize; return 0; } void jail_free(jail_ctx **ctx) { } int jail_fork(jail_ctx *ctx) { return 0; }