From owner-freebsd-jail@FreeBSD.ORG Fri Mar 23 14:59:17 2012 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 806B6106564A for ; Fri, 23 Mar 2012 14:59:17 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from m2.gritton.org (gritton.org [64.34.175.71]) by mx1.freebsd.org (Postfix) with ESMTP id 3D4138FC1C for ; Fri, 23 Mar 2012 14:59:16 +0000 (UTC) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by m2.gritton.org (8.14.4/8.14.4) with ESMTP id q2NEdKZq019008; Fri, 23 Mar 2012 08:39:21 -0600 (MDT) (envelope-from jamie@FreeBSD.org) Message-ID: <4F6C8B13.1000508@FreeBSD.org> Date: Fri, 23 Mar 2012 08:39:15 -0600 From: Jamie Gritton User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120126 Thunderbird/9.0 MIME-Version: 1.0 To: Nikos Vassiliadis References: <4F6B5EE6.8080006@gmx.com> In-Reply-To: <4F6B5EE6.8080006@gmx.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD-Jail Subject: Re: jail name is interpreted as jid when numeric X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2012 14:59:17 -0000 It might seem clear with the dot-separated names that asd.asd.1 isn't the same as jail 1. But looking from the viewpoint of asd.asd, that jail would simply be "1". As jails may be referred to by either number or name, it made sense to exclude jails whose name was a number, except in the special case of it being the same as the jid. Otherwise there's the confusion of a jail having two different numbers (one really being a name), or of a number referring to two different jails. So while this does seem to break the dot-separate namespace concept, it's necessary because jails aren't always referred to by the full hierarchical name. - Jamie On 03/22/12 11:18, Nikos Vassiliadis wrote: > I found this somehow strange behavior and I am reporting it > just to hear your opinions. > >> lab# jail -c name=asd persist >> lab# jail -c name=asd.asd persist > > asd is interpreted as jail asd.asd > >> lab# jail -c name=asd.asd.1 persist >> jail: jail 1 already exists > > 1 is interpreted as jail 1 > > This has to do with the fact that a numeric name is interpreted as jid > and this breaks the dot-seperated hierarchical jails concept. > I find this behavior somehow strange. Is it intended or it's bug? > > Thanks for your insights, Nikos