| From: | Diego <mrstephenamell(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Cc: | Denis Smirnov <darthunix(at)gmail(dot)com>, Grigorev Jurij <ju(dot)grigorev(at)ftdata(dot)ru>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz> |
| Subject: | Re: [PATCH] libpq: Add PQpassfileLookup() |
| Date: | 2026-11-26 16:48:01 |
| Message-ID: | 6b0862c1.b637b9d2.21af8a.37cc@mx.google.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi hackers,
A short status update, as this thread has been quiet since September.
v3 [1] is two patches:
- 0001 fixes a gap in how libpq clears a password read from the
password file. passwordFromFile() does strdup() on the rest of the
line and then de-escapes the password in place, so the tail of an
escaped password, and any fields after it, are left in the
allocation past the terminator, out of reach of the
explicit_bzero(p, strlen(p)) in pqReleaseConnHosts(). It is +21/-9
in fe-connect.c and does not depend on the new API.
- 0002 adds PQpassfileLookup(), a thin public wrapper around that same
lookup. A client that connects through a tunnel or a proxy can use
it to find the password for the real host and port, instead of
carrying its own .pgpass parser.
Yuriy reviewed the API patch and Denis the whole series. Neither has
open comments, and the entry has been Ready for Committer since
September 30 [2]. v3 still applies on master (d5fb939, offsets only)
and cfbot is green, so I have not posted a rebase.
Is there anything I can do to make this easier to pick up? If the API
needs more discussion, 0001 can go in on its own, and I can move it to
a separate thread if that helps.
Michael, I added you in Cc because you reworked the error handling in
passwordFromFile() last year (861af926103).
[1] https://postgr.es/m/5b8e0436-853d-4b5e-8546-1862faf84cc6@gmail.com
[2] https://commitfest.postgresql.org/patch/7261/
Thanks,
Diego
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Antonin Houska | 2026-11-26 16:52:58 | Re: Allow progress tracking of sub-commands |
| Previous Message | Antonin Houska | 2026-11-26 16:33:19 | Re: Allow progress tracking of sub-commands |