mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-01 19:45:33 +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
|
* 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;
|
LoadStmt *stmt = (LoadStmt *) parsetree;
|
||||||
|
|
||||||
|
if (!superuser())
|
||||||
|
elog(ERROR, "permission denied");
|
||||||
closeAllVfds(); /* probably not necessary... */
|
closeAllVfds(); /* probably not necessary... */
|
||||||
load_file(stmt->filename);
|
load_file(stmt->filename);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user