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

Commit29dd6d8

Browse files
committed
Prevent non-superusers from reading pg_backend_memory_contexts, by default.
pg_backend_memory_contexts view contains some internal information ofmemory contexts. Since exposing them to any users by default may causesecurity issue, this commit allows only superusers to read this view,by default, like we do for pg_shmem_allocations view.Bump catalog version.Author: Atsushi TorikoshiReviewed-by: Michael Paquier, Fujii MasaoDiscussion:https://postgr.es/m/1414992.1597849297@sss.pgh.pa.us
1 parentc34605d commit29dd6d8

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

‎doc/src/sgml/catalogs.sgml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9697,6 +9697,10 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
96979697
</tgroup>
96989698
</table>
96999699

9700+
<para>
9701+
By default, the <structname>pg_backend_memory_contexts</structname> view can be
9702+
read only by superusers.
9703+
</para>
97009704
</sect1>
97019705

97029706
<sect1 id="view-pg-config">

‎src/backend/catalog/system_views.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,9 @@ REVOKE EXECUTE ON FUNCTION pg_get_shmem_allocations() FROM PUBLIC;
557557
CREATEVIEWpg_backend_memory_contextsAS
558558
SELECT*FROM pg_get_backend_memory_contexts();
559559

560+
REVOKE ALLON pg_backend_memory_contextsFROM PUBLIC;
561+
REVOKE EXECUTEON FUNCTION pg_get_backend_memory_contexts()FROM PUBLIC;
562+
560563
-- Statistics views
561564

562565
CREATEVIEWpg_stat_all_tablesAS

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO202008191
56+
#defineCATALOG_VERSION_NO202008261
5757

5858
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp