From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 3541e5d4 for ; Mon, 17 Feb 2020 09:03:30 +0000 (UTC) Received: (qmail 24688 invoked by alias); 17 Feb 2020 09:03:22 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45445 Received: (qmail 29336 invoked by uid 1010); 17 Feb 2020 09:03:22 -0000 X-Qmail-Scanner-Diagnostics: from wout2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25725. spamassassin: 3.4.2. Clear:RC:0(64.147.123.25):SA:0(-2.6/5.0):. Processed in 4.791162 secs); 17 Feb 2020 09:03:22 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrjeehgdduvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkjghfofggtgfgsehtqh dttdertdejnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggrnhhi vghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfkphepjeelrddujeekrdejrddukeelnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Date: Mon, 17 Feb 2020 09:02:36 +0000 From: Daniel Shahaf To: dana Cc: Zsh hackers list Subject: Re: [BUG] Issue with set built-in in 5.8 (?) Message-ID: <20200217090236.17a82c53@tarpaulin.shahaf.local2> In-Reply-To: <6908034E-BC9E-41B3-8457-111F275AF3A7@dana.is> References: <6908034E-BC9E-41B3-8457-111F275AF3A7@dana.is> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable dana wrote on Sun, 16 Feb 2020 20:19 -0600: > Most of these errors are useful, but i'm not sure they should uncondition= ally > abort the shell. =E2=8B=AE > @Daniel, we talked about the first one before, but this particular concern > didn't come up at the time =E2=80=94 what do you reckon? Considerations: - Compatibility with what zshoptions(1) has promised would work, though that didn't work before 5.8. - Consistency with POSIX. (POSIX doesn't specify -p, but still.) - Consistency with other shells. - Consistency between =C2=ABset=C2=BB and =C2=ABsetopt=C2=BB. - On the one hand, "Errors should never pass silently". On the other hand, in the shell language there are few other cases of aborting the shell just because a syscall returned an error. - Regardless of what we choose, the other behaviour is achievable: if we make the error fatal people can use =C2=ABeval=C2=BB to make it non-fa= tal, and if we make the error non-fatal people can use =C2=AB=E2=80=A6 || exit= 1=C2=BB to make it fatal. I'm not sure what these add up to, but these are the addends I have in mind. Cheers, Daniel > % sudo perl -e '$< =3D 1; $> =3D 2; exec("zsh", "-fc", "id; unsetopt priv= ileged; echo still here");' > uid=3D1(daemon) gid=3D1(daemon) euid=3D2 egid=3D0(wheel) groups=3D... > zsh:unsetopt:1: PRIVILEGED: supplementary group list not changed due to l= ack of permissions: EUID=3D2 > zsh:unsetopt:1: can't change option: privileged > still here >=20 > % sudo perl -e '$< =3D 1; $> =3D 2; exec("zsh", "-fc", "id; set +p; echo = still here");' > uid=3D1(daemon) gid=3D1(daemon) euid=3D2 egid=3D0(wheel) groups=3D... > zsh:unsetopt:1: PRIVILEGED: supplementary group list not changed due to l= ack of permissions: EUID=3D2 > zsh:set:1: can't change option: -p >=20