From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2699 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jonathan de Boyne Pollard Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: s6-log can create current with 640? Date: Tue, 29 Oct 2019 07:28:18 +0000 Message-ID: References: <6f3a28f8-798c-9a55-e79b-2e54b37edf2e@heuristicsystems.com.au> <01b8c564-887f-16cf-405c-8bcfc52c02b1@heuristicsystems.com.au> <62d9001a-73bd-5cfe-4c47-f561c4dfabea@heuristicsystems.com.au> <9f1c10ea-a512-438d-dd3b-4d84119394fe@heuristicsystems.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="107564"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 To: Supervision Original-X-From: supervision-return-2288-gcsg-supervision=m.gmane.org@list.skarnet.org Tue Oct 29 08:28:24 2019 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iPLvT-000Ros-Cm for gcsg-supervision@m.gmane.org; Tue, 29 Oct 2019 08:28:23 +0100 Original-Received: (qmail 28990 invoked by uid 89); 29 Oct 2019 07:28:47 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Original-Received: (qmail 28983 invoked from network); 29 Oct 2019 07:28:46 -0000 X-Originating-IP: [86.10.101.211] X-Authenticated-User: J.deBoynePollard-newsgroups@NTLWorld.COM X-Spam: 0 X-Authority: v=2.3 cv=VabZwmh9 c=1 sm=1 tr=0 a=FQ5CjUvp3JFI4KFGyeqcZw==:117 a=FQ5CjUvp3JFI4KFGyeqcZw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=uZvujYp8AAAA:8 a=Ye9q-bpsAAAA:8 a=rg2V61WcAAAA:8 a=LjGl66yXJvB24_isjzgA:9 a=QEXdDO2ut3YA:10 a=3T5Q1zYS3h4A:10 a=SLzB8X_8jTLwj6mN0q5r:22 a=h2Zpg1Gm_F5nnxfnuFwt:22 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1572334099; bh=f/qLencrxPYkZGWvKVTSLd5/iPUKUOFwBBA6TV851TY=; h=Subject:To:References:From:Date:In-Reply-To; b=WLmBxepXMWdiHvszrJkNppn9doVbOSNthp28xO2ULyJSEO7LgY1oez27SKUt41Z2P BqgS0GT9OhxQhup/pBqaAyCz5E9iJdASqJ7Awo5cumoLEMKjPqqtJljDjVUXcHS7hg u3bmiviSEGhpksJVk0W/dzu9pWf0NIuHwZvEXCn/AXCnKSDwSU14keNmG06CqQ9QRn OKFFmUix+mVFzdEOFiDtiNOJYm26I0HifFvwATaiCzafqg1cKZP2snHh+Ym7HItZpj IKS5JlE36Wa1XQyRBcydW+p0x+injA2++WuMa8wdrncrQToKc605WCiJZufHd3Lm7p ZyNVXHetR6lbA== In-Reply-To: X-CMAE-Envelope: MS4wfDzHHoY9/EKXJmD8lhrfUFGWhSJcokzpNJAyALPZc6pOoTUWregJ3bGWVQ2XdHY9v96Pmjta40HJxe71Reg9R/bbMXIiTJZCQr0ubYuJ0KKA+Po6ZQ4d ebke5Uj0JdqRBaYJbExxjP4/nR3rvpqdlvju142RhTi261Pc6JU68geThJ/AVxkpbBuCEkzSrKBAtvKoC2oGXm2afHb4TG8PjznhlqKcUmzaB1UJcH/ua3DX Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2699 Archived-At: Laurent Bercot: > The real question is, why is there a "umask" binary that's not the one > from execline? Non-chainloading non-builtin umask is nonsense, just > like non-chainloading non-builtin cd. Not quite. People find uses for these things, and as the SUS rationale points out, for every potentially useless external equivalent of a (non-special) built-in command someone has come up with an arcane actual use for it. Even "cd". * https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap01.html#tag_23_01_07 * https://unix.stackexchange.com/q/50058/5132 The POSIX model is therefore that all non-special built-ins are also available as executables; or, rather, that all of the standard utilities that are not special built-ins are simply *available* (via execvp(), find -exec, env, and *all of the other* ways that standard utilities can be invoked), and whether they are built-in or not, to a shell or otherwise, is an implementation detail as far as actually invoking the utility is concerned. (Very few shells truly conform to this, but the Watanabe shell largely does in its non-native mode.) * https://unix.stackexchange.com/q/347188/5132 * https://unix.stackexchange.com/q/496259/5132 nosh, not being a shell, is not bound by this. Its built-ins are found before a PATH search is enacted. So it actually does what M. Geraghty mistakenly thought execline was doing. It finds its own built-ins in preference to finding external commands; so invoking "umask" (without directory name prefix) within a nosh script will always invoke the built-in chain-loading one, irrespective of PATH. (Several of the non-conformant shells do this, too, giving their built-ins unequivocal precedence over a PATH search. Some even document this behaviour. But it is not standard-conformant for a shell.) * https://unix.stackexchange.com/a/496377/5132 * http://jdebp.uk./Softwares/nosh/guide/commands/exec.xml execline always searches PATH. It does not have built-ins like nosh or shells, in the first place. There's a quirk about when changes to PATH take effect, and it does not quite have the POSIX semantics for when PATH is not set, but other than that it actually has the POSIX model behaviour: Commands are located using PATH, and what command one invokes by the name "umask" is entirely determined by what PATH lists. * https://unix.stackexchange.com/a/448799/5132