pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christoph Berg <myon@debian.org>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: petar@smokva.net
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15120: use of getcwd(3)/chdir(2) during path resolution (exec.c)
Date: Sat, 17 Mar 2018 16:47:16 -0400
Message-ID: <20793.1521319636@sss.pgh.pa.us> (raw)
In-Reply-To: <20180317204051.GG23570@msg.df7cb.de>
References: <152130268473.1317.3689189784729884454@wrigleys.postgresql.org>
	<18476.1521304133@sss.pgh.pa.us>
	<87in9uhbco.fsf@news-spur.riddles.org.uk>
	<20180317204051.GG23570@msg.df7cb.de>

Christoph Berg <myon@debian.org> writes:
> Re: Andrew Gierth 2018-03-17 <87in9uhbco.fsf@news-spur.riddles.org.uk>
>> Tom> I think your example of "sudo /usr/bin/pg_ctl" is pretty
>> Tom> artificial; who'd bother spelling that out?
>> 
>> Not necessarily exactly like that, but we do occasionally get this issue
>> coming up on the IRC channel.

> It's absolutely not artificial. I can easily trigger the message from
> my home directory:

> $ chmod 700 .
> $ sudo -u postgres psql
> could not change directory to "/home/cbe": Permission denied

No, I think you missed my point: I thought typing "sudo ... /usr/bin/pg_ctl"
rather than just "sudo ... pg_ctl" seemed artificial.  Your example
doesn't exactly contradict that.  It's relevant here because it affects
whether or not argv[0] is already an absolute path.

			regards, tom lane




view thread (9+ messages)  latest in thread

Message-ID: <20793.1521319636@sss.pgh.pa.us>
Permalink:  ../20793.1521319636@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20793.1521319636@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, myon@debian.org, andrew@tao11.riddles.org.uk, petar@smokva.net
  Subject: Re: BUG #15120: use of getcwd(3)/chdir(2) during path resolution (exec.c)
  In-Reply-To: <20793.1521319636@sss.pgh.pa.us>
  References: <152130268473.1317.3689189784729884454@wrigleys.postgresql.org> <18476.1521304133@sss.pgh.pa.us> <87in9uhbco.fsf@news-spur.riddles.org.uk> <20180317204051.GG23570@msg.df7cb.de> <20793.1521319636@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