Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 37A809FB3CD for ; Mon, 23 Jul 2007 11:16:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 39266-03 for ; Mon, 23 Jul 2007 11:16:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 773B39FB79E for ; Mon, 23 Jul 2007 11:16:44 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l6NEGbjY057782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 Jul 2007 08:16:40 -0600 (MDT) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.14.1/8.14.1) with ESMTP id l6NEGZEI007438; Mon, 23 Jul 2007 08:16:35 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.14.1/8.14.1/Submit) id l6NEGZ0t007437; Mon, 23 Jul 2007 08:16:35 -0600 (MDT) (envelope-from mfuhr) Date: Mon, 23 Jul 2007 08:16:35 -0600 From: Michael Fuhr To: Thiago Maluf Cc: pgsql-admin@postgresql.org Subject: Re: Disable access shell command in psql Message-ID: <20070723141634.GA7388@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/244 X-Sequence-Number: 26225 On Mon, Jul 23, 2007 at 10:59:17AM -0300, Thiago Maluf wrote: > I have one database server with postgresql 8.1 and I discovered yesterday > one security problem. > When I access my server with thought psql I have the possibility execute > command in my server using "\!" or write one file using "\e". > I want disable these options in my server but I searched it and not found. These psql commands run on the client with the privileges of the client; they don't allow the client to do anything it couldn't already do from the shell, and presumably the client already has access to the shell if it's running psql. This would be a security problem if you use psql to run SQL statements from an untrusted source, but if you're doing that then you already have a security problem. -- Michael Fuhr