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

Commit2c7a2a0

Browse files
committed
Set GUC "is_superuser" in all processes that set AuthenticatedUserId.
It was always false in single-user mode, in autovacuum workers, and inbackground workers. This had no specifically-identified securityconsequences, but non-core code or future work might make itsecurity-relevant. Back-patch to v11 (all supported versions).Jelte Fennema-Nio. Reported by Jelte Fennema-Nio.
1 parent28b6095 commit2c7a2a0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/backend/utils/init/miscinit.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,14 @@ InitializeSessionUserIdStandalone(void)
767767
AuthenticatedUserIsSuperuser= true;
768768

769769
SetSessionUserId(BOOTSTRAP_SUPERUSERID, true);
770+
771+
/*
772+
* XXX This should set SetConfigOption("session_authorization"), too.
773+
* Since we don't, C code will get NULL, and current_setting() will get an
774+
* empty string.
775+
*/
776+
SetConfigOption("is_superuser","on",
777+
PGC_INTERNAL,PGC_S_DYNAMIC_DEFAULT);
770778
}
771779

772780

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp