From nobody@FreeBSD.org  Fri Nov 15 10:09:48 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 14D7C80F
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 15 Nov 2013 10:09:48 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 050512D5E
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 15 Nov 2013 10:09:48 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rAFA9lXI065192
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 15 Nov 2013 10:09:47 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rAFA9lE4065188;
	Fri, 15 Nov 2013 10:09:47 GMT
	(envelope-from nobody)
Message-Id: <201311151009.rAFA9lE4065188@oldred.freebsd.org>
Date: Fri, 15 Nov 2013 10:09:47 GMT
From: Oleg Ginzburg <olevole@olevole.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: zfs jail allow delegate fs to jail twice
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183986
>Category:       bin
>Synopsis:       zfs(8): zfs jail allow delegate fs to jail twice
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 15 10:10:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sun Apr 20 21:47:34 UTC 2014
>Originator:     Oleg Ginzburg
>Release:        10.0 BETA3
>Organization:
>Environment:
FreeBSD s13.my.domain 10.0-BETA3 FreeBSD 10.0-BETA3 #5 r257946: Mon Nov 11 09:11:38 UTC 2013     root@s13.my.domain:/usr/jails/src/obj_amd64_10/usr/jails/src/src_10/src/sys/GENERIC.CBSD  amd64
>Description:
zfs jail allow delegate fs to jail twice, (by name and/or jid) although
after the second sets should be warning:

cannot jail 'XXX': dataset already exists


>How-To-Repeat:
% jls -h jid name path
jid name path
1 jail1 /usr/jails/jails/jail1
2 jail2 /usr/jails/jails/jail2

% zfs jail 1 zroot/j1dt
% zfs jail jail2 zroot/j1dt
% zfs jail 1 zroot/j1dt
cannot jail 'zroot/j1dt': dataset already exists

>Fix:


>Release-Note:
>Audit-Trail:

From: Oleg Ginzburg <olevole@olevole.ru>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/183986: zfs jail allow delegate fs to jail twice
Date: Fri, 15 Nov 2013 14:16:04 +0400

 --047d7b2e4d325ff03204eb347c7e
 Content-Type: text/plain; charset=ISO-8859-1
 
 Also zfs unjail have same behavior:
 
 % zfs unjail 1 zroot/j1dt
 % zfs unjail 1 zroot/j1dt
 cannot unjail 'zroot/j1dt': dataset does not exist
 
 % zfs unjail jail2 zroot/j1dt
 % zfs unjail jail2 zroot/j1dt
 cannot unjail 'zroot/j1dt': dataset does not exist
 --047d7b2e4d325ff03204eb347c7e--
>Unformatted:
