Fix handling of previous password hooks in passwordcheck
authorMichael Paquier <michael@paquier.xyz>
Thu, 1 Aug 2019 00:38:29 +0000 (09:38 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 1 Aug 2019 00:38:29 +0000 (09:38 +0900)
commiteea28a3cb36951ee439288d8e400621ec301484f
tree32910de46a3cc9d51f6868b5622fb78134d9a915
parent4e10b6f8235500b99ecd0a3ca7602acdf0034c8a
Fix handling of previous password hooks in passwordcheck

When piling up loading of modules using check_password_hook_type,
loading passwordcheck would remove any trace of a previously-loaded
hook.  Unloading the module would also cause previous hooks to be
entirely gone.

Reported-by: Rafael Castro
Author: Michael Paquier
Reviewed-by: Daniel Gustafsson
Discussion: http://postgr.es/m/15932-78f48f9ef166778c@postgresql.org
Backpatch-through: 9.4
contrib/passwordcheck/passwordcheck.c