aboutsummaryrefslogtreecommitdiff
path: root/src/jail.h
diff options
context:
space:
mode:
authorlns <matzeton@googlemail.com>2018-08-26 16:01:18 +0200
committerlns <matzeton@googlemail.com>2019-02-04 01:52:06 +0100
commitf68988980d72d837f49451068b98bc96d1a548fc (patch)
tree557f91ecac2d94afa737c25b5cb81dc1eaebfc5e /src/jail.h
parente7b96666c03f1536fa89149204b363951523560e (diff)
Introduced the protocol->jail binary packet.feature/jail_packet
We are using a handler/callback functions to obtain additional information from the protocol handler and transmit it to the sandbox. Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'src/jail.h')
-rw-r--r--src/jail.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/jail.h b/src/jail.h
index 7c3a07b..5ddbb79 100644
--- a/src/jail.h
+++ b/src/jail.h
@@ -43,6 +43,8 @@
#define MIN_STACKSIZE 2048
#define MAX_STACKSIZE BUFSIZ
+#define EMPTY_JAILCON { -1, -1 }
+
typedef struct jail_ctx {
forward_ctx fwd_ctx;
char host_buf[NI_MAXHOST], service_buf[NI_MAXSERV];
@@ -52,6 +54,11 @@ typedef struct jail_ctx {
char *newroot;
} jail_ctx;
+typedef struct jail_con {
+ int client_fd;
+ int jail_fd;
+} jail_con;
+
void jail_init_ctx(jail_ctx **ctx, size_t stacksize);