Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitad538d8

Browse files
committed
Disallow LOAD to non-superusers. Per report from John Heasman.
1 parent0ffe9f7 commitad538d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/backend/tcop/utility.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.231 2004/12/31 22:01:16pgsql Exp $
13+
* $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.232 2005/01/24 17:46:16tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -803,6 +803,10 @@ ProcessUtility(Node *parsetree,
803803
{
804804
LoadStmt*stmt= (LoadStmt*)parsetree;
805805

806+
if (!superuser())
807+
ereport(ERROR,
808+
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
809+
errmsg("must be superuser to do LOAD")));
806810
closeAllVfds();/* probably not necessary... */
807811
load_file(stmt->filename);
808812
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp