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
*/
@@ -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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy