pgsql: Clean up error message reported after \password encryption failu

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Clean up error message reported after \password encryption failu
Date: 2022-01-11 17:03:17
Message-ID: E1n7KYH-0002pc-10@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Clean up error message reported after \password encryption failure.

Experimenting with FIPS mode enabled, I saw

regression=# \password joe
Enter new password for user "joe":
Enter it again:
could not encrypt password: disabled for FIPS
out of memory

because PQencryptPasswordConn was still of the opinion that "out of
memory" is always appropriate to print.

Minor oversight in b69aba745. Like that one, back-patch to v14.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9cb5518b7ff69ab3bbc422313c69d54696fe8472

Modified Files
--------------
src/interfaces/libpq/fe-auth.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message John Naylor 2022-01-11 17:59:52 pgsql: Improve warning message in pg_signal_backend()
Previous Message Fujii Masao 2022-01-11 14:20:51 pgsql: Enhance pg_log_backend_memory_contexts() for auxiliary processes