summaryrefslogtreecommitdiff
path: root/usr.sbin/jail/command.c
diff options
context:
space:
mode:
authorJamie Gritton <jamie@FreeBSD.org>2011-06-20 23:04:13 +0000
committerJamie Gritton <jamie@FreeBSD.org>2011-06-20 23:04:13 +0000
commit5fb611c2bf668c4c25268487b6f188bdde2f1fcb (patch)
tree3722fb521d5a390da637c2798c9d3498b8340a42 /usr.sbin/jail/command.c
parente16fb8fba80d16e7f1684c5ff33e391544d43da6 (diff)
downloadsrc-test2-5fb611c2bf668c4c25268487b6f188bdde2f1fcb.tar.gz
src-test2-5fb611c2bf668c4c25268487b6f188bdde2f1fcb.zip
Notes
Diffstat (limited to 'usr.sbin/jail/command.c')
-rw-r--r--usr.sbin/jail/command.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c
index b8f7d7272e93..eaaab155bc59 100644
--- a/usr.sbin/jail/command.c
+++ b/usr.sbin/jail/command.c
@@ -247,12 +247,15 @@ run_command(struct cfjail *j)
const struct cfstring *comstring, *s;
login_cap_t *lcap;
char **argv;
- char *cs, *addr, *comcs, *devpath;
+ char *cs, *comcs, *devpath;
const char *jidstr, *conslog, *path, *ruleset, *term, *username;
enum intparam comparam;
size_t comlen;
pid_t pid;
int argc, bg, clean, consfd, down, fib, i, injail, sjuser, timeout;
+#if defined(INET) || defined(INET6)
+ char *addr;
+#endif
static char *cleanenv;
@@ -295,6 +298,7 @@ run_command(struct cfjail *j)
comstring = j->comstring;
bg = 0;
switch (comparam) {
+#ifdef INET
case IP__IP4_IFADDR:
argv = alloca(8 * sizeof(char *));
*(const char **)&argv[0] = _PATH_IFCONFIG;
@@ -326,6 +330,7 @@ run_command(struct cfjail *j)
*(const char **)&argv[argc] = down ? "-alias" : "alias";
argv[argc + 1] = NULL;
break;
+#endif
#ifdef INET6
case IP__IP6_IFADDR: