Re: Possibility to disable `ALTER SYSTEM`
Magnus Hagander <magnus@hagander.net>
From: Magnus Hagander <magnus@hagander.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>,
Jelte Fennema-Nio <postgres@jeltef.nl>, Heikki Linnakangas <hlinnaka@iki.fi>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Daniel Gustafsson <daniel@yesql.se>, Bruce Momjian <bruce@momjian.us>,
Joel Jacobson <joel@compiler.org>, Andrew Dunstan <andrew@dunslane.net>, Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>, Maciek Sakrejda <m.sakrejda@gmail.com>
Date: 2024-03-25T18:30:03Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add allow_alter_system GUC.
- d3ae2a24f265 17.0 landed
-
Rename COMPAT_OPTIONS_CLIENT to COMPAT_OPTIONS_OTHER.
- de7e96bd0fc6 17.0 landed
-
Remove support for version-0 calling conventions.
- 5ded4bd21403 10.0 cited
On Mon, Mar 25, 2024 at 7:27 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: > > OK, great. The latest patch doesn't specifically talk about backing it > > up with filesystem-level controls, but it does clearly say that this > > feature is not going to stop a determined superuser from bypassing the > > feature, which I think is the appropriate level of detail. We don't > > actually know whether a user has filesystem-level controls available > > on their system that are equal to the task; certainly chmod isn't good > > enough, unless you can prevent the superuser from just running chmod > > again, which you probably can't. An FS-level immutable flag or some > > other kind of OS-level wizardry might well get the job done, but I > > don't think our documentation needs to speculate about that. > > True. For postgresql.conf, you can put it outside the data directory > and make it be owned by some other user, and the job is done. It's > harder for postgresql.auto.conf because that always lives in the data > directory which is necessarily postgres-writable, so even if you > did those two things to it the superuser could just rename or > remove it and then write postgresql.auto.conf of his choosing. > Just to add to that -- if you use chattr +i on it, the superuser in postgres won't be able to rename it -- only the actual root user. Just chowning it won't help of course, then the rename part works. -- Magnus Hagander Me: https://www.hagander.net/ <http://www.hagander.net/> Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>