From owner-freebsd-arch@FreeBSD.ORG Thu Nov 10 17:42:02 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB7A1106566B for ; Thu, 10 Nov 2011 17:42:02 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 655658FC14 for ; Thu, 10 Nov 2011 17:42:02 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pAAHcVxr022650 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 10 Nov 2011 10:38:32 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20111110171605.GI2164@hoeg.nl> Date: Thu, 10 Nov 2011 10:38:21 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20111110123919.GF2164@hoeg.nl> <20111110171605.GI2164@hoeg.nl> To: Ed Schouten X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Thu, 10 Nov 2011 10:38:32 -0700 (MST) Cc: arch@freebsd.org Subject: Re: The strangeness called `sbin' X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 17:42:02 -0000 On Nov 10, 2011, at 10:16 AM, Ed Schouten wrote: > Hi Peter, >=20 > * Peter Wemm , 20111110 17:56: >> Of course, that pales in comparison to the impact of adding >> /usr/local/bin to the path, but it does show this does have potential >> user visibility. And there's also the issue that most most users add >> every possible directory to their $PATH anyway. >=20 > Exactly. Also, there are shells nowadays that cache all binaries in = PATH > up front, such as zsh. When they start, they loop through all dirents = in > all directories in $PATH and add it to a big cache. This entirely > defeats this purpose. tcsh and csh before it has been doing this since the 1980's, so it is = nothing new. Add a new binary to your path and forget to rehash: you = can't run it. > I don't think that there are that many people who don't add /sbin and > /usr/sbin to $PATH nowadays. I have colleagues of mine who use Linux > systems that don't have this in their $PATH. When I ask them whether = it > causes problems for them, they deny, but it turns out they simply put > `sudo' in front of it, to work around that, regardless of whether it = was > needed. Folks that grew up before the "all the world is a vax^W^Wruns Linux" = have it in their path, but younger colleges generally don't have it = unless they've been forced to use Solaris or *BSD at some point. >> Is it really worth it though? Perhaps fix the couple of oddball = cases >> instead? (eg: md5, lastlogin and friends). ac used to require access >> to privileged files due to privacy concerns on shared user systems. >=20 > I think if we have to look at each tool and re-examine whether they > should be in bin or sbin and convert them to do so, it would take > approximately the same amount of investment as moving them into a = single > place. And I am willing to do that. :-) I'm a bit torn here. It would be nice to have one, unified place for = binaries. Do embedded systems really need to burn the extra inodes on = sbin, libexec, etc? No, they don't. On the other hand, these paths = seep into so many places that I gave up my attempts years ago to just = put all the files in one place (I didn't like the symlink idea because I = worried about shells that were stupid and put all entires into their = hashes multiple times). I'd honestly start small here with (1) move the ones that are obviously = wrong (and aren't specified by posix to be wrong). (2) make it an option = to just make one or two binaries directories with compat symlinks = (because there's a ton of scripts that just know where binaries life). Warner=