Commit f39748a7 authored by Peter Eisentraut's avatar Peter Eisentraut

Forbid REVOKE on untrusted languages, and don't dump privileges of

untrusted languages (in case they sneak in).
parent 9a1cab43
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/catalog/aclchk.c,v 1.95 2003/11/29 19:51:42 pgsql Exp $
* $PostgreSQL: pgsql/src/backend/catalog/aclchk.c,v 1.96 2003/12/19 14:21:56 petere Exp $
*
* NOTES
* See acl.h.
......@@ -594,7 +594,7 @@ ExecuteGrantStmt_Language(GrantStmt *stmt)
aclcheck_error(ACLCHECK_NO_PRIV, ACL_KIND_LANGUAGE,
NameStr(pg_language_tuple->lanname));
if (!pg_language_tuple->lanpltrusted && stmt->is_grant)
if (!pg_language_tuple->lanpltrusted)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("language \"%s\" is not trusted", langname)));
......
......@@ -12,7 +12,7 @@
* by PostgreSQL
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.360 2003/12/06 03:00:12 tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.361 2003/12/19 14:21:56 petere Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -4633,10 +4633,11 @@ dumpProcLang(Archive *fout, ProcLangInfo *plang)
NULL, "",
plang->dobj.catId, 0, plang->dobj.dumpId);
dumpACL(fout, plang->dobj.catId, plang->dobj.dumpId, "LANGUAGE",
qlanname, plang->lanname,
funcInfo->pronamespace->nspname,
NULL, plang->lanacl);
if (plang->lanpltrusted)
dumpACL(fout, plang->dobj.catId, plang->dobj.dumpId, "LANGUAGE",
qlanname, plang->lanname,
funcInfo->pronamespace->nspname,
NULL, plang->lanacl);
free(qlanname);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment