Disallow LOAD to non-superusers. Per report from John Heasman.

This commit is contained in:
Tom Lane 2005-01-24 17:46:58 +00:00
parent 66bb44cf63
commit ae5b7a0c5b
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}