From owner-freebsd-jail@FreeBSD.ORG Sun Jul 27 00:08:11 2014 Return-Path: Delivered-To: freebsd-jail@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 CBFD86B9 for ; Sun, 27 Jul 2014 00:08:11 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CCE02F3F for ; Sun, 27 Jul 2014 00:08:11 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id s6R089js091876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 26 Jul 2014 18:08:09 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id s6R089NX091873; Sat, 26 Jul 2014 18:08:09 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sat, 26 Jul 2014 18:08:09 -0600 (MDT) From: Warren Block To: Alexander Leidinger Subject: Re: Additional devfs rulesets In-Reply-To: Message-ID: References: <20140726194437.00000ee4@Leidinger.net> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Sat, 26 Jul 2014 18:08:09 -0600 (MDT) Cc: freebsd-jail@FreeBSD.org X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2014 00:08:11 -0000 On Sat, 26 Jul 2014, Warren Block wrote: > If devfs accepted an optional file parameter, additional rulesets could be > defined with for each jail. There might be security implications with that. Actually, it looks like that can be done. devfs_rulesets_from_file() in /etc/rc.subr has a parser, and evaluates all files defined in $devfs_rulesets. By default, that is just /etc/defaults/devfs.rules and /etc/devfs.rules. ezjail could just append a third file there, maybe /usr/local/etc/ezjail/jailname-devfs.rules. Or even more elegantly, a here-doc from inside the ezjail/jailname file.