| From: | Anton Voloshin <a(dot)voloshin(at)postgrespro(dot)ru> |
|---|---|
| To: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Cc: | Nathan Bossart <nathan(at)postgresql(dot)org>, Noah Misch <noah(at)leadboat(dot)com> |
| Subject: | missing PGDLLIMPORT in utils/acl.h after CVE-related "Invalidate plan cache after role changes" |
| Date: | 2026-08-12 08:52:46 |
| Message-ID: | 4a3d36ba-276a-4211-b31b-6d1f5227f967@postgrespro.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello, hackers,
(there was no discussion of the recent CVE-related commits here,
starting a new thread)
In recent CVE-related commits there is one PGDLLIMPORT missing:
> --- a/src/include/utils/acl.h
> +++ b/src/include/utils/acl.h
> @@ -228,6 +228,9 @@ extern void select_best_grantor(const RoleSpec *grantedBy, AclMode privileges,
> const Acl *acl, Oid ownerId,
> Oid *grantorId, AclMode *grantOptions);
>
> +/* DATABASEOID syscache hash value for our own database, set by initialize_acl */
> +extern uint32 cached_db_hash;
> +
> extern void initialize_acl(void);
>
> /*
see commit
ffca23839cc Invalidate plan cache after role changes. (2026-08-10)
<Nathan Bossart>
and related backported commits.
But every non-static variable declaration in .h files must be declared
PGDLLIMPORT since REL_15_STABLE and
8ec569479fc Apply PGDLLIMPORT markings broadly. (2022-04-08) <Robert Haas>
just to avoid keeping extension authors on Windows at a disadvantage, as
it was discussed around that patch. Since there was no other extern
variables in this header file, it's an easily understood thinko.
So I suggest an obvious fix, which is needed in REL_14_STABLE..master,
attached.
P.S. Perhaps CI or buildfarm member running
src/tools/mark_pgdllimport.pl would be a good idea?
P.P.S. CC to Nathan Bossart and Noah Misch as author and committer.
Best regards,
Anton Voloshin, postgrespro.com
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-add-PGDLLIMPORT-to-the-no-longer-static-cached_db_ha.patch | text/x-patch | 1.0 KB |
| 0001-v19-add-PGDLLIMPORT-to-the-no-longer-static-cached_d.patch | text/x-patch | 1.0 KB |
| 0001-v18-add-PGDLLIMPORT-to-the-no-longer-static-cached_d.patch | text/x-patch | 1012 bytes |
| 0001-v17-add-PGDLLIMPORT-to-the-no-longer-static-cached_d.patch | text/x-patch | 1012 bytes |
| 0001-v16-add-PGDLLIMPORT-to-the-no-longer-static-cached_d.patch | text/x-patch | 1012 bytes |
| 0001-v15-add-PGDLLIMPORT-to-the-no-longer-static-cached_d.patch | text/x-patch | 1012 bytes |
| 0001-v14-add-PGDLLIMPORT-to-the-no-longer-static-cached_d.patch | text/x-patch | 1012 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ayush Tiwari | 2026-08-12 09:07:16 | Re: Error handling in after-startup shmem requests |
| Previous Message | Rahila Syed | 2026-08-12 08:27:59 | Re: Fix unsafe coding in ResourceOwnerReleaseAll() |