Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3AC7A475178 for ; Mon, 5 Aug 2002 13:15:46 -0400 (EDT) Received: from linuxmail.lgsinc.com (unknown [12.22.4.163]) by postgresql.org (Postfix) with ESMTP id 6E996474EDC for ; Mon, 5 Aug 2002 13:15:45 -0400 (EDT) Received: from timetop ([10.13.15.254]) by linuxmail.lgsinc.com (8.11.6/8.8.7) with SMTP id g75HGJ319503; Mon, 5 Aug 2002 10:16:19 -0700 Date: Mon, 5 Aug 2002 10:16:42 -0700 From: Tim Ellis To: "John Madden" Cc: pgsql-admin@postgresql.org Subject: Re: security issue - database user Message-Id: <20020805101642.106897a9.Tim.Ellis@gamet.com> In-Reply-To: <46234.168.91.2.45.1028563294.squirrel@mail.ivytech.edu> References: <46234.168.91.2.45.1028563294.squirrel@mail.ivytech.edu> Organization: Gamet X-Mailer: Sylpheed version 0.7.4 (GTK+ 1.2.10; i586-mandrake-linux-gnu) WerdupHomey: 3.14159265358979323 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/24 X-Sequence-Number: 5139 On Mon, 5 Aug 2002 11:01:34 -0500 (EST) "John Madden" wrote: > (My apologies if this has been posted before - as you'll see, this isn't > the easiest thing to find in the archives.) > [SNIP] > I can't modify/etc. any existing tables, as one would expect, but: > > somedb=> CREATE TABLE mytable(test text); > CREATE > > Why is this allowed? Any way to prevent it? We've got a lot of users > working on a development server that obviously has hba to quite a few > databases... I've seen it asked a few times on this list. Answer: future version of Postgres will allow permissions to create tables to be defined. Current versions of Postgres do not, so you can't curtail this behaviour. If it were me, and it was REALLY IMPORTANT to disallow unauthorised tables, I'd create a new table with a list of legit tables and have a cronjob run every say 5 minutes that DROPS tables that don't belong in the database. -- Tim Ellis Senior Database Architect Gamet, Inc.