mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 11:51:23 +02:00
From: PostgreSQL DataBase <postgres@scuba.pcpipeline.com>
This again fixes the problem with the default permissions for PUBLIC and the preventing of statements like "GRANT null on test to test_user;".
This commit is contained in:
parent
b7ed95ae15
commit
2df6bba3ca
@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.61 1998/01/29 02:26:25 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.62 1998/01/30 15:03:35 scrappy Exp $
|
||||||
*
|
*
|
||||||
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
||||||
*
|
*
|
||||||
@ -2481,7 +2481,22 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
|
|||||||
|
|
||||||
if (acls) {
|
if (acls) {
|
||||||
ACLlist = ParseACL(tblinfo[i].relacl, &l);
|
ACLlist = ParseACL(tblinfo[i].relacl, &l);
|
||||||
|
if (ACLlist == (ACL *)NULL)
|
||||||
|
if (l == 0)
|
||||||
|
continue;
|
||||||
|
else {
|
||||||
|
fprintf(stderr,"Could not parse ACL list for %s...Exiting!\n",
|
||||||
|
tblinfo[i].relname);
|
||||||
|
exit_nicely(g_conn);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Revoke Default permissions for PUBLIC */
|
||||||
|
fprintf(fout,
|
||||||
|
"REVOKE ALL on %s from PUBLIC;\n",
|
||||||
|
tblinfo[i].relname);
|
||||||
|
|
||||||
for(k = 0; k < l; k++) {
|
for(k = 0; k < l; k++) {
|
||||||
|
if (ACLlist[k].privledges != (char *)NULL)
|
||||||
fprintf(fout,
|
fprintf(fout,
|
||||||
"GRANT %s on %s to %s;\n",
|
"GRANT %s on %s to %s;\n",
|
||||||
ACLlist[k].privledges, tblinfo[i].relname,
|
ACLlist[k].privledges, tblinfo[i].relname,
|
||||||
|
Loading…
Reference in New Issue
Block a user