diff options
-rw-r--r-- | srcx/jps.c | 2 | ||||
-rw-r--r-- | srcx/util.c | 6 | ||||
-rw-r--r-- | srcx/util.h | 5 |
3 files changed, 7 insertions, 6 deletions
@@ -128,7 +128,7 @@ static void run_jail_ps(int argc, char* argv[]) { char errbuf[_POSIX2_LINE_MAX]; char** args; - kvm_t kd; + kvm_t* kd; int i; if(!check_jail_command(NULL, "/bin/ps")) diff --git a/srcx/util.c b/srcx/util.c index 8d5e145..31ee3bd 100644 --- a/srcx/util.c +++ b/srcx/util.c @@ -142,7 +142,7 @@ done: return jid; } -kvm_t open_kvm_handle(char* jail, char* errbuf) +kvm_t* open_kvm_handle(const char* jail, char* errbuf) { /* * Basically the kvm routines won't work in a jail unless there's @@ -184,11 +184,11 @@ kvm_t open_kvm_handle(char* jail, char* errbuf) { warn("%s%scouldn't create %s directory", jail ? jail : "", jail ? ": " : "", _PATH_DEV); - nofile = 0; + nonull = 0; } } - if(nofile) + if(nonull) { mode_t mode = 0666 | S_IFCHR; dev_t dev = makedev(2, 2); diff --git a/srcx/util.h b/srcx/util.h index d39c1de..fed9261 100644 --- a/srcx/util.h +++ b/srcx/util.h @@ -39,12 +39,13 @@ #ifndef __UTIL_H__ #define __UTIL_H__ -struct xprison; +#include <sys/jail.h> +#include <kvm.h> int translate_jail_name(const char* str); int running_in_jail(); -kvm_t open_kvm_handle(char* jail, char* errbuf); +kvm_t* open_kvm_handle(const char* jail, char* errbuf); size_t get_jail_sysctl(struct xprison** ret); #define JAIL_RUN_CONSOLE 0x00000001 /* Output stuff to the jail console if available */ |