Date: Wed, 9 Apr 2003 21:00:48 -0400 From: Mike Barcroft <mike@FreeBSD.org> To: Pawel Jakub Dawidek <nick@garage.freebsd.pl> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/killall killall.1 killall.c src/usr.sbin Makefile src/usr.sbin/jail jail.8 jail.c src/usr.sbin/jexec Makefile jexec.8 jexec.c src/usr.sbin/jls Makefile jls.8 jls.c Message-ID: <20030409210048.G16782@espresso.bsdmike.org> In-Reply-To: <20030409142231.GX1280@garage.freebsd.pl>; from nick@garage.freebsd.pl on Wed, Apr 09, 2003 at 04:22:31PM %2B0200 References: <200304090304.h3934Csu028105@repoman.freebsd.org> <20030408225808.A16782@espresso.bsdmike.org> <20030409142231.GX1280@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
Pawel Jakub Dawidek <nick@garage.freebsd.pl> writes: > On Tue, Apr 08, 2003 at 10:58:08PM -0400, Mike Barcroft wrote: > +> Here's what it looks like in use: > +> > +> %%% > +> sol# jail /tmp/jail localhost 127.0.0.1 /bin/sh & > +> [1] 19114 > +> sol# jail /tmp/jail localhost 127.0.0.1 /bin/csh & > +> [2] 19139 > +> [1] + Suspended (tty input) jail /tmp/jail localhost 127.0.0.1 /bin/sh > +> sol# jls > +> JID IP Address Hostname Path > +> 2 127.0.0.1 localhost /tmp/jail > +> 1 127.0.0.1 localhost /tmp/jail > > Nice work!! Global list with all prisons was really needed. > > But IMHO JID should be a string, not a number. For example we're running > many jails at startup or somewhere else and because JID is set > dynamicly there could be problems in writing scripts for handle jails > (attaching processes to it or something). > As we can see on your example, we aren't able to find out which > jail was ran first (looking at PIDs isn't good idea:)). > If JID will be a string there will be no such problems. > > What you think? Can't you just use jail -i and save the JID number for later use? BTW, I think I need an fflush() after the printf() call in jail(8), otherwise when block buffering is used to save the output to a file instead of the terminal, nothing is written. Best regards, Mike Barcroft
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030409210048.G16782>