Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iOQ6h-00058O-SN for pgsql-bugs@arkaria.postgresql.org; Sat, 26 Oct 2019 17:44:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iOQ6g-0003sA-Gl for pgsql-bugs@arkaria.postgresql.org; Sat, 26 Oct 2019 17:44:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iOQ6g-0003ra-8N for pgsql-bugs@lists.postgresql.org; Sat, 26 Oct 2019 17:44:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iOQ6d-0003J5-PK for pgsql-bugs@lists.postgresql.org; Sat, 26 Oct 2019 17:44:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x9QHi0QI000860; Sat, 26 Oct 2019 13:44:00 -0400 From: Tom Lane To: =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= cc: cilizili@protonmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16080: pg_ctl is failed if a fake cmd.exe exist in the current directory. In-reply-to: References: <16080-5d7f03222469f717@postgresql.org> <22130.1572097001@sss.pgh.pa.us> <26128.1572103204@sss.pgh.pa.us> Comments: In-reply-to =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= message dated "Sat, 26 Oct 2019 19:33:02 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <856.1572111840.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 26 Oct 2019 13:44:00 -0400 Message-ID: <857.1572111840@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?UTF-8?Q?Juan_Jos=3DC3=3DA9_Santamar=3DC3=3DADa_Flecha?=3D writes: > On Sat, Oct 26, 2019 at 5:20 PM Tom Lane wrote: >> Right, but does cmd.exe have a well-defined location in Windows? >> I don't think we can know which drive it's on, for starters. > The environment variable COMSPEC [1] should point to the right location. Hm. I don't have any objection to using COMSPEC if it's set, but of course that changes nothing from a security perspective. It's just a different route by which pg_ctl, pg_upgrade, etc can be misled. regards, tom lane