From 25f050d90d818b88d57e24b4be42cff3244d3881 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 11 Apr 2002 05:32:03 +0000 Subject: Make sure that usesuper is always accessed through superuser(), so that the single-user escape path always works. --- src/backend/utils/misc/superuser.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/backend/utils/misc/superuser.c') 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) -- cgit v1.2.3