summaryrefslogtreecommitdiff
path: root/srcx/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'srcx/util.h')
-rw-r--r--srcx/util.h20
1 files changed, 11 insertions, 9 deletions
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__