Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 262B82E3965 for ; Fri, 14 Dec 2007 13:11:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 46735-03-3 for ; Fri, 14 Dec 2007 13:11:38 -0400 (AST) Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 99B462E3973 for ; Fri, 14 Dec 2007 13:11:39 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-76-117.bk5-dsl.surnet.cl [200.126.76.117]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id lBEHBS67019336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Dec 2007 09:11:30 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 6489947C88; Fri, 14 Dec 2007 14:11:27 -0300 (CLST) Date: Fri, 14 Dec 2007 14:11:27 -0300 From: Alvaro Herrera To: "Joshua D. Drake" Cc: Bill Moran , "Roberts, Jon" , "'pgsql-performance@postgresql.org'" Subject: Re: viewing source code Message-ID: <20071214171127.GE6269@alvh.no-ip.org> References: <1A6E6D554222284AB25ABE3229A927621129EC@nrtexcus702.int.asurion.com> <20071214111849.b8788ce4.wmoran@collaborativefusion.com> <20071214090433.08f241c1@commandprompt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071214090433.08f241c1@commandprompt.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Fri, 14 Dec 2007 09:11:30 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/221 X-Sequence-Number: 28037 Joshua D. Drake wrote: > > > However, in the current configuration, all users with permission to > > > log in can see all source code. They don't have rights to execute > > > the functions but they can see the source code for them. Shouldn't > > > I be able to revoke both the ability to execute and the ability to > > > see functions? > > Yes and know. If your functions are interpreted then no, I don't see > any reason for this feature, e.g; python,perl,plpgsql,sql,ruby. I can > read them on disk anyway. If you have access to the files, which is not necessarily the case. Random users, in particular, won't. Maybe this can be done by revoking privileges to pg_proc. I am sure it can be made to work. It does work for pg_auth_id, and nobody says that "they can read the passwords from disk anyway." -- Alvaro Herrera Developer, http://www.PostgreSQL.org/ "We're here to devour each other alive" (Hobbes)