aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/superuser.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2002-04-11 05:32:03 +0000
committerPeter Eisentraut <peter_e@gmx.net>2002-04-11 05:32:03 +0000
commit25f050d90d818b88d57e24b4be42cff3244d3881 (patch)
treeec4e188d558e037bea846b0513b47d468b45814d /src/backend/utils/misc/superuser.c
parenta62f43ae6e0e285aa7b0736cf7fc88254aa4a438 (diff)
downloadpostgresql-25f050d90d818b88d57e24b4be42cff3244d3881.tar.gz
postgresql-25f050d90d818b88d57e24b4be42cff3244d3881.zip
Make sure that usesuper is always accessed through superuser(), so that the
single-user escape path always works.
Diffstat (limited to 'src/backend/utils/misc/superuser.c')
-rw-r--r--src/backend/utils/misc/superuser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/utils/misc/superuser.c b/src/backend/utils/misc/superuser.c
index f677d64fd3e..4a3f3de1c54 100644
--- a/src/backend/utils/misc/superuser.c
+++ b/src/backend/utils/misc/superuser.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.20 2002/02/18 23:11:26 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.21 2002/04/11 05:32:03 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,6 +27,11 @@
/*
* The Postgres user running this command has Postgres superuser privileges
+ *
+ * All code should use either of these two functions to find out
+ * whether a given user is a superuser, rather than evaluating
+ * pg_shadow.usesuper directly, so that the escape hatch built in for
+ * the single-user case works.
*/
bool
superuser(void)