Revert MAINTAIN privilege and pg_maintain predefined role.

Nathan Bossart <nathan@postgresql.org>

Commit: 957445996fda2d6939a8748f2a19c10b15941c5e
Author: Nathan Bossart <nathan@postgresql.org>
Date: 2023-07-07T18:25:23Z
Releases: 16.0
Revert MAINTAIN privilege and pg_maintain predefined role.

This reverts the following commits: 4dbdb82513, c2122aae63,
5b1a879943, 9e1e9d6560, ff9618e82a, 60684dd834, 4441fc704d,
and b5d6382496.  A role with the MAINTAIN privilege may be able to
use search_path tricks to escalate privileges to the table owner.
Unfortunately, it is too late in the v16 development cycle to apply
the proposed fix, i.e., restricting search_path when running
maintenance commands.

Bumps catversion.

Reviewed-by: Jeff Davis
Discussion: https://postgr.es/m/E1q7j7Y-000z1H-Hr%40gemulon.postgresql.org
Backpatch-through: 16

Files

PathChange+/−
doc/src/sgml/ddl.sgml modified +9 −26
doc/src/sgml/func.sgml modified +1 −1
doc/src/sgml/ref/alter_default_privileges.sgml modified +2 −2
doc/src/sgml/ref/analyze.sgml modified +4 −2
doc/src/sgml/ref/cluster.sgml modified +3 −7
doc/src/sgml/ref/grant.sgml modified +1 −2
doc/src/sgml/ref/lock.sgml modified +2 −2
doc/src/sgml/ref/refresh_materialized_view.sgml modified +2 −3
doc/src/sgml/ref/reindex.sgml modified +9 −14
doc/src/sgml/ref/revoke.sgml modified +1 −1
doc/src/sgml/ref/vacuum.sgml modified +4 −2
doc/src/sgml/user-manag.sgml modified +0 −12
src/backend/catalog/aclchk.c modified +0 −15
src/backend/commands/analyze.c modified +7 −6
src/backend/commands/cluster.c modified +11 −32
src/backend/commands/indexcmds.c modified +14 −20
src/backend/commands/lockcmds.c modified +1 −1
src/backend/commands/matview.c modified +1 −2
src/backend/commands/tablecmds.c modified +7 −9
src/backend/commands/vacuum.c modified +29 −36
src/backend/utils/adt/acl.c modified +0 −8
src/bin/pg_dump/dumputils.c modified +0 −1
src/bin/pg_dump/t/002_pg_dump.pl modified +1 −1
src/bin/psql/tab-complete.c modified +3 −3
src/include/catalog/catversion.h modified +1 −1
src/include/catalog/pg_authid.dat modified +0 −5
src/include/commands/tablecmds.h modified +2 −3
src/include/commands/vacuum.h modified +2 −3
src/include/nodes/parsenodes.h modified +1 −2
src/include/utils/acl.h modified +2 −3
src/test/isolation/expected/cluster-conflict-partition.out modified +4 −4
src/test/isolation/specs/cluster-conflict-partition.spec modified +1 −1
src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm modified +0 −11
src/test/regress/expected/cluster.out modified +0 −7
src/test/regress/expected/create_index.out modified +2 −2
src/test/regress/expected/dependency.out modified +11 −11
src/test/regress/expected/privileges.out modified +23 −93
src/test/regress/expected/rowsecurity.out modified +17 −17
src/test/regress/sql/cluster.sql modified +0 −5
src/test/regress/sql/dependency.sql modified +1 −1
src/test/regress/sql/privileges.sql modified +0 −68

Documentation touched

Discussion