pgsql: Move permissions check from do_pg_start_backup to pg_start_backu

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Move permissions check from do_pg_start_backup to pg_start_backu
Date: 2014-01-07 17:05:16
Message-ID: E1W0a5c-0005z2-Cl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Move permissions check from do_pg_start_backup to pg_start_backup

And the same for do_pg_stop_backup. The code in do_pg_* is not allowed
to access the catalogs. For manual base backups, the permissions
check can be handled in the calling function, and for streaming
base backups only users with the required permissions can get past
the authentication step in the first place.

Reported by Antonin Houska, diagnosed by Andres Freund

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/61d4d14ee55534dd9fead189a5a339ecdf04e82a

Modified Files
--------------
src/backend/access/transam/xlog.c | 16 ++++++----------
src/backend/access/transam/xlogfuncs.c | 10 ++++++++++
2 files changed, 16 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-01-07 19:54:12 pgsql: Silence compiler warning on MSVC.
Previous Message Magnus Hagander 2014-01-07 16:28:55 pgsql: Avoid including tablespaces inside PGDATA twice in base backups