From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2694 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Laurent Bercot" Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: s6-log can create current with 640? Date: Sat, 26 Oct 2019 05:27:59 +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> Reply-To: "Laurent Bercot" Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="99561"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: eM_Client/7.2.36908.0 To: Supervision Original-X-From: supervision-return-2283-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Oct 26 07:28:03 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 1iOEcM-000Pmb-Rb for gcsg-supervision@m.gmane.org; Sat, 26 Oct 2019 07:28:02 +0200 Original-Received: (qmail 25786 invoked by uid 89); 26 Oct 2019 05:28:26 -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 25779 invoked from network); 26 Oct 2019 05:28:26 -0000 In-Reply-To: <9f1c10ea-a512-438d-dd3b-4d84119394fe@heuristicsystems.com.au> X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrleeggdeljecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfpfgfogfftkfevteeunffgpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhhrfgggtgfgsehtqhertddtreejnecuhfhrohhmpedfnfgruhhrvghnthcuuegvrhgtohhtfdcuoehskhgrqdhsuhhpvghrvhhishhiohhnsehskhgrrhhnvghtrdhorhhgqeenucfrrghrrghmpehmohguvgepshhmthhpohhuthenucevlhhushhtvghrufhiiigvpedt Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2694 Archived-At: >I'd mistakenly assumed execlineb knew where its friends were; though in >hindsight its a bit much to assume that execlineb internally changes the >PATH. 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. >Unfortunately it seems that the path can't be set within execlineb context= . Of course it can. What's happening is that both export and envfile set the PATH *on execution of the next command*, so the command that's right after them will still be searched with the old PATH. In other=20 words: "export PATH /usr/local/bin umask 033 echo blah" will not work, because umask will still be searched for in the old PATH (but echo would be searched in the new PATH), but "export PATH /usr/local/bin exec umask 033 echo blah" will work, because exec is searched in the old PATH and umask is searched in the new PATH. (exec is an execline nop that can be useful in those cases, if you don't have another command to put between the export PATH and the command you need to search in the new PATH.) -- Laurent