pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Petar Bogdanovic <petar@smokva.net>
To: Christoph Berg <myon@debian.org>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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 21:55:44 +0100
Message-ID: <20180317205544.GA3507@pintail.NGC068> (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>

On Sat, Mar 17, 2018 at 09:40:51PM +0100, Christoph Berg wrote:
> $ chmod 700 .
> $ sudo -u postgres psql
> could not change directory to "/home/cbe": Permission denied
> 
> I never observed any negative side effects of it, though. (Except for
> the obvious fact that "\i somethinginmyhome.sql" won't work.)


At least on NetBSD, shutting down the system with sudo while being in a
0700 directory will make the pgsql rc-script fail (because it relies on
pg_ctl), i.e. pull the plug on a running pgsql instance.

One could argue that the NetBSD /etc/rc script should, in general, chdir
before doing anything but relying on getcwd/chdir still seems suboptimal.




view thread (9+ messages)

Message-ID: <20180317205544.GA3507@pintail.NGC068>
Permalink:  ../20180317205544.GA3507@pintail.NGC068/
Also on:    postgresql.org/message-id/20180317205544.GA3507@pintail.NGC068

 · 

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: petar@smokva.net, myon@debian.org, andrew@tao11.riddles.org.uk, tgl@sss.pgh.pa.us
  Subject: Re: BUG #15120: use of getcwd(3)/chdir(2) during path resolution (exec.c)
  In-Reply-To: <20180317205544.GA3507@pintail.NGC068>
  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> <20180317205544.GA3507@pintail.NGC068>

* 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