Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 7AB7A2E00FB for ; Mon, 17 Dec 2007 10:13:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 39370-01 for ; Mon, 17 Dec 2007 10:13:49 -0400 (AST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by postgresql.org (Postfix) with ESMTP id C7B5C2E003B for ; Mon, 17 Dec 2007 10:13:54 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id f5so1028879nfh.23 for ; Mon, 17 Dec 2007 06:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=j14UE+sxuvc6sYWcnQQgTq9vOQM22Ud0k685wxDE8P0=; b=GqmP8q1wlPw9dh7ri7DCZW+98o7zzagYY9VAHqPMu5uo8OvXMjQ3ahCmt515cjzczn3CzgL3RzlMYj4obVqqMRKBFmnIqo0skFpHtvrLUOJzSsao5LSvAzXc50R4Bws/WJ+D6f7vRDL4YPfyovfeJvp4CLc2qLvXPT0COgA/Ws0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JtV06RMT0x6dR+UYRRiXQHyAb0kcn0LJxKUcHbI60Qy8e3EnIqGGN5zrmVdrlNRZKQWUFnmFBfvgw0e+IZfRA8OBqrwQydLbZpI8+US/RAmagMdttpo6i1YDOuKhOivnimMlCAhLiVvBbC17iia3O57Ft9uk4lsI/24WUUF3b00= Received: by 10.78.200.20 with SMTP id x20mr8392719huf.43.1197900832783; Mon, 17 Dec 2007 06:13:52 -0800 (PST) Received: by 10.78.18.2 with HTTP; Mon, 17 Dec 2007 06:13:52 -0800 (PST) Message-ID: Date: Mon, 17 Dec 2007 09:13:52 -0500 From: "Merlin Moncure" To: "Roberts, Jon" Subject: Re: viewing source code Cc: "Jonah H. Harris" , "Bill Moran" , "Joshua D. Drake" , pgsql-performance@postgresql.org In-Reply-To: <1A6E6D554222284AB25ABE3229A92762112A00@nrtexcus702.int.asurion.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1A6E6D554222284AB25ABE3229A92762112A00@nrtexcus702.int.asurion.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/256 X-Sequence-Number: 28072 On Dec 17, 2007 8:11 AM, Roberts, Jon wrote: > Alvaro Herrera pointed out that pg_read_file requires superuser access which > these users won't have so revoking access to the function code should be > possible. > > Joshua D. Drake suggested revoking pg_proc but that isn't the source code, > it just has the definition of the functions. > > If it isn't a feature today, what table has the source code in it? Maybe I > can revoke that. the table is pg_proc. you have to revoke select rights from public and the user of interest. be aware this will make it very difficult for that user to do certain things in psql and (especially) pgadmin. it works. a better solution to this problem is to make a language wrapper for pl/pgsql that encrypts the source on disk. afaik, no one is working on th is. it would secure the code from remote users but not necessarily from people logged in to the server. the pg_proc hack works ok though. merlin