diff options
author | Stef Walter <stef@thewalter.net> | 2014-12-19 12:55:49 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2014-12-19 12:57:44 +0000 |
commit | dab652d0c66b35c171816ffff80c03d0537f7caa (patch) | |
tree | a15a55ba6d4a8982fa447f1dd0df81e2ff907a58 /srcx | |
parent | 291114c12df4c31ddb6567cd243c811ca8978b93 (diff) |
Diffstat (limited to 'srcx')
-rw-r--r-- | srcx/injail.c | 1 | ||||
-rw-r--r-- | srcx/jails.c | 1 | ||||
-rw-r--r-- | srcx/jid.c | 1 | ||||
-rw-r--r-- | srcx/jps.c | 1 | ||||
-rw-r--r-- | srcx/util.c | 4 | ||||
-rw-r--r-- | srcx/util.h | 2 |
6 files changed, 8 insertions, 2 deletions
diff --git a/srcx/injail.c b/srcx/injail.c index b96ee8f..1b92a63 100644 --- a/srcx/injail.c +++ b/srcx/injail.c @@ -39,6 +39,7 @@ #include <stdlib.h> #include <stdio.h> +#include <err.h> #include "util.h" diff --git a/srcx/jails.c b/srcx/jails.c index 40b12a7..8e063b6 100644 --- a/srcx/jails.c +++ b/srcx/jails.c @@ -47,6 +47,7 @@ #include <kvm.h> #include <paths.h> #include <errno.h> +#include <err.h> #include "util.h" @@ -43,6 +43,7 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> +#include <err.h> #include "util.h" @@ -49,6 +49,7 @@ #include <kvm.h> #include <paths.h> #include <limits.h> +#include <err.h> #include "util.h" diff --git a/srcx/util.c b/srcx/util.c index 6aad984..3361ffd 100644 --- a/srcx/util.c +++ b/srcx/util.c @@ -357,7 +357,7 @@ int run_overlay_command(const char* jail, const char* cmd, char* env[], else execle(cmd, cmd, NULL, env); - warn("%s%serror executing: %s: %s", jail ? jail : "", + warn("%s%serror executing: %s", jail ? jail : "", jail ? ": " : "", cmd); return 0; } @@ -516,7 +516,7 @@ int run_dup_command(const char* jail, const char* cmd, char* env[], } /* Or if there's an error or end of file */ - if(ret == -1 && errno != EAGAIN || ret == 0) + if((ret == -1 && errno != EAGAIN) || ret == 0) break; /* If the processes exited then break out */ diff --git a/srcx/util.h b/srcx/util.h index 91f2b49..f2fda07 100644 --- a/srcx/util.h +++ b/srcx/util.h @@ -68,5 +68,7 @@ int check_jail_command(const char* jail, const char* cmd); void ignore_signals(void); void unignore_signals(void); +int kvm_prepare_jail(struct xprison* xp); + #endif /* __UTIL_H__ */ |