mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
Disallow LOAD to non-superusers. Per report from John Heasman.
This commit is contained in:
parent
66bb44cf63
commit
ae5b7a0c5b
@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.125.2.2 2002/09/30 19:55:08 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.125.2.3 2005/01/24 17:46:58 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -640,6 +640,8 @@ ProcessUtility(Node *parsetree,
|
||||
{
|
||||
LoadStmt *stmt = (LoadStmt *) parsetree;
|
||||
|
||||
if (!superuser())
|
||||
elog(ERROR, "permission denied");
|
||||
closeAllVfds(); /* probably not necessary... */
|
||||
load_file(stmt->filename);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user