Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YRqsW-0003xo-Jq for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Feb 2015 23:33:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YRqsU-0003CD-AL for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Feb 2015 23:32:58 +0000 Received: from makus.postgresql.org ([174.143.35.229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YRqsS-0003C7-Qw for pgsql-hackers@postgresql.org; Sat, 28 Feb 2015 23:32:56 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YRqsK-0007W5-4m for pgsql-hackers@postgresql.org; Sat, 28 Feb 2015 23:32:54 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 8B4F05F7AB; Sat, 28 Feb 2015 18:32:45 -0500 (EST) Date: Sat, 28 Feb 2015 18:32:45 -0500 From: Stephen Frost To: Peter Eisentraut Cc: Adam Brightwell , Noah Misch , Tom Lane , PostgreSQL Hackers Subject: Re: CATUPDATE confusion? Message-ID: <20150228233245.GO29780@tamriel.snowman.net> References: <28382.1419703324@sss.pgh.pa.us> <20141227231829.GX3062@tamriel.snowman.net> <1952.1419722762@sss.pgh.pa.us> <20141227233150.GA2046947@tornado.leadboat.com> <54E65000.8030304@gmx.net> <20150225203955.GY29780@tamriel.snowman.net> <54EE8C6E.8090506@gmx.net> <20150226030541.GG29780@tamriel.snowman.net> <54F2376E.9080501@gmx.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tB3UQx9o7itSJcWB" Content-Disposition: inline In-Reply-To: <54F2376E.9080501@gmx.net> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-45-generic (x86_64) X-Uptime: 18:25:12 up 37 days, 23:14, 8 users, load average: 0.07, 0.09, 0.06 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --tB3UQx9o7itSJcWB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Peter, * Peter Eisentraut (peter_e@gmx.net) wrote: > On 2/25/15 10:05 PM, Stephen Frost wrote: > > Agreed, but I'd also like to get rid of any reason, beyond emergency > > cases, for people to modify the catalog directly. There's a few places > > which we aren't yet doing that, but I'd rather fix those cases than > > encourage people to give out rights to modify them and end up making > > things like: > >=20 > > "UPDATE pg_database SET datallowconn =3D false where datname =3D 'xyz';" > >=20 > > an accepted interface. >=20 > I'm not sure those things are related. Eh, I feel they are, but either way. > Getting rid of the *reasons* for updating catalogs directly might be > worthwhile, but I don't see why we need to install (or maintain) a > special invisible permission trap for it. We have a permission system, > and it works pretty well. We have this "invisible permission trap" known as checking if you're a superuser all over the place. I'm not against revisiting those cases and considering using the GRANT permission system to manage access, but that's certainly a larger project to work on. What I'm referring to here are all the functions that check if you're a superuser, instead of just revoking EXECUTE from public and letting the user manage the permission. > The Unix kernels don't have special traps for someone to modify > /etc/shadow or similar directly. That file has appropriate permissions, > and that's it. I think that works pretty well. This isn't really /etc/shadow though, this is more like direct access to the filesystem through the device node- and you'll note that Linux certainly has got an independent set of permissions for that called the capabilities system. That's because messing with those pieces can crash the kernel. You're not going to crash the kernel if you goof up /etc/shadow. Thanks! Stephen --tB3UQx9o7itSJcWB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJU8lAcAAoJEO1sijiDR2RVpPUQAME1JQ/LXO/rfZtxDMfbX1Tm 76PdhqgV74VPKYqiI7OeVQQgerlpsZ3doViQQ2rdg+eaBi6vKercLZMR2YYa/rLT GywIB8rrxnT8HFUxj+jqgtjCCPrCcH+ZHZ7Ra/CHXtGaI2/RYqVvYuDSSanh4z+l VV8XSwdwxsrIg8Uhu2vj8wMP0kNCvEefTorHiJKgPX338m6whowAGJqDjzsWoONk bMsGYN9Gf+Skw8fFLFgMahYom2oq6gLCjXQ8sOVR0cmkYS3y4m/9P9bUNVfcP7Gx THLInXVahN3cQmkjPDI8w8m9Y+USTvt3pK//TTRTbGxqBIiB6RN0tiLJZuA93yn5 TtuOjOFIFqsUlIHAuyVx61pjYHCjE5TtSd6lrBVHmMDUiOJA2qulRcaHIfhCRL1f FXaRDr8uRhPBwBSz9M/j6J+xzV5gPJt788LWgaqWvmj5dmA7L1JjDNdSzYklNtyu L7E2AQlI9VBQ9DuCYQml3DIoCpamHVYbDjG6DJIPDxzUZ4f7nYWks63xzhXzxXZZ U2hs2OEnpnz04NnoRKlYmeeb+rrwrz5PMj+dPp14KhKa2TCncsdPpYDbZg9GlvqM 5vzE45+qU4tIzVT4uc83qASJEX3XUX1aOKTekUL36E1Er+igaxo/TMFU8irSjYEH cfTSuLDfxKbHSA6m3pZf =NkEQ -----END PGP SIGNATURE----- --tB3UQx9o7itSJcWB--