summaryrefslogtreecommitdiff
path: root/srcx/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'srcx/util.h')
-rw-r--r--srcx/util.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/srcx/util.h b/srcx/util.h
new file mode 100644
index 0000000..1ac02c5
--- /dev/null
+++ b/srcx/util.h
@@ -0,0 +1,19 @@
+#ifndef __UTIL_H__
+#define __UTIL_H__
+
+int translate_jail_name(const char* str);
+int running_in_jail();
+
+/* Output stuff to the jail console if available */
+#define JAIL_OUT_CONSOLE 1 << 1
+
+/* Output to stdout */
+#define JAIL_OUT_STDOUT 1 << 2
+
+/* Output to stderr */
+#define JAIL_OUT_STDERR 1 << 3
+
+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__