From owner-svn-src-all@freebsd.org Wed Nov 4 19:50:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79A3D464A7D; Wed, 4 Nov 2020 19:50:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CRHLX4rDfz4Bql; Wed, 4 Nov 2020 19:50:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0A4JnswM035316 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 4 Nov 2020 21:49:57 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0A4JnswM035316 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0A4Jnsf4035315; Wed, 4 Nov 2020 21:49:54 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 4 Nov 2020 21:49:54 +0200 From: Konstantin Belousov To: Stefan Esser Cc: Emmanuel Vadot , src-committers , svn-src-all , svn-src-head@freebsd.org Subject: Re: svn commit: r367280 - head/lib/libc/gen Message-ID: <20201104194954.GR2654@kib.kiev.ua> References: <202011021848.0A2Im7Kx098921@repo.freebsd.org> <338fdfbb-6fad-0e44-5df6-b5a1c38d3e4f@freebsd.org> <20201102224907.401c9200dffba42cab827b2d@bidouilliste.com> <20201102221039.GN2654@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4CRHLX4rDfz4Bql X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-0.54 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-0.79)[-0.794]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_MEDIUM(-0.26)[-0.258]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.52)[0.516]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 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: Wed, 04 Nov 2020 19:50:13 -0000 On Mon, Nov 02, 2020 at 11:51:12PM +0100, Stefan Esser wrote: > Am 02.11.20 um 23:10 schrieb Konstantin Belousov: > > On Mon, Nov 02, 2020 at 10:49:07PM +0100, Emmanuel Vadot wrote: > > > I think that the first question we want to ask is : Do we want to > > > support LOCALBASE being different than /usr/local > > > I honestly don't see any advantages of making it !=/usr/local/ and > > > before we start putting a lot of new/useless(for I guess 99% of our > > > user base) in the tree we should here why people are using /usr/pkg or > > > whatever weird location. > > > If they have some good argument, then we should proceed further. > > > > I would be delighted to be able to install _and use_ two independent > > set of packages from the same base system install. Without recursing > > to jails, X forwarding, etc. > > I understand the use case, and I agree this may be appropriate for > a development system. > > But on a production system I'd never want to have a non-constant and > not generally applied LOCALBASE, at least not on a system that gives > a CLI to unprivileged users. Those could build their own copy of the > LOCALBASE tree (e.g. sym-linking all sub-trees that are to be kept > unmodified, replacing config files that policies that restrict the > user). So how this makes attitude to the feature different ? For me, dev machine is my production box because what I do is development. And for user that need to run an old binary-only 32bit app which requires X libs, for instance, it also would be a production. > > And if LOCALBASE is not compiled into binaries but somehow obtained > at run-time, there are a number of attacks I can imagine (e.g. by > LD_PRELOAD replace the sysctl() call in libc by your own version). If somebody can LD_PRELOAD their into your process, it makes no sense to talk about 'security'. > > > In fact I would like to use /usr/local and e.g /usr/local-i386 on amd64 > > machine. I am fine with me building both of them in my instance of > > poudriere. > > This is a use-case for architecture dependent path definitions (which > I have used some 30 years ago on HP-UX which supported 68k and HP-PA > on a single file system that way). Such a feature has been discussed > in FreeBSD multiple times over the decades ... Ok, let replace /usr/local-i386 by /usr/local-11.4, if you so inclined.