Skip to content

Commit 465edca

Browse files
committed
Fix incorrect tracking of session authorization in the presence of ACLs
that contain rights granted by non-owners. Per bug report from Nishad Prakash.
1 parent 8459b2d commit 465edca

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.88 2004/07/13 03:00:17 momjian Exp $
18+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.89 2004/07/19 21:02:17 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -2391,6 +2391,17 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt, bool isDat
23912391
_printTocHeader(AH, te, ropt, isData);
23922392
}
23932393

2394+
/*
2395+
* If it's an ACL entry, it might contain SET SESSION AUTHORIZATION
2396+
* commands, so we can no longer assume we know the current auth setting.
2397+
*/
2398+
if (strncmp(te->desc, "ACL", 3) == 0)
2399+
{
2400+
if (AH->currUser)
2401+
free(AH->currUser);
2402+
AH->currUser = NULL;
2403+
}
2404+
23942405
return 1;
23952406
}
23962407

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