#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(); #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 */ #define JAIL_RUN_NOFORK 0x00000010 /* Don't fork, overlay current process */ int run_jail_command(const char* jail, const char* cmd, char* args[], int opts); int check_jail_command(const char* jail, const char* cmd); #endif /* __UTIL_H__ */