]> 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:51:02 +0000 (17:51 +0100)
commit91c2755fcbd701067702cc889deeddddc6ff7a92
tree6814ecab6d79e935d8f7d97567d8a094b08dd21e
parent0463b9419b4887ddbd2aaaac0c55ee636b4eadd4
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