]> granicus.if.org Git - postgresql/commit
Move permissions check from do_pg_start_backup to pg_start_backup
authorMagnus Hagander <magnus@hagander.net>
Tue, 7 Jan 2014 16:47:52 +0000 (17:47 +0100)
committerMagnus Hagander <magnus@hagander.net>
Tue, 7 Jan 2014 16:50:56 +0000 (17:50 +0100)
commit9544cc0d657ea09d27667c8c70302b06fbe0121b
tree94cf2675df4fee2ba0714505dccb0ca30c714962
parentb168c5ef2730d0ecaa7462f0b90345b0a3798c16
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
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogfuncs.c