From owner-svn-src-all@FreeBSD.ORG Sun Jan 15 10:44:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 625F0106566B; Sun, 15 Jan 2012 10:44:37 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-qw0-f47.google.com (mail-qw0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id 918DC8FC0A; Sun, 15 Jan 2012 10:44:36 +0000 (UTC) Received: by qap15 with SMTP id 15so1843555qap.13 for ; Sun, 15 Jan 2012 02:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=BHltgAv2wuXVYdQWO0h4ySG6MMjJda1MxX8zdagYTOE=; b=UVc9H+ICxXzAANnxw2Tvecf/0LE/O1u5ZVcqNLkC+aawOl+TyahY38UPmSIsEDPZtD cMAiy9oDY8Y6B/iohdIFk/SOH7QMJW/pIA7mGScOuGZN5j05z2XghYQNO5lgM3SjtSSn InDRWX1MxW+3yiR5MnLvgBhym7QDRYBwU0gjg= MIME-Version: 1.0 Received: by 10.224.183.81 with SMTP id cf17mr9526450qab.48.1326624275629; Sun, 15 Jan 2012 02:44:35 -0800 (PST) Received: by 10.229.162.15 with HTTP; Sun, 15 Jan 2012 02:44:35 -0800 (PST) In-Reply-To: <20120115021505.GA88927@vniz.net> 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> <20120115021505.GA88927@vniz.net> Date: Sun, 15 Jan 2012 02:44:35 -0800 Message-ID: From: Xin LI 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 Content-Type: text/plain; charset=UTF-8 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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jan 2012 10:44:37 -0000 On Sat, Jan 14, 2012 at 6:15 PM, 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. > > It seems it is internal contradiction in your argumentation: > 1) You state that chroot(2) can create legitimate environment. > 2) For ftpd's you disable .so loading in any case, i.e. even for > legitimate environment too and you want to do so intentionally refusing > passing responsibility to chroot(2) environment creator. > > In that situation the only suggestion of something like public interface > is setting enviroment variable like "LD_SO_DISABLE" which prevents .so > loading in libc. > > This is more clear than your stopgap. > > And please don't say that enviroment variable can be overwritten by the > user inside ftpd itself, it is not so. And for case when some ftpd allows > to call _any_ external program, it could do anything, like with your > stopgap too. Why you need anything if the program needs to run something inside the chroot, which means one already have set up a full chroot environment? Cheers, -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die