Re: Removal of plaintext password type references

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Vaishnavi Prabakaran <vaishnaviprabakaran(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removal of plaintext password type references
Date: 2017-05-11 01:08:30
Message-ID: CAB7nPqSKhOpEOeRQB4pTe5zSBiwbDsfM4jh0nFdcd6LjkMQ-Pg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 10, 2017 at 10:22 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Wed, May 10, 2017 at 10:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
>>> Also note that changing the signature check_password_hook_type would
>>> break any external modules that use the hook. Removing
>>> PASSWORD_TYPE_PLAINTEXT will do that too, because any password hook
>>> function would use that constant (see e.g. contrib/passwordcheck). If we
>>> were to change the signature, I'd actually like to simplify it by
>>> removing the password_type parameter altogether. The hook function can
>>> call get_password_type() on the password itself to get the same
>>> information. But it's not worth changing the API and breaking external
>>> modules for that.
>
> Ahah. I just had the same thought before reading this message.

And attached is a patch to do that. I am all for this one to get a
more simple interface in place.
--
Michael

Attachment Content-Type Size
simplify-passwd-hook.patch application/octet-stream 1.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-05-11 01:48:39 Race conditions with WAL sender PID lookups
Previous Message Vaishnavi Prabakaran 2017-05-11 01:02:13 Re: Removal of plaintext password type references