From owner-freebsd-current@FreeBSD.ORG Wed Jun 21 05:54:46 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AE1116A47F for ; Wed, 21 Jun 2006 05:54:46 +0000 (UTC) (envelope-from mikej@rogers.com) Received: from smtp106.rog.mail.re2.yahoo.com (smtp106.rog.mail.re2.yahoo.com [68.142.225.204]) by mx1.FreeBSD.org (Postfix) with SMTP id CB7C743D7B for ; Wed, 21 Jun 2006 05:54:32 +0000 (GMT) (envelope-from mikej@rogers.com) Received: (qmail 43110 invoked from network); 21 Jun 2006 05:54:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=1/ZtTlkJfihqMam2EGvCWMwMFMYrpKPwt2Wfj0oDUqS/BaYcRijDeXW27BG74EbpR/5E9KOfdcZ3+ZnLNSc2h9+J4UmbWXx8/mGcrfw71zsI25NXRX0XlnLyOIXchI9kg0aWMr92qc7hxhmMctdNkaGp41i0pj2CnShDLkBUxuo= ; Received: from unknown (HELO ?70.31.50.218?) (mikej@rogers.com@70.31.50.218 with plain) by smtp106.rog.mail.re2.yahoo.com with SMTP; 21 Jun 2006 05:54:32 -0000 Message-ID: <4498DF20.8020803@rogers.com> Date: Wed, 21 Jun 2006 01:54:40 -0400 From: Mike Jakubik User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Brooks Davis References: <4498D108.90907@rogers.com> <20060621053007.GA3320@odin.ac.hmc.edu> In-Reply-To: <20060621053007.GA3320@odin.ac.hmc.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Justin Hibbits , freebsd-current@freebsd.org Subject: Re: ~/.hosts patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 05:54:46 -0000 Brooks Davis wrote: > On Wed, Jun 21, 2006 at 12:54:32AM -0400, Mike Jakubik wrote: > >> Justin Hibbits wrote: >> >>> Hey folks, got an interesting patch. This adds a ~/.hosts file >>> (personal version of /etc/hosts). It was written against 6-STABLE >>> about a week before 6.1 was released, and has been sitting collecting >>> dust for the last month and a half. Currently it augments /etc/hosts >>> instead of replacing it or prepending it. Any comments? One >>> suggestion that was made was to make it an nss module so that it could >>> be controlled by the admin. It probably could use some cleanup as >>> well, just putting it out here for proof of concept for now, and some >>> direction. >>> >> Just what exactly is the point of having a user specified hosts file? >> Seems like a bad idea to me, in terms of security. >> > > It's useful for cases where you want to add shortcuts to hosts as a user > or do interesting ssh port forwarding tricks in some weird cases where > you must connect to localhost:port as remotehost:port due to > client/server protocol bugs. > > This patch appears to only support ~/.hosts for non-suid binaries which > is the only real security issue. Any admin relying on host to IP > mapping for security for ordinary users is an idiot so that case isn't > worth worrying about. Doing this as a separate nss module probably > makes sense, but I personally like the feature. > Of course relying on /etc/hosts entries for security alone is indeed not a good idea, however an Admin may choose to resolve and therefore route specified hostnames via /etc/hosts. The user should not be able to overwrite these, if this behavior is true, then it seems like a reasonable change to me, otherwise it not only seems to be a security problem, but also a breach of POLA.