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

Commitcdf5357

Browse files
committed
Only show source file and line numbers to superusers, for consistent
security level with other parts of the system.Per gripe from Tom
1 parent5f7b25d commitcdf5357

File tree

1 file changed

+7
-3
lines changed
  • src/backend/utils/misc

1 file changed

+7
-3
lines changed

‎src/backend/utils/misc/guc.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.472 2008/09/10 19:16:22 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.473 2008/09/23 21:12:03 mha Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -6176,8 +6176,12 @@ GetConfigOptionByNum(int varnum, const char **values, bool *noshow)
61766176
break;
61776177
}
61786178

6179-
/* If the setting came from a config file, set the source location */
6180-
if (conf->source==PGC_S_FILE)
6179+
/*
6180+
* If the setting came from a config file, set the source location.
6181+
* For security reasons, we don't show source file/line number for
6182+
* non-superusers.
6183+
*/
6184+
if (conf->source==PGC_S_FILE&&superuser())
61816185
{
61826186
values[12]=conf->sourcefile;
61836187
snprintf(buffer,sizeof(buffer),"%d",conf->sourceline);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp