aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2020-08-26 10:50:02 +0900
committerFujii Masao <fujii@postgresql.org>2020-08-26 10:50:02 +0900
commit29dd6d8bc631eebc3e50493c115f7a215f03bd0a (patch)
tree431bed59e4eb1a2001526d42915c925c3c3f5b48 /src
parentc34605daed563fcade07a9f45bcf440459599c00 (diff)
downloadpostgresql-29dd6d8bc631eebc3e50493c115f7a215f03bd0a.tar.gz
postgresql-29dd6d8bc631eebc3e50493c115f7a215f03bd0a.zip
Prevent non-superusers from reading pg_backend_memory_contexts, by default.
pg_backend_memory_contexts view contains some internal information of memory contexts. Since exposing them to any users by default may cause security 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 Torikoshi Reviewed-by: Michael Paquier, Fujii Masao Discussion: https://postgr.es/m/1414992.1597849297@sss.pgh.pa.us
Diffstat (limited to 'src')
-rw-r--r--src/backend/catalog/system_views.sql3
-rw-r--r--src/include/catalog/catversion.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index ba5a23ac252..a2d61302f9e 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -557,6 +557,9 @@ REVOKE EXECUTE ON FUNCTION pg_get_shmem_allocations() FROM PUBLIC;
CREATE VIEW pg_backend_memory_contexts AS
SELECT * FROM pg_get_backend_memory_contexts();
+REVOKE ALL ON pg_backend_memory_contexts FROM PUBLIC;
+REVOKE EXECUTE ON FUNCTION pg_get_backend_memory_contexts() FROM PUBLIC;
+
-- Statistics views
CREATE VIEW pg_stat_all_tables AS
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 3e677976300..573f1841b73 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 202008191
+#define CATALOG_VERSION_NO 202008261
#endif