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

Commit7df974e

Browse files
committed
Disallow superuser names starting with 'pg_' in initdb
As with CREATE ROLE, disallow users from specifying initialsuperuser names which begin with 'pg_' in initdb.Per discussion with Tom.
1 parent9eb7a0a commit7df974e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/bin/initdb/initdb.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3562,6 +3562,12 @@ main(int argc, char *argv[])
35623562
if (strlen(username)==0)
35633563
username=effective_user;
35643564

3565+
if (strncmp(username,"pg_",3)==0)
3566+
{
3567+
fprintf(stderr,_("%s: superuser name \"%s\" is reserved; role names can not begin with 'pg_'\n"),progname,username);
3568+
exit(1);
3569+
}
3570+
35653571
printf(_("The files belonging to this database system will be owned "
35663572
"by user \"%s\".\n"
35673573
"This user must also own the server process.\n\n"),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp