From owner-svn-src-all@freebsd.org Sat Jan 26 01:38:05 2019 Return-Path: Delivered-To: svn-src-all@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 CF61E14AA5D8; Sat, 26 Jan 2019 01:38:04 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.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 48AF6868CB; Sat, 26 Jan 2019 01:38:03 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0Q1bxTs091300; Fri, 25 Jan 2019 17:37:59 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0Q1bwDK091299; Fri, 25 Jan 2019 17:37:58 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901260137.x0Q1bwDK091299@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343440 - head/bin/sh In-Reply-To: <20190125095512.GB26744@v2> To: Edward Napierala Date: Fri, 25 Jan 2019 17:37:58 -0800 (PST) CC: rgrimes@freebsd.org, Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48AF6868CB X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [2.24 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.76)[0.761,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; MX_GOOD(-0.01)[cached: pdx.rh.CN85.dnsmgr.net]; NEURAL_SPAM_LONG(0.15)[0.149,0]; NEURAL_SPAM_MEDIUM(0.45)[0.455,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.01)[ip: (0.02), ipnet: 69.59.192.0/19(0.01), asn: 13868(-0.02), country: US(-0.08)] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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: Sat, 26 Jan 2019 01:38:05 -0000 > On 0125T1705, Rodney W. Grimes wrote: > > > > On Jan 25, 2019, at 1:13 AM, Edward Napierala wrote: > > > > Chop with the big axe most of this as I need to clarify a miss statement. > > ... > > > > The change we're discussing doesn't affect upgrades at all - it's only > > > > for new installs. > > > > > > mergemaster, iirc, will merge in changes to etc files after an upgrade. > > > So this would effect anybody that goes through an upgrade and performs mergemaster. > > > > Correct, and to my knowledge there is no way to stop that effect. > > Won't happen in this case, this doesn't apply to files in /etc > at all; it only applies to the default /root/.shrc and /root/.profile > that get installed on fresh systems. mergemaster is the wrong term here, freebsd-update is going to want to merge this change. > > > > And it doesn't affect root by default, you > > > > need to change their shell from csh(1) to sh(1). > > > > > > By your own commit messages admission, this is for the toor account, so it does affect a user (and as you were keen to point out, users with the default shell). > > > > Further it effects root any time root types "sh" or "/bin/sh" > > and intentially invokes sh interactive for some reason, > > something I do more often than I care to admit simply > > cause I know what I want to do is much easier in that > > shell. > > It doesn't. For sh(1) to read ~/.shrc (/root/.shrc in this case) > you need to have ENV set; the default /root/.profile only sets > it when sh(1) is your login shell. I do not see any conditional logic in /root/.profile, what your mis stating is that /root/.profile is not run for a login shell, so ENV would not be set unless something else caused /root/.profile to be read, aka source ~/.profile > Which means, this doesn't > change the behaviour when you casually run "sh" or "/bin/sh" > as root; sh needs to be set up as login shell for this to take > effect. Again I do not see any conditional logic in /root/.profile that would make that true. A su - toor would be effected. -- Rod Grimes rgrimes@freebsd.org