From owner-svn-src-head@freebsd.org Fri Jan 25 23:01:37 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 62F7F14C60AD; Fri, 25 Jan 2019 23:01:37 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 C24117781F; Fri, 25 Jan 2019 23:01:36 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr1-x442.google.com with SMTP id t6so11919282wrr.12; Fri, 25 Jan 2019 15:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=YAEwvYTS55Ru0KTZ6hgc3Tv6ahIa3dNKgJ4SpBhHIQs=; b=FndxRxWgdTlaebwvQ69dDbjlsPznKfcgVBRICaw+hO9kh4wtQuG3cWyVZy0F7uNaJA co/IczCtOjVnRWdXiwd2hFW3mZREVSJGc40BL1tHFtVmM55A/BnuEoF07bkSN8Bfhg8U wbLvy+LR1WpM1/Fza2Jih7cjiww9U1Ep0TI0cD9bbzQKg+VA2TTsI+GOzX/dcXRPn+rK jT9ZDk3CSJEMiBoWaXGcUIosDxNg+ws/8ugNgPKHi0/5JKBiVfIB1y+OEfUWdYOFu8fv edStSW+CMZSqgEyD+BUrXGAElXLem1oS3h2IotGBionsmWvmOD+B0hOYpIdptZcbCuZi 1b/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=YAEwvYTS55Ru0KTZ6hgc3Tv6ahIa3dNKgJ4SpBhHIQs=; b=G8en1GoZkj+M5Tdb4hMIKPGaNuIne2gAubqbjwm/+a5YZ9IwGVqPQEdnxPMdm1aFNV 6D9o1HqQWhu2ShTYYNX96l22IGoDiA7g4gXfeTfxUHCg1sg1A5rqmtqSV2y94/97Q2Ed +M7c1rvwUyh5+gsAl7nyIqRa+idw22ClTN47j8lNJofWFaDPV7aBhVCNxNPWb3OKS/Bj thwi1QaJ9ceFBXN5JSV/Tb737vfb10Pao8JKNU1p4bx0wwMM81Hm61f8dKCxsA6ElOYf jnB55LHRajI7zo4Cpjwbo/SzasldB6outqWW+wXENZZai+7F81lbOhpLmpHM4oZ4sY08 Gcww== X-Gm-Message-State: AJcUukdBcABA7e61pxmHPaMK/UKjx8QTMk17vpKT+IhyLcIk+3DLKxYz Ih9PuO4sXFzpztB6QxzgbybSjCT1 X-Google-Smtp-Source: ALg8bN5GZ7DDgrY/VzFrAPXEc+oSGA+WuyD5P2uWogETmd2IrWQzZ7+dtJQwvpcQFbT1v2jJITekWA== X-Received: by 2002:adf:b307:: with SMTP id j7mr13821056wrd.46.1548457294761; Fri, 25 Jan 2019 15:01:34 -0800 (PST) Received: from v2 (cpc92302-cmbg19-2-0-cust461.5-4.cable.virginm.net. [82.1.209.206]) by smtp.gmail.com with ESMTPSA id t5sm45480370wmg.43.2019.01.25.15.01.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 15:01:33 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 25 Jan 2019 08:28:51 +0000 From: Edward Napierala To: Devin Teske Cc: rgrimes@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343440 - head/bin/sh Message-ID: <20190125082851.GA26199@v2> Mail-Followup-To: Devin Teske , rgrimes@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201901251709.x0PH9Rc4094379@repo.freebsd.org> <201901251957.x0PJvdTL089917@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: C24117781F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,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: Fri, 25 Jan 2019 23:01:37 -0000 On 0125T1441, Devin Teske wrote: > > > > On Jan 25, 2019, at 1:37 PM, Edward Napierala wrote: > > > > pt., 25 sty 2019 o 19:57 Rodney W. Grimes > > > napisaƂ(a): > >> > >>> Author: trasz > >>> Date: Fri Jan 25 17:09:26 2019 > >>> New Revision: 343440 > >>> URL: https://svnweb.freebsd.org/changeset/base/343440 > >>> > >>> 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. > >>> > >>> MFC after: 2 weeks > >>> Sponsored by: DARPA, AFRL > >> > >> 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. > > > > 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. > > > > 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. > > > > So far nobody had proposed any scenario where this would break > > anything, or even affect existing users. It seems like a typical bikeshed > > situation. > > It is not clear to me after reading r343416 and D18872 what this change is trying to solve. The idea is to make it easy to replace the default root shell - which many people consider broken, due to not supporting basic shell syntax - with something that actually works. > PS1 should have a reasonable default. If that default is not reasonable, then we should change the C code. > > Maybe I see things differently, but I'd rather see PS1 default change so no profile/shrc change is necessary. Thank you, that's actually a valid argument. I believe that's also what bash does. It would be more intrusive, though, and I kind of don't like the idea of hardcoding things that can easily be dealt with with in a more "high-level" way. > I prefer that sh, in its default configuration, not attempt to read $HOME/.shrc, for security reasons. Can you elaborate? It already reads $HOME/.profile; how is $HOME/.shrc different? > Further, it is documented that the contents of ENV may be ignored in privileged mode, negating these changes. True - so if someone finds the idea of having a suid shell useful - from what I undestand that's what the privileged mode boils down to - this change will be a no-op. I seriously hope nobody does, though. > 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). > So the solution is not even the right one for the desired result. I would, if only it didn't break zsh, and perhaps others. The problem here is that zsh uses different syntax for PS1, _and_ it also parses /etc/profile. And no, I don't care at all about privileged mode, I can't imagine a situation when using it would be a good idea.