X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CFF5A3A4F39 for ; Thu, 13 Jan 2005 12:41:55 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 37943-03 for ; Thu, 13 Jan 2005 12:41:41 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.195]) by svr1.postgresql.org (Postfix) with ESMTP id A3E6F3A4AC8 for ; Thu, 13 Jan 2005 12:41:43 +0000 (GMT) Received: by rproxy.gmail.com with SMTP id j1so168430rnf for ; Thu, 13 Jan 2005 04:41:44 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=KF34lQQx1VUXn4N8q/oNpD2Frsifg/CWOzq4U/jZm6gV7dQPS7kKtsPNfkmB7P6Sxlnj7ykiPCjhNbjCzs/Tkb2rqTf3RkVpw8MTLKl4aEGB1je9Rac6qtyVXnukG2QLjaLPn5PpaA07+pqwLTNI1TFmUDLJq/3Alcs656O1wvk= Received: by 10.38.104.22 with SMTP id b22mr232062rnc; Thu, 13 Jan 2005 04:41:44 -0800 (PST) Received: by 10.38.163.47 with HTTP; Thu, 13 Jan 2005 04:41:44 -0800 (PST) Message-ID: <758d5e7f050113044119890a53@mail.gmail.com> Date: Thu, 13 Jan 2005 13:41:44 +0100 From: Dawid Kuroczko Reply-To: Dawid Kuroczko To: pgsql-admin@postgresql.org Subject: Re: Installing PostgreSQL as "postgress" versus "root" Debate! In-Reply-To: <20050113122041.GG2717@lb.tenfour> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <4001DEAF7DF9BD498B58B45051FBEA650207AAD3@25exch1.vicorpower.vicr.com> <41E5FE80.8080402@commandprompt.com> <758d5e7f05011304065d7e56a0@mail.gmail.com> <20050113122041.GG2717@lb.tenfour> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.54 tagged_above=0 required=5 tests=FROM_ENDS_IN_NUMS, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200501/108 X-Sequence-Number: 15967 On Thu, 13 Jan 2005 12:20:41 +0000, Dick Davies wrote: > > But only if either setuid root or executed by root. Hey, on my > > system even /bin/sh is owned by root; it would be funny of it > > executed as root > C'mon folks, the guy obviously made a booboo - no need to rub his > nose in it... I apologize if it felt like it. Anyway, I've been thinking about it a bit; if pgsql files are owned by pgsql and some BAD user with too high privileges (say, plperlU or other unrestricted access), she can modify database files (like remove everything from data directory, etc.), and it matters little if files are owned by root or postgres -- the database data is owned by postgres. However, if she is really BAD, she can prepare her own version of say, psql binary (which will "invisibly" grant her access to all victims tables for instance) and overwrite PostgreSQL's original version with her own. If the files are owned by root, she cannot do it (though she can try making postgres suid shell binary in /tmp, etc. etc. etc.). :-) Regards, Dawid