Skip to content

Commit cdf5357

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 parent 5f7b25d commit cdf5357

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy