From owner-svn-src-head@freebsd.org Sat Jan 26 14:32:19 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 794BD14C4F22; Sat, 26 Jan 2019 14:32:19 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18B5585920; Sat, 26 Jan 2019 14:32:18 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-oi1-f182.google.com with SMTP id i6so9809773oia.6; Sat, 26 Jan 2019 06:32:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Wi0meghD/NkgnVpQ9y6h17LE9fKS8/3ChmkIF6NGxeM=; b=Z10iVlfe7ujz8UI+TWZnLevrkfqSIGSJPGXtnT/XrfuKxRc+CsUxJ7BiIqKPH4t9Mt O84fb3SDPdMYh3c+ml+ecXpzrIly4vY/EXakoKJmeK0masSoUibY1DVlLiRB2cwJ12S5 i2heT19GgKKvCbo+xW/zuJb9Frt3qCir4z/gM/mSTQWzznkA37M0lZ56tI7OTN34xLwp VN6P3IVpDuQcEp9Zcr7MbwVa89TeIlOJqkZciuQsbsum4Iai2R201ikUwxyTO4GyyDuz 6NKE4UATtAW5OFwahGM7EMWFG4V7REOK+H/kNKTFT1Mumz/PvzCQdyw+fNNxq/c6+51O QUAA== X-Gm-Message-State: AJcUukfT0dRe6Vr+DPu4+9PwNJZX/h7zkfT6dGYjYJUwWJcrx7wG5WI6 CsYU56PtEz93jmFoyyszJRwp7YRsd3HBpuAq9izr/Q== X-Google-Smtp-Source: AHgI3IbaOZzq6yUMrZJyRugdcgX3IxZbSuBESiBeVxEPfUHAsB9v8oWEolOFLclzBD+jAs96IISMxcAAJWGnPKq89po= X-Received: by 2002:aca:1a0b:: with SMTP id a11mr980506oia.154.1548506560960; Sat, 26 Jan 2019 04:42:40 -0800 (PST) MIME-Version: 1.0 References: <20190125095512.GB26744@v2> <201901260137.x0Q1bwDK091299@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201901260137.x0Q1bwDK091299@pdx.rh.CN85.dnsmgr.net> From: Edward Napierala Date: Sat, 26 Jan 2019 12:42:27 +0000 Message-ID: Subject: Re: svn commit: r343440 - head/bin/sh To: rgrimes@freebsd.org Cc: Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 18B5585920 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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: Sat, 26 Jan 2019 14:32:19 -0000 sob., 26 sty 2019 o 01:38 Rodney W. Grimes napisa=C5=82(a): > > > 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 statem= ent. > > > ... > > > > > 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 upgr= ade. > > > > So this would effect anybody that goes through an upgrade and perfo= rms 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. Are you sure freebsd-update also updates root's private configuration files? I've never used it, but this seems somewhat surprising. > > > > > 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 t= he 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 Correction: /root/.profile is not-run for non-login shell, so ENV wouldn't be set. Yeah, that's what I've meant. > > 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. As opposed to 'su - root' or plain '/bin/sh', right.