diff options
author | jamie <jamie@FreeBSD.org> | 2012-05-28 20:44:11 +0000 |
---|---|---|
committer | jamie <jamie@FreeBSD.org> | 2012-05-28 20:44:11 +0000 |
commit | 5ddbe53eac495d89b4eb26531ed3c615434c0146 (patch) | |
tree | 9644e66b9e28b973607e196f0d998bbf8bd6cb54 /usr.sbin/jail/command.c | |
parent | a2b635f68fcf94cb460352c043cab224b7e0123f (diff) | |
download | FreeBSD-src-5ddbe53eac495d89b4eb26531ed3c615434c0146.zip FreeBSD-src-5ddbe53eac495d89b4eb26531ed3c615434c0146.tar.gz |
When writing the jid via the -i flag, do it right when the jail is created,
before any commands run. /etc/rc.d/jail depends on this.
Diffstat (limited to 'usr.sbin/jail/command.c')
-rw-r--r-- | usr.sbin/jail/command.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index b749576..b7d5168 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -246,7 +246,7 @@ next_proc(int nonblock) /* * Run a single command for a jail, possible inside the jail. */ -int +static int run_command(struct cfjail *j) { const struct passwd *pwd; @@ -290,6 +290,8 @@ run_command(struct cfjail *j) } else { if (create_jail(j) < 0) return -1; + if (iflag) + printf("%d\n", j->jid); if (verbose >= 0 && (j->name || verbose > 0)) jail_note(j, "created\n"); dep_done(j, DF_LIGHT); |