postgresql/src
Heikki Linnakangas e7f051b8f9 Refactor the code for verifying user's password.
Split md5_crypt_verify() into three functions:
* get_role_password() to fetch user's password from pg_authid, and check
  its expiration.
* md5_crypt_verify() to check an MD5 authentication challenge
* plain_crypt_verify() to check a plaintext password.

get_role_password() will be needed as a separate function by the upcoming
SCRAM authentication patch set. Most of the remaining functionality in
md5_crypt_verify() was different for MD5 and plaintext authentication, so
split that for readability.

While we're at it, simplify the *_crypt_verify functions by using
stack-allocated buffers to hold the temporary MD5 hashes, instead of
pallocing.

Reviewed by Michael Paquier.

Discussion: https://www.postgresql.org/message-id/3029e460-d47c-710e-507e-d8ba759d7cbb@iki.fi
2016-12-12 12:48:13 +02:00
..
backend Refactor the code for verifying user's password. 2016-12-12 12:48:13 +02:00
bin Fix quoting and a compiler warning in dumping partitions. 2016-12-08 14:10:10 +02:00
common Rename "pg_xlog" directory to "pg_wal". 2016-10-20 11:32:18 -04:00
fe_utils Restore psql's SIGPIPE setting if popen() fails. 2016-12-07 12:39:24 -05:00
include Refactor the code for verifying user's password. 2016-12-12 12:48:13 +02:00
interfaces Use "%option prefix" to set API names in ecpg's lexer. 2016-12-11 14:54:25 -05:00
makefiles Provide NO_INSTALLCHECK option for pgxs. 2016-11-14 14:53:07 -08:00
pl Be more careful about Python refcounts while creating exception objects. 2016-12-09 15:27:23 -05:00
port Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
template Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
test Prevent crash when ts_rewrite() replaces a non-top-level subtree with null. 2016-12-11 13:09:57 -05:00
timezone More zic cleanup. 2016-11-06 10:45:58 -05:00
tools Implement table partitioning. 2016-12-07 13:17:55 -05:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore
DEVELOPERS
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Replace PostmasterRandom() with a stronger source, second attempt. 2016-12-05 13:42:59 +02:00
Makefile.shlib Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
bcc32.mak
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak