From owner-svn-src-head@freebsd.org Fri Jan 25 22:50:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA02214C5B23; Fri, 25 Jan 2019 22:50:40 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81BE276F2E; Fri, 25 Jan 2019 22:50:40 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [76.77.180.168] (port=63469 helo=eskarina.lan) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1gnAJ4-000E5S-Lm; Fri, 25 Jan 2019 14:50:39 -0800 From: Devin Teske Message-Id: <7DDC8FBE-5381-47FC-AB49-8BE2849B37AD@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r343440 - head/bin/sh Date: Fri, 25 Jan 2019 14:50:37 -0800 In-Reply-To: Cc: Devin Teske , rgrimes@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Edward Napierala References: <201901251709.x0PH9Rc4094379@repo.freebsd.org> <201901251957.x0PJvdTL089917@pdx.rh.CN85.dnsmgr.net> X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: 81BE276F2E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Fri, 25 Jan 2019 22:50:41 -0000 > On Jan 25, 2019, at 2:47 PM, Devin Teske wrote: >=20 >=20 >=20 >> On Jan 25, 2019, at 2:41 PM, Devin Teske > wrote: >>=20 >>=20 >>=20 >>> On Jan 25, 2019, at 1:37 PM, Edward Napierala > wrote: >>>=20 >>> pt., 25 sty 2019 o 19:57 Rodney W. Grimes >>> > napisa=C5=82(a): >>>>=20 >>>>> Author: trasz >>>>> Date: Fri Jan 25 17:09:26 2019 >>>>> New Revision: 343440 >>>>> URL: https://svnweb.freebsd.org/changeset/base/343440 = >>>>>=20 >>>>> Log: >>>>> Comment out the default sh(1) aliases for root, introduced in = r343416. >>>>> The rest of this stuff is still to be discussed, but I think at = this >>>>> point we have the agreement that the aliases should go. >>>>>=20 >>>>> MFC after: 2 weeks >>>>> Sponsored by: DARPA, AFRL >>>>=20 >>>> Please just revert this and the prior commit out, and when >>>> the path forward is clear commit it. I would not want any of this >>>> merged to 12/ or 11/ until the time that it is all settled. >>>=20 >>> Oops, my bad - neither this nor the previous commit is supposed >>> to be MFC-ed; the "2 weeks" above comes from my default Subversion >>> config. >>>=20 >>> Regarding the backoff - just a few hours ago you said you don't have >>> any problem with this, except for aliases and the default ENV. The >>> aliases problem has been addressed, and you hadn't yet responded >>> to my explanations regarding the ENV. Another committer asked for >>> backoff, because "sh is not an interactive shell", while in fact = sh(1) >>> is FreeBSD's default interactive shell except for root. Finally, = there's >>> one person who asked for revert, but without giving any reasons >>> whatsoever. >>>=20 >>> So far nobody had proposed any scenario where this would break >>> anything, or even affect existing users. It seems like a typical = bikeshed >>> situation. >>=20 >> It is not clear to me after reading r343416 and D18872 what this = change is trying to solve. >>=20 >> PS1 should have a reasonable default. If that default is not = reasonable, then we should change the C code. >>=20 >> Maybe I see things differently, but I'd rather see PS1 default change = so no profile/shrc change is necessary. >>=20 >> I prefer that sh, in its default configuration, not attempt to read = $HOME/.shrc, for security reasons. >>=20 >> Further, it is documented that the contents of ENV may be ignored in = privileged mode, negating these changes. >>=20 >> If you wanted your new shiny default PS1 to actually have an effect = in all modes (including privileged mode, where you probably want it), = you would have put it in /etc/profile and not in a file that is wholly = ignored by some modes (e.g., privileged mode). >>=20 >> So the solution is not even the right one for the desired result. >=20 > I would also like to add, that the current default for PS1 is static = for a reason. >=20 > Long ago, people used to write things in TCL/Expect. If PS1 is not = static, you either have to override it or account for the variance (# = for root, $ for others). >=20 > This is an important distinction specifically because TCL/Expect is = used in the control of interactive shells. And an aside: I still program in TCL/Expect. I have been known to customize PS2 and = PS4. I may have neglected to give reasons previously, but that's because I = was in a meeting and unable to expand on the particular technical = intricacies: 1. The relationship default PS1, PS2, and PS4 have with software like = TCL/Expect 2. The fact that ENV is wholly ignored in privileged mode 3. The fact that introducing ~/.shrc as a runnable file for interactive = sh globally and by-default is something that should be run by secteam --=20 Devin