8000 Disallow LOAD to non-superusers. Per report from John Heasman. · larkly/postgres-docker@ae5b7a0 · GitHub
[go: up one dir, main page]

Skip to content

Commit ae5b7a0

Browse files
committed
Disallow LOAD to non-superusers. Per report from John Heasman.
1 parent 66bb44c commit ae5b7a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/tcop/utility.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.125.2.2 2002/09/30 19:55:08 tgl Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.125.2.3 2005/01/24 17:46:58 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616< 6F90 /td>
*/
@@ -640,6 +640,8 @@ ProcessUtility(Node *parsetree,
640640
{
641641
LoadStmt *stmt = (LoadStmt *) parsetree;
642642

643+
if (!superuser())
644+
elog(ERROR, "permission denied");
643645
closeAllVfds(); /* probably not necessary... */
644646
load_file(stmt->filename);
645647
}

0 commit comments

Comments
 (0)
0