Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit508bf95

Browse files
committed
Remove any-user DML capability from allow_system_table_mods
Previously, allow_system_table_mods allowed a non-superuser to do DMLon a system table without further permission checks. This has beenremoved, as it was quite inconsistent with the rest of the meaning ofthis setting. (Since allow_system_table_mods was previously onlyaccessible with a server restart, it is unlikely that anyone was usingthis possibility.)Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://www.postgresql.org/message-id/flat/8b00ea5e-28a7-88ba-e848-21528b632354%402ndquadrant.com
1 parentd4feade commit508bf95

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/backend/catalog/aclchk.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3851,7 +3851,7 @@ pg_class_aclmask(Oid table_oid, Oid roleid,
38513851

38523852
/*
38533853
* Deny anyone permission to update a system catalog unless
3854-
* pg_authid.rolsuper is set. Also allow it if allowSystemTableMods.
3854+
* pg_authid.rolsuper is set.
38553855
*
38563856
* As of 7.4 we have some updatable system views; those shouldn't be
38573857
* protected in this way. Assume the view rules can take care of
@@ -3860,8 +3860,7 @@ pg_class_aclmask(Oid table_oid, Oid roleid,
38603860
if ((mask& (ACL_INSERT |ACL_UPDATE |ACL_DELETE |ACL_TRUNCATE |ACL_USAGE))&&
38613861
IsSystemClass(table_oid,classForm)&&
38623862
classForm->relkind!=RELKIND_VIEW&&
3863-
!superuser_arg(roleid)&&
3864-
!allowSystemTableMods)
3863+
!superuser_arg(roleid))
38653864
{
38663865
#ifdefACLDEBUG
38673866
elog(DEBUG2,"permission denied for system catalog update");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp