Date: Fri, 24 Oct 2003 15:00:37 -0700 (PDT) From: "C. Stephen Gunn" <csg@maelstrom.waterspout.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/58497: sysctl knob to return current process' jid Message-ID: <200310242200.h9OM0b3s056198@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/58497; it has been noted by GNATS. From: "C. Stephen Gunn" <csg@maelstrom.waterspout.com> To: "Poul-Henning Kamp" <phk@phk.freebsd.dk> Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: kern/58497: sysctl knob to return current process' jid Date: Fri, 24 Oct 2003 16:50:35 -0500 On Fri, 24 Oct 2003 22:57:39 +0200, "Poul-Henning Kamp" wrote: > >There is no easy way to tell if a process is operating in a Jail > >environment. > > Yes, in fact there is: Good point, my problem statemen was unnecessairly broad. As we discussed on IRC, perhaps letting jail'd processes learn their jid servese no useful purpose, which might weaken security. For posterity, one way to detect if we're operating in a jail from the command line would be something like: INJAIL=`ps -p $$ | awk '$3 ~ /.*J/ { print "yes" };'` Unless someone sees other value in a sysctl to get the JID, someone can go ahead and resolve this request. Thanks. - Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310242200.h9OM0b3s056198>