From owner-svn-src-head@FreeBSD.ORG Sat Dec 24 10:57:22 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61B861065687; Sat, 24 Dec 2011 10:57:22 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id A24D08FC17; Sat, 24 Dec 2011 10:57:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id pBOAvJFi011342; Sat, 24 Dec 2011 14:57:19 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id pBOAvIHH011340; Sat, 24 Dec 2011 14:57:19 +0400 (MSK) (envelope-from ache) Date: Sat, 24 Dec 2011 14:57:18 +0400 From: Andrey Chernov To: Xin LI , Kostik Belousov , Alexander Kabaev , John Baldwin , Colin Percival , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20111224105717.GA11193@vniz.net> Mail-Followup-To: Andrey Chernov , Xin LI , Kostik Belousov , Alexander Kabaev , John Baldwin , Colin Percival , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111224100509.GA98136@vniz.net> <20111224103948.GA10939@vniz.net> <20111224105045.GA11127@vniz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111224105045.GA11127@vniz.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 10:57:22 -0000 On Sat, Dec 24, 2011 at 02:50:45PM +0400, Andrey Chernov wrote: > On Sat, Dec 24, 2011 at 02:45:21AM -0800, Xin LI wrote: > > On Sat, Dec 24, 2011 at 2:39 AM, Andrey Chernov wrote: > > > On Sat, Dec 24, 2011 at 02:26:20AM -0800, Xin LI wrote: > > >> chroot(2) can create legitimate and secure environment where dlopen(2) > > >> is safe and necessary. > > > > > > Yes, so ischroot() check can be used only into that places where libc's > > > libc_dlopen() currently used, i.e. placed into libc_dlopen() itself. > > > > So it's Okay to break NSS in chroot jail? > > We need general solution. We simple can't count all possible and future > ftpd's arround the world and insert __FreeBSD_libc_enter_restricted_mode() > into them. I even not mention other programs that may use chroot() too. If > some component like auth is critical for chroot, it should be restricted > in general scope. To work in admin-think-safe environment we can add another syscall like safe_chroot(1). When it is marked as safe, ischroot() will return 0. -- http://ache.vniz.net/