From owner-freebsd-questions@FreeBSD.ORG Sat Jul 3 07:21:05 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ABC5106566C for ; Sat, 3 Jul 2010 07:21:05 +0000 (UTC) (envelope-from freebsd@optimis.net) Received: from mail.optimis.net (mail.optimis.net [69.104.191.124]) by mx1.freebsd.org (Postfix) with ESMTP id 5875B8FC0C for ; Sat, 3 Jul 2010 07:21:05 +0000 (UTC) Received: from marvin.optimis.net (marvin.optimis.net [192.168.1.3]) by mail.optimis.net (8.14.3/8.14.3) with ESMTP id o637L4aR018789 for ; Sat, 3 Jul 2010 00:21:04 -0700 (PDT) (envelope-from freebsd@optimis.net) Received: from marvin.optimis.net (localhost [127.0.0.1]) by marvin.optimis.net (8.14.3/8.14.3) with ESMTP id o637L41n089922; Sat, 3 Jul 2010 00:21:04 -0700 (PDT) (envelope-from freebsd@optimis.net) Received: (from george@localhost) by marvin.optimis.net (8.14.3/8.14.3/Submit) id o637L4q0089921; Sat, 3 Jul 2010 00:21:04 -0700 (PDT) (envelope-from freebsd@optimis.net) Date: Sat, 3 Jul 2010 00:21:04 -0700 From: George Davidovich To: freebsd-questions@freebsd.org Message-ID: <20100703072104.GA89373@marvin.optimis.net> References: <4C2ED4F9.2010408@comclark.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C2ED4F9.2010408@comclark.com> User-Agent: Mutt/1.5.19 (2009-01-05) Subject: Re: jail and uname X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 07:21:05 -0000 On Sat, Jul 03, 2010 at 02:13:13PM +0800, Aiza wrote: > From the console of a jail I issue uname -r and get 8.0-RELEASE-p3, > which is the release level of the host. I know the jail is running a > pristine minimum install of 8.0-RELEASE. > > I would think issuing uname from within a jail environment should > respond with the info of the jail environment. Is this not a security > violation? I'm guessing your understanding of jails is a bit off. A FreeBSD jail isn't a "fully virtualised" system. As implemented, jails share the host system's kernel. The Handbook makes clear that a jail is essentially defined by a directory subtree, a hostname, an IP address, and a command. Well, that, and things like user accounts. So when you run uname, what's reported is kernel information as stored in various sysctl(8) MIBs (kern.ostype, kern.osrelease, kern.osrevision, kern.version, etc.). And because there's only one kernel, you'll get the same output from running uname on the host as you would get from running it inside a jail. -- George