Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1exIdQ-000150-I7 for pgsql-bugs@arkaria.postgresql.org; Sat, 17 Mar 2018 20:41:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1exIdO-0000or-AG for pgsql-bugs@arkaria.postgresql.org; Sat, 17 Mar 2018 20:40:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1exIdO-0000oZ-0r for pgsql-bugs@lists.postgresql.org; Sat, 17 Mar 2018 20:40:58 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1exIdK-0002y3-SK for pgsql-bugs@lists.postgresql.org; Sat, 17 Mar 2018 20:40:56 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1474:d80:76e5:bff:fef3:7e00]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 403Z3R6PpRz3DwV; Sat, 17 Mar 2018 21:40:51 +0100 (CET) Date: Sat, 17 Mar 2018 21:40:51 +0100 From: Christoph Berg To: Andrew Gierth Cc: Tom Lane , petar@smokva.net, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15120: use of getcwd(3)/chdir(2) during path resolution (exec.c) Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87in9uhbco.fsf@news-spur.riddles.org.uk> User-Agent: Mutt/1.9.2 (2017-12-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 I never observed any negative side effects of it, though. (Except for the obvious fact that "\i somethinginmyhome.sql" won't work.) Christoph