From 571095097eb025a6f1a4fbc24737084a1e367a9f Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 19 May 2004 16:44:31 +0000 Subject: Fixes to auto /dev/null creation --- srcx/jps.c | 2 +- srcx/util.c | 6 +++--- srcx/util.h | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'srcx') diff --git a/srcx/jps.c b/srcx/jps.c index 6f8e4db..8b12b4a 100644 --- a/srcx/jps.c +++ b/srcx/jps.c @@ -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 +#include 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 */ -- cgit v1.2.3