From 4bef00e8f39ef127ff8922d0931e7ffd95950d20 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 18 May 2004 16:23:45 +0000 Subject: Tested on FreeBSD 5.2.1. Fixed bugs. --- srcx/util.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'srcx/util.h') diff --git a/srcx/util.h b/srcx/util.h index 1ac02c5..0054f15 100644 --- a/srcx/util.h +++ b/srcx/util.h @@ -1,19 +1,21 @@ #ifndef __UTIL_H__ #define __UTIL_H__ +struct xprison; + int translate_jail_name(const char* str); +size_t get_jail_sysctl(struct xprison** ret); int running_in_jail(); -/* Output stuff to the jail console if available */ -#define JAIL_OUT_CONSOLE 1 << 1 +#define JAIL_RUN_CONSOLE 0x00000001 /* Output stuff to the jail console if available */ +#define JAIL_RUN_STDOUT 0x00000002 /* Output to stdout */ +#define JAIL_RUN_STDERR 0x00000004 /* Output to stderr */ +#define JAIL_RUN_OUTPUT 0x0000000F /* All the output types */ -/* Output to stdout */ -#define JAIL_OUT_STDOUT 1 << 2 +#define JAIL_RUN_NOFORK 0x00000010 /* Don't fork, overlay current process */ -/* Output to stderr */ -#define JAIL_OUT_STDERR 1 << 3 +int run_jail_command(const char* jail, const char* cmd, char* args[], int opts); +int check_jail_command(const char* jail, const char* cmd); -int run_jail_command(const char* jail, const char* script, int opts); -int check_jail_command(const char* jail, const char* script); +#endif /* __UTIL_H__ */ -#endif __UTIL_H__ -- cgit v1.2.3