projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e37052d
)
Disallow LOAD to non-superusers. Per report from John Heasman.
author
Tom Lane
<
[email protected]
>
Mon, 24 Jan 2005 17:46:41 +0000
(17:46 +0000)
committer
Tom Lane
<
[email protected]
>
Mon, 24 Jan 2005 17:46:41 +0000
(17:46 +0000)
src/backend/tcop/utility.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/tcop/utility.c
b/src/backend/tcop/utility.c
index 05f5d1d044826a2a628515dba4308a8e7452184e..1af128bfd2168996ae22d5c35edcb1c9f8781f8f 100644
(file)
--- a/
src/backend/tcop/utility.c
+++ b/
src/backend/tcop/utility.c
@@
-814,6
+814,10
@@
ProcessUtility(Node *parsetree,
{
LoadStmt *stmt = (LoadStmt *) parsetree;
+ if (!superuser())
+ ereport(ERROR,
+ (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
+ errmsg("must be superuser to do LOAD")));
closeAllVfds(); /* probably not necessary... */
load_file(stmt->filename);
}