pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: cilizili@protonmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16080: pg_ctl is failed if a fake cmd.exe exist in the current directory.
Date: Sat, 26 Oct 2019 11:20:04 -0400
Message-ID: <26128.1572103204@sss.pgh.pa.us> (raw)
In-Reply-To: <CAC+AXB3Rj1KkQtLMGqpO5q9_+50Rzre_u4KZjXerX+kHfWsJ2A@mail.gmail.com>
References: <16080-5d7f03222469f717@postgresql.org>
	<22130.1572097001@sss.pgh.pa.us>
	<CAC+AXB3Rj1KkQtLMGqpO5q9_+50Rzre_u4KZjXerX+kHfWsJ2A@mail.gmail.com>

=?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= <juanjo.santamaria@gmail.com> writes:
> There is a difference in the behaviour for the WIN32 port. In other
> platforms execl() is called from "src/bin/pg_ctl/pc_ctl" with the full path
> ("/bin/sh"), but for WIN32 the function CreateProcessAsUser() calls the CMD
> command without a path, and this function has a search logic of its own [1].

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.

Ultimately this seems like a problem of insecure search path,
which is not our responsibility to fix (and people would not
appreciate us trying, in many cases).

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <26128.1572103204@sss.pgh.pa.us>
Permalink:  ../26128.1572103204@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26128.1572103204@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, juanjo.santamaria@gmail.com, cilizili@protonmail.com
  Subject: Re: BUG #16080: pg_ctl is failed if a fake cmd.exe exist in the current directory.
  In-Reply-To: <26128.1572103204@sss.pgh.pa.us>
  References: <16080-5d7f03222469f717@postgresql.org> <22130.1572097001@sss.pgh.pa.us> <CAC+AXB3Rj1KkQtLMGqpO5q9_+50Rzre_u4KZjXerX+kHfWsJ2A@mail.gmail.com> <26128.1572103204@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox